Skip to content

Instantly share code, notes, and snippets.

@indus
Last active July 7, 2024 01:37
Show Gist options
  • Save indus/f88be74c580a399fc68df8612569d7b0 to your computer and use it in GitHub Desktop.
Save indus/f88be74c580a399fc68df8612569d7b0 to your computer and use it in GitHub Desktop.
my minimal bower replacement: just download the package.json (or copy the script over to yours) and hit "npm install".
{
"name": "bower-replacement",
"version": "0.0.1",
"description": "bower replacement made simple (noDep)",
"scripts": {
"postinstall":"npm link download && node -e \"require('./package.json').download.forEach(a => require('download').apply(0,a))\" && npm unlink download"
},
"download": [
["https://gist.github.com/favicon.ico","."],
["https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.3/leaflet.js","src/script/org"],
["https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.3/leaflet.css","src/style/org"],
["https://google-webfonts-helper.herokuapp.com/api/fonts/roboto?download=zip&subsets=latin&variants=100,300,500,700,900,regular","src/style/fonts",{"extract":true}]
]
}
{
"name": "bower-replacement",
"version": "0.0.1",
"description": "bower replacement made simple",
"scripts": {
"postinstall":"node -e \"require('./package.json').download.forEach(a => require('download').apply(0,a))\""
},
"download": [
["https://gist.github.com/favicon.ico","."],
["https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.3/leaflet.js","src/script/org"],
["https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.3/leaflet.css","src/style/org"],
["https://google-webfonts-helper.herokuapp.com/api/fonts/roboto?download=zip&subsets=latin&variants=100,300,500,700,900,regular","src/style/fonts",{"extract":true}]
],
"devDependencies": {
"download": "^6.2.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment