#Bare-Bones Angular 2 & Webpack Configuration
I needed a bare-bones version of Angular 2 & Webpack to use so I could create new projects.
So I made this. And, if you're reading this, you can use it too.
Oh, and it comes with some light scaffolding capabilities.
As of now, you'll need Node 5.0+ & NPM to get this all working. But let me suggest nvm or n to manage multiple versions of Node & NPM.
It's pretty darn simple:
- Clone this repository (I would fire up a console/terminal and run
git clone https://github.com/gonzofish/ng2-webpack-bare
)- Run
git clone https://github.com/gonzofish/ng2-webpack-bare my-new-app
to clone it to a directory namedmy-new-app
instead ofng2-webpack-bare
.
- Run
- Change into the directory from the previous step.
- Run
npm i
(an alias fornpm install
)...this could take a while, sorry.
You're pretty much ready to go! Check out the next section to see how to easily make the cloned repository your own.
This repo also has a scaffolding component to it. It uses my super-light scaffolding library, called Balsa to ask you questions & generate files. Balsa has zero dependencies and only uses Node.js built-in functions. I also built a setup to use Balsa specific for Angular 2 & Webpack, creatively named ng2-webpack-balsa.
Please see the ng2-webpack-balsa repository for a list of available
commands. All comands are available by using npm run balsa
.
Besides the scaffolding I created some NPM scripts you can use, too (via npm run
):
balsa
: run Balsa scaffoldingbuild
: creates the distribution bundlelink
: checks code for errorsstart
: runs the Webpack dev servertest
: runs unit teststest:headless
: runs unit tests ONLY in PhantomJS