#SETUP Vue.js
- Install Node and npm on your machine.
http://blog.teamtreehouse.com/install-node-js-npm-mac
- Install Gulp using the command
npm install --global gulp-cli
- Run
to install all the package dependencies of vuejs like babelify etc.npm install
- Restart your web server to accumulate the changes in application_helper.rb which overrides the javascript_include_tag.
- Run the following command to precompile js assets.
gulp clean && gulp
- Now the application.js is created in public/assets/. For development purpose you can use
to watch the changes done in JS file. This will compile the JS resources everytime you save some change in JS files.gulp watch
- That's all folks!!
- Install Node and npm on the staging or prod machine.
http://blog.teamtreehouse.com/install-node-js-npm-mac
- Install Gulp using the command
npm install --global gulp-cli
- We have to run
globally to install all the node_modules. For installing globally create a copy of "package.json" file in "/var/www". Then run "npm install" in that directory.npm install
- In production.rb add a command
which runs after assets:precompile task. (Already added at the moment).gulp clean && gulp && gulp rev
P.S. This all should be done after the search page goes in production.