To install from scratch:
- Go to the root folder of the project in terminal, cmd, or bash
- Pull from the github of the plugin, you should see an update to .gitignore to ignore /nodemodules
- You should see a Gruntfile.js
- You should see package.json
First check to see if you have the dependencies already installed
$ node -v
$ npm -v
$ ruby -v
$ sass -v
If you get a "Command not found" error instead of a version number, you will need to install the global dependency that you are missing. These should all be installed in a global fashion, as they will be needed on every greenheart repo that compiles CSS.
- Install Node: https://www.taniarascia.com/how-to-install-and-use-node-js-and-npm-mac-and-windows/
- Once you install node, you should have NPM, check with the npm -v command again. If there is a problem go here: https://www.npmjs.com/get-npm
- Install Ruby: https://www.ruby-lang.org/en/documentation/installation/
- Once you have Ruby installed go back to terminal and run this command:
$ gem install sass
Now that you have your dependencies, you should be able to run everything. Just run npm install and it will install the package.json
Everything should build, and if it looks good you can run the grunt command. If it runs without issues you are ready to compile your sass modules:
$ npm install
$ grunt
Once you are ready to edit your SCSS/SASS modules run
$ grunt watch
and you will compile your modules in real-time. Thanks!
MIT
Sass: npm node-sass -v
Ruby: ruby -v
Grunt: grunt -V