-
Notifications
You must be signed in to change notification settings - Fork 18
Howto Grunt
Follow the instructions here: http://brew.sh/.
You need a working nodejs install including the npm package manager. On a mac you can install node via homebrew with the command:
brew install node
This will install npm as well.
On windows you can use the installer.
For more info, look here: http://nodejs.org/
On linux, use apt-get to install node.
sudo apt-get install nodejs
NB Make sure not to install an package called node
here!
You need a working ruby install, because sass is written in Ruby. On Mac OS ruby is installed by default. On linux you can accomplish this by running:
sudo apt-get install ruby
- Debian, Ubuntu
For other systems, see this: https://www.ruby-lang.org/en/installation/#package-management-systems.
It's also possible to install the Ruby Version Manager (RVM). RVM is a shell wrapper for ruby, which gives you the added benefit of changing ruby versions easily and installing gems in your home dir, thus not having to use the sudo command (and many more). This is more for advanced users. The above mentioned approach should work fine, and is more suited for the live environment.
For more info, check https://rvm.io/.
You also need to install compass (a ruby gem).
gem install compass
Some systems need the use of sudo to install gems (depending on where the gems are located):
sudo gem install compass
You need to install the grunt modules for compass. This is already added to the package.json file. You can install it with the command:
npm install
It is possible that your system will complain about not having a grunt-cli available. Then install this as well
npm install grunt-cli
Your system should now be ready to render sass.
There are two grunt tasks currently available for rendering the sass.
grunt compass:dev
- for development usage. This will render the css unminified and put in debug information.
grunt compass:dist
- for distribution. The will minify the sass.
grunt watch
- this task watches the sass directory for changes, and runs the compass:dev
task if anything changes. For development.
When creating a new project, the Gruntfile has to be added to the project. You can copy one over from an existing project, and adjust the paths. You also have to either add the dependencies by hand (in the package.json file) or run npm install grunt-contrib-compass --save
to install and automatically save it to the package.json file.
- Maybe reference bluebottle in the env folder. Now it is a relative path to the bluebottle folder.