Open Teapane opened 8 years ago
I suppose I see your argument. Would it be helpful to add some documentation to the README
, or are you not in favor of this lib at all?
I'm up for other implementations. We're limited in that package.json
needs to be JSON, which doesn't support comments.
I found this workaround. I'm not 100% confident in it. Thoughts?
"scripts": {
"//": "Build JavaScript assets once",
"build": "webpack & webpack --config webpack/prod.config.js",
"//": "Install and boot a local server at localhost:3000",
"start": "npm install && PORT=3000 NODE_PATH=$NODE_PATH:./src node --harmony bin/server.js",
"//": "Run eslint and report errors",
"lint": "eslint src",
"//": "Run eslint and attempt to fix errors",
"lint:fix": "npm run lint -- --fix",
"//": "Run mocha tests",
"test": "NODE_PATH=./src:./test mocha src/**/__tests__/*.js src/**/**/__tests__/*.js",
"//": "Same as `test`, but runs tests when files change",
"test:watch": "npm run test -- --watch",
"//": "Run tests and report coverage",
"test:cov": "babel-node `npm bin`/istanbul cover `npm bin`/_mocha -- --recursive",
"//": "Build the styleguide from the React components",
"styleguide": "rsg -c styleguide.js 'src/components/!(__tests__)/*.js'",
"//": "Same as `styleguide`, but continues watching for changes",
"styleguide:watch": "rsg -c styleguide.js 'src/components/!(__tests__)/*.js' -d"
}
A forked version of better npm run that has an info section might be worthwhile (and probably pretty easy to get merged upstream)
Another option that also has a nice interface: https://github.com/ruyadorno/ntl/issues/4
Ntl looks cool, but leaves us in the same spot of docs getting out of syncs with reality, which is what I really want to avoid.
I am researching creating our own lib/customizing an existing lib.
I really like the idea, but I'm not a huge fan of the implementation - if I change a script command (e.g.
build:prod
tobuild:production
) but don't change the relevant info section bit, the info is now inaccurate.