News for hackers. Stuff that matters.
Re:A simple webpack starter without a framework by DiThi on Sunday November 19, 2017 @09:03AM (#15733915)
I wouldn't say it's "simple" and "without framework". It comes with jQuery, bootstrap, popper.js, and for some reason it has a lot of dependencies including "express" which is only for servers.
Re:A simple webpack starter without a framework by Klathmon on Sunday November 19, 2017 @09:12AM (#15733949)
Express (and probably others) are for the build system. It's used to serve the development mode application locally during development.

That's (part of the reason) why they are installed under devDependencies.

Re:A simple webpack starter without a framework by DiThi on Sunday November 19, 2017 @09:33AM (#15734025)
I see, it has a "dev-server.js". Why is that not a package? We have super simple functionality like "left pad" but not complex dev servers as a package? What if it breaks? Do I need to update the template?
Re:A simple webpack starter without a framework by sciolistse on Sunday November 19, 2017 @09:44AM (#15734069)
There are dev server packages for webpack (https://webpack.github.io/docs/webpack-dev-server.html). I can't tell you why it's not used in this specific project.
Re:A simple webpack starter without a framework by andrew_ on Sunday November 19, 2017 @09:54AM (#15734114)
It should be noted that those are the "old and busted" docs. https://webpack.js.org/configuration/dev-server/#devserver is the place to visit these days.
Re:A simple webpack starter without a framework by sciolistse on Sunday November 19, 2017 @11:55AM (#15734608)
my bad, i make that mistake all the time. doesn't help that searching for webpack documentation always turns up the bad results first!

Thanks for the correction.

Re:A simple webpack starter without a framework by Klathmon on Sunday November 19, 2017 @12:23PM (#15734779)
If you use Google, there are plugins which can hide certain domains from search results.

I use to hide the old docs domain.

Re:A simple webpack starter without a framework by andrew_ on Sunday November 19, 2017 @01:02PM (#15735008)
I can promise you that decommissioning that old site is on our radar
Re:A simple webpack starter without a framework by Klathmon on Sunday November 19, 2017 @09:48AM (#15734082)
They do have packages for that, several, but they all don't work in all cases.

Some tend to be fairly custom, so they do it themselves. Ours for example serves several apps in the same repo, with both HTTPS and HTTP, including some hot reload middleware and integration with our CDN for some live assets in development.

As for "why we have left-pad but not this", anyone can make a package. If you want to make a `uselessjs` package that does literally nothing, you can.

Re:A simple webpack starter without a framework by TAForObvReasons on Sunday November 19, 2017 @09:27AM (#15734001)
For those not familiar with NPM or package.json specs, the "devDependencies" are generally intended for development only and are not included when you do a standard `npm install` or add it as a dependency of your own project. This starter actually has 5 dependencies: bootstrap, jquery, lodash, object.observe, and popper.js
Re:A simple webpack starter without a framework by jessaustin on Sunday November 19, 2017 @04:14PM (#15735978)
At the very least, one might say that those dependencies lock one into a quite particular style of coding... not a "framework" but not far from one.
Re:A simple webpack starter without a framework by SinanMtl on Sunday November 19, 2017 @09:23AM (#15733987)
Like I said in README. Bootstrap and depended javascript frameworks like jquery. Also, express.js is using to only development process. You can see dependencies in project.json. I meant "without frameworks" Vue, Angular and React-like frameworks.