Please note, the installation instructions are for OS X only for now. I will update the document as soon as I can to help with Windows/Linux installations too.
For the JS assets precompilation we use Webpack 2. To be able to run webpack you'll need a few things to install on your machine, but don't worry, it should be quick and I tried my best to help you with a step by step guide below. Let's start!
Yay, you're sorted! To install all developer dependencies, just run
$ yarn
Which installs the NPM dependencies the project requires (as defined in the package.json
file).
The following command will precompile the JavaScript modules ready for production - all modules are bundled into 1 JS file, minified and uglified.
$ yarn build
$ yarn dev
First of all, let's install Node on your machine! We'll use NVM:
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
More info about NVM: https://github.com/creationix/nvm
You can also install Node using a download-and-click installer, which you can find here. Based on my past experience when it comes to updating/upgrading Node or NPM versions it is more difficult this way - especially when you have differrent projects with different Node versions, so if you can avoid this solution and stick with NVM.
The easiest way to install Yarn is with Homebrew (an Mac OSX package manager).
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
More info about Homebrew: https://brew.sh/
Node comes with NPM out of the box, but unfortunately it's been proven that when it comes to installing packages consistently across multiple machines, NPM isn't doing a great job. Long story short, Yarn will make sure that
Developer A's installed NPM packages (and their deps) =
Developer B's installed NPM packages (and their deps) =
Developer N's installed NPM packages (and their deps).
And Yarn is crazy fast!
So to install Yarn on your machine:
$ brew update
$ brew install yarn
More about Yarn: https://yarnpkg.com
If you know how NPM works, here is a great Yarn vs. NPM cheat sheet: https://shift.infinite.red/npm-vs-yarn-cheat-sheet-8755b092e5cc
Rob Pataki - 19/02/2017
- Add installation instructions and links to Windows users
- Add installation instructions and links to Linux users