Advertisement
Guest User

Untitled

a guest
May 24th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. ### Setup GRUNT on Codio
  2.  
  3. Install Grunt
  4.  
  5. npm install -g grunt-cli
  6.  
  7. Get latest Code
  8.  
  9. cd ~/workspace
  10. git pull
  11.  
  12. Create Grunt directory if it does not exist
  13.  
  14. mkdir -p ~/workspace/grunt
  15. cd ~/workspace/grunt
  16.  
  17. Setup Grunt
  18.  
  19. npm init
  20.  
  21. Open up grunt/package.json
  22.  
  23. {
  24. "name": "EMF-LESS-Compilation",
  25. "version": "1.0.0"
  26. }
  27.  
  28. Install Grunt and Components
  29.  
  30. cd ~/workspace/grunt
  31. npm install grunt --save-dev
  32. npm install grunt-contrib-less --save-dev
  33. npm install grunt-contrib-watch --save-dev
  34.  
  35. Create gruntfile.js executable
  36.  
  37. cd ~/workspace/grunt
  38. touch gruntfile.js
  39.  
  40. File should look like this:
  41.  
  42. module.exports = function(grunt) {
  43. grunt.initConfig({
  44. less: {
  45. development: {
  46. options: {
  47. paths: ["./assets/stylesheets/less"],
  48. yuicompress: true
  49. },
  50. files: {
  51. "./assets/stylesheets/css/style.css": "./assets/stylesheets/less/style.less"
  52. }
  53. }
  54. },
  55. watch: {
  56. files: "./assets/stylesheets/less/*",
  57. tasks: ["less"]
  58. }
  59. });
  60. grunt.loadNpmTasks('grunt-contrib-less');
  61. grunt.loadNpmTasks('grunt-contrib-watch');
  62. };
  63.  
  64. Edit paths in grunt.js to the LESS files you need compiled.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement