diff --git a/package.json b/package.json index 0bcd8e06542f..ffe5760579f9 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "mocha": "~1.17.1", "less-middleware": "~0.1.15", "grunt-contrib-watch": "~0.5.3", - "grunt-contrib-jade": "~0.10.0" + "grunt-contrib-jade": "~0.10.0", + "grunt-contrib-less": "~0.9.0" }, "scripts": { "test": "grunt test", diff --git a/src/kibana/apps/examples/styles/index.less b/src/kibana/apps/examples/styles/index.less index a4519487abb4..7550f31b1edb 100644 --- a/src/kibana/apps/examples/styles/index.less +++ b/src/kibana/apps/examples/styles/index.less @@ -1,4 +1,4 @@ #examples ng-include { display: block; margin: 10px; -} \ No newline at end of file +} diff --git a/src/kibana/styles/main.less b/src/kibana/styles/main.less index 7c7836f7089b..2fb66c971462 100644 --- a/src/kibana/styles/main.less +++ b/src/kibana/styles/main.less @@ -1,6 +1,6 @@ -@import '../../bower_components/bootstrap/less/bootstrap.less'; -@import '../../bower_components/bootstrap/less/theme.less'; +@import "../../bower_components/bootstrap/less/bootstrap.less"; +@import "../../bower_components/bootstrap/less/theme.less"; body { margin: 25px; -} \ No newline at end of file +} diff --git a/tasks/config/less.js b/tasks/config/less.js new file mode 100644 index 000000000000..058206fb5938 --- /dev/null +++ b/tasks/config/less.js @@ -0,0 +1,13 @@ +module.exports = { + src: { + src: [ + '<%= app %>/styles/**/*.less', + '<%= app %>/apps/**/*.less' + ], + expand: true, + ext: '.css', + options: { + ieCompat: false + } + } +}; \ No newline at end of file diff --git a/tasks/config/watch.js b/tasks/config/watch.js index 130171e123b1..d1aaded99bde 100644 --- a/tasks/config/watch.js +++ b/tasks/config/watch.js @@ -3,6 +3,10 @@ module.exports = function (grunt) { test: { files: ['<%= unitTestDir %>/*.jade', '<%= unitTestDir %>/**/*.js'], tasks: ['jade:test', 'mocha:unit'] + }, + src: { + files: ['<%= src %>'], + tasks: ['less'] } - } + }; }; diff --git a/tasks/default.js b/tasks/default.js index 0c84401dc93c..e82b711d23b9 100644 --- a/tasks/default.js +++ b/tasks/default.js @@ -1,4 +1,4 @@ // Lint and build CSS -module.exports = function(grunt) { - grunt.registerTask('default', ['jshint:source','test']); +module.exports = function (grunt) { + grunt.registerTask('default', ['jshint:source', 'test']); }; \ No newline at end of file diff --git a/tasks/dev.js b/tasks/dev.js new file mode 100644 index 000000000000..ee4c78feec73 --- /dev/null +++ b/tasks/dev.js @@ -0,0 +1,3 @@ +module.exports = function (grunt) { + grunt.registerTask('dev', ['less', 'jade', 'connect:dev', 'watch']); +}; \ No newline at end of file