vivlabs / instaclone Goto Github PK
View Code? Open in Web Editor NEWFast, cached file installation
License: Apache License 2.0
Fast, cached file installation
License: Apache License 2.0
This tool is only tested on MacOS and Linux. It should be possible to test/port to Windows, but it would require a volunteer to help with this.
Doesn't seem like the .zip file is needed after unzipping the instaclone.
Thanks.
It should be possible to set most/all commands via command line to override the instaclone.yml settings. (Install type as symlink vs copy, for example.)
Not clear if this would be a big advantage, but perhaps worth considering all the details and perhaps using .tar.gz or .tar.bz2 instead of .zip.
Requirements on compression format:
These made it seem like zip was the best, but it has some issues too (#1).
Note zip is usually same implementation on MacOS and Linux, while tar is different on GNU vs BSD. Perhaps consider pax?
It'd be great to have an auto-purging feature, where specific artifacts are deleted if they're not used from cache for a given period of time. A bit like how Git garbage collects.
Something like max_age=7
(for 7 days) in the config file, ideally per resource.
This would require a way to track/modify last used time in the cache.
Had a situation where babel
had transform issues because it was not reading the .babelrc
file. Copying the .babelrc
file to the instaclone'd symlink'd node_modules
directory fixes it. It seems if you are using instaclone, you'll either have to copy .babelrc
to the node_modules
symlink as a post install/deploy or use the config directly if you are using a plugin like babel-loader
in webpack
.
rsync is much faster than Python (or most anything else) at deleting files, so use this for instaclone purge.
Due to how npm creates the node_modules/.bin
folder, unrolling symlinks breaks all node_modules/.bin
.
Probably best to just preserve symlinks?
plumb an option through into _install_from_cache
We hit a case where instaclone ended up with a bad repo. Not sure how it happened, appears to be a partial tar unzip—maybe it didn't download properly/failed to unzip/was interrupted.
Maybe we should untar to a temporary folder and move once it's done.
Workaround: instaclone purge
and try again.
Does everything that instaclone install
does, but instead of symlinking, does an rsync (with deletes) on local node_modules.
This way I can use an instaclone as a starting point to do npm installs or upgrades and then do a new instaclone publish.
During decompression, the call to unzip on MacOS 10.10.3 fails since unzip doesn't support Zip64 (even though zip does!).
error: expected central file header signature not found (file #66056).
(please check that you have transferred or created the zipfile in the
appropriate BINARY mode and that you have compiled UnZip properly)
error: Command '['unzip', '-q', '....$f2c6d5a9cb34d0b551ffff2e3761cd8cdd15200c-Darwin$/node_modules.zip']' returned non-zero exit status 3
http://superuser.com/questions/114011/extract-large-zip-file-50-gb-on-mac-os-x
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.