Closed brasilikum closed 5 years ago
npm run test
succeeds for me, but it should not.
❯ cat temp/myapp/package.json
{
"name": "myapp",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node server.js",
"start:prod": "NODE_ENV=production node server.js",
"build": "mkdir -p build && webpack --mode=production --progress --json > build/stats.json",
"test": "elm-test"
},
"author": "",
"license": "MIT",
"devDependencies": {
"elm-test": "^0.19.0-beta9",
"elm-webpack-loader": "^5.0.0",
"webpack": "^4.17.0",
"webpack-cli": "^3.1.0",
"webpack-dev-middleware": "^3.1.3"
},
"dependencies": {
"ejs": "^2.6.1",
"express": "^4.16.3",
"jsdom": "^11.12.0",
"yargs": "^12.0.1"
}
}
❯ cat boilerplate/package.json
{
"name": "projectname",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node server.js",
"start:prod": "NODE_ENV=production node server.js",
"build": "mkdir -p build && webpack --mode=production --progress --json > build/stats.json",
"test": "elm-test"
},
"author": "",
"license": "MIT",
"devDependencies": {
"elm-test": "^0.19.0-beta9",
"elm-webpack-loader": "^5.0.0",
"webpack": "^4.17.0",
"webpack-cli": "^3.1.0",
"webpack-dev-middleware": "^3.1.3"
},
"dependencies": {
"ejs": "^2.6.1",
"express": "^4.16.3",
"jsdom": "^11.12.0",
"yargs": "^12.0.1"
}
}
Thank you very much for this PR, it is suuper helpful!
Why should the tests fail? The functional test actually don't check for the contents of the files, just the file list.
I'll merge this because it is working well and brings a lot of value already, feel free to send other PRs if you want to change anything
I've added a simple test for it https://github.com/rogeriochaves/spades/commit/e9f530ec69573dc5970992a2083b419ddc7b032f#diff-e623a7a647966064845a4e5828a58315R51
So far it's just replacing
projectname
quick and dirty. It might be worth it to manually replaceprojectname
with<projectname>
or similar so it does not accidentally replaced.I am not sure why
dev: true
got removed in my package lock.