Add script to npm scripts, and explain how to run

This commit is contained in:
Jeroen Engels 2021-03-12 17:43:28 +01:00
parent c67b5ec861
commit fc36b15fc2
2 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,12 @@
/* To run this script:
npm run generate-dep -- <dependency>
Example:
npm run generate-dep -- elm/url
*/
const path = require('path');
const https = require('https');
const fs = require('fs').promises;
@ -29,8 +38,13 @@ const packageName = process.argv[2];
if (!packageName) {
console.error(`Need to pass in a package name. For instance:
node create-dependency.js elm/html
npm run generate-dep -- <dependency>
Example:
npm run generate-dep -- elm/url
`)
process.exit(1);
}
async function downloadFiles() {

View File

@ -5,6 +5,7 @@
"test": "elm make --docs=docs.json && elm-format src/ --validate && elm-test && npm run phantom-tests && elm-review",
"phantom-tests": "node phantom-type-tests/run.js",
"backport-rules": "cp -r ../elm-review-{common,debug,documentation,the-elm-architecture,unused,simplification,imports,noredundantconcat}/{src,tests}/* tests",
"generate-dep": "node create-dependency",
"postinstall": "elm-tooling install"
},
"dependencies": {