4 ms·
How would you grab the latest versions for libs easily without a package manager?
by arrty88 11y ago
How would you grab the latest versions for libs easily without a package manager?
- Raphmedia 11y agoSorry, I'm not sure that I comprehend your question correctly. Are you asking me how versions of a lib are managed in the package.json of a project? All of those are valid: { "dependencies" : { "foo" : "1.0.0 - 2.9999.9999", "bar" : ">=1.0.2 <2.1.2", "baz" : ">1.0.2 <=2.3.4", "boo" : "2.0.1", "qux" : "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0", "til" : "~1.2", "elf" : "~1.2.3", "two" : "2.x", "thr" : "3.3.x", "lat" : "latest" } }
- 91bananas 11y agoI think they're asking if not using npm or similar, what is the process for updating your local copy of a file/package. Which would be, go to where project is hosted, find out what version you're looking for, click until you find actual source, copy text or download file, move file from downloads to your repo, or paste in to a new file in your repo.
- deleted 11y ago[deleted]
- Alexqw85 11y agoMake works well for me... TMPDIR=$(BASEDIR)/tmp THEME=$(BASEDIR)/theme THEME_CSS=$(THEME)/css THEME_FONT=$(THEME)/fonts THEME_JS=$(THEME)/js VER_BOOTSTRAP=3.3.6 VER_FONTAWESOME=4.5.0 VER_JQUERY=2.2.1 updatedeps: $(TMPDIR) bootstrap fontawesome jquery bootstrap: curl -L -o $(TMPDIR)/bs.zip https://github.com/twbs/bootstrap/releases/download/v$(VER_BOOTSTRAP)/bootstrap-$(VER_BOOTSTRAP)-dist.zip unzip -j $(TMPDIR)/bs.zip bootstrap-*/js/bootstrap.min.js -d $(THEME_JS) unzip -j $(TMPDIR)/bs.zip bootstrap-*/css/bootstrap.min.css -d $(THEME_CSS) fontawesome: curl -L -o $(TMPDIR)/fa.zip https://fortawesome.github.io/Font-Awesome/assets/font-awesome-$(VER_FONTAWESOME).zip unzip -j $(TMPDIR)/fa.zip font-awesome-*/css/*.min.css -d $(THEME_CSS) unzip -j $(TMPDIR)/fa.zip font-awesome-*/fonts/*webfont* -d $(THEME_FONT) jquery: curl -L -o $(THEME_JS)/jquery.min.js http://code.jquery.com/jquery-$(VER_JQUERY).min.js
- gkya 11y agoThis is actually a shell script in disguise. If this is all you do with make, I suggest you make this into a shell script: <Makefile sed -E 's/.*:$//; s/\(|\)//g; s/^updatedeps:.*/mkdir -p $TMPDIR/' > update-deps.sh BASEDIR=$PWD sh ./update-deps.sh Make is for generating output from interdependent input. It can be used for minifying your JS, or compiling your CoffeeScript in to js, or your sass (but that is handled mostly by respective compilers, tho I prefer running the compiler myself) (also, I don't use coffeescript or sass, so IDK if I'm mistaken).
- arrty88 11y agoNo my point is redundant. How would one manage upgrading dependencies without using a package manager? Why would anyone advocate against a package manager, no matter what the size of the dependency is?
- 91bananas 11y agoRight? The point of a package manager that people seem to miss. You know, how it manages packages...