That’s an interesting idea and I hadn’t thought of that. Does this mean that all of your dependencies go into devDependencies
and none into dependencies
proper? I would think that with that line of reasoning, any project that uses an asset pipeline like brunch or webpack would always use devDependencies
? Is there something particular about phoenix + npm + brunch + bootstrap that would enable this approach?
Like I said, I’m far from a javascript expert. But here is how I separate dependencies
from devDependencies
in ibgib:
"dependencies": {
"bootstrap": "^3.3.7",
"d3": "^4.2.2",
"d3-force": "^1.0.2",
"d3-textwrap": "^2.0.0",
"font-awesome": "^4.6.3",
"glslify": "^5.1.0",
"phoenix": "file:../../deps/phoenix",
"phoenix-socket": "^1.1.3",
"phoenix_html": "file:../../deps/phoenix_html",
"sass-brunch": "^2.6.3"
},
"devDependencies": {
"babel-brunch": "~6.0.0",
"brunch": "2.7.4",
"clean-css-brunch": "~2.0.0",
"css-brunch": "~2.0.0",
"javascript-brunch": "~2.0.0",
"uglify-js-brunch": "~2.0.1"
}
So everything in devDependencies
are things that are used at compilation time, and everything else is used to actually run the application. This is supported in most places that I see online, like here, here, the original post I linked, here, here, etc.
That’s why I was pretty sure that what I said was correct. However, if you look at the answer below the accepted answer on SO by wayfarer_boy, he mentions this particular approach is used by Yoeman, i.e. it puts everything in devDependencies
. He then recants in his comment and and says that he uses --save
for everything but “test and documentation dependencies”.
But, at least Yoeman has this approach (according to him, I have no idea), which certainly isn’t nothing! And interestingly enough, the official bootstrap npm package, it doesn’t mention either flag, and neither does the official bootstrap getting started npm section.
So, whereas at first I thought it’s pretty clear-cut, on second glance your approach does seem interesting, if not unusual. 
EDIT: Looking more at the highly upvoted referenced answer on SO, I would say that you’re saying in this case that because it’s a web app and not a package is why you would put it in devDependencies
?