Skip to content

Commit

Permalink
Fix #377
Browse files Browse the repository at this point in the history
  • Loading branch information
gashcrumb committed Jun 26, 2013
1 parent 66a5366 commit 8e4aa48
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
18 changes: 16 additions & 2 deletions hawtio-web/GruntFile.js
Expand Up @@ -5,6 +5,7 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-type');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-less');

/*
grunt.loadNpmTasks('grunt-typescript');
Expand Down Expand Up @@ -46,6 +47,19 @@ module.exports = function (grunt) {
}
}
},
less: {
options: {
paths: ['src/main/webapp/css']
},
src: {
expand: true,
cwd: 'src/main/webapp/css',
src: '*.less',
ext: '.css',
dest: "<%= grunt.option('webapp_outdir') %>/css"
}

},
copy:{
dist: {
files: [
Expand Down Expand Up @@ -86,9 +100,9 @@ module.exports = function (grunt) {


// Default task.
grunt.registerTask('default', ['clean-appjs', 'type', 'concat', 'copy']);
grunt.registerTask('default', ['clean-appjs', 'type', 'concat', 'copy', 'less']);

// watch source for changes
grunt.registerTask('watchSrc', ['clean-appjs', 'type', 'concat', 'copy', 'watch']);
grunt.registerTask('watchSrc', ['clean-appjs', 'type', 'concat', 'copy', 'less', 'watch']);

};
1 change: 1 addition & 0 deletions hawtio-web/package.json
Expand Up @@ -35,6 +35,7 @@
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-watch": "~0.4.4",
"grunt-contrib-nodeunit": "~0.2.0",
"grunt-contrib-less": "~0.6.1",
"grunt-type": "~0.9.0"
},
"analyze": true,
Expand Down
18 changes: 3 additions & 15 deletions hawtio-web/src/main/webapp/index.html
Expand Up @@ -32,10 +32,9 @@
<link rel='stylesheet' href='css/codemirror/themes/xq-dark.css' type='text/css'>
<link rel='stylesheet' href='css/toastr.css' type='text/css'>

<link rel='stylesheet/less' href='css/site-base.less' type='text/css'>

<link rel='stylesheet/less' media='screen and (min-width: 980px)' href='css/site-wide.less' type='text/css'>
<link rel='stylesheet/less' media='screen and (max-width: 979px)' href='css/site-narrow.less' type='text/css'>
<link rel='stylesheet' href='css/site-base.css' type='text/css'>
<link rel='stylesheet' media='screen and (min-width: 980px)' href='css/site-wide.css' type='text/css'>
<link rel='stylesheet' media='screen and (max-width: 979px)' href='css/site-narrow.css' type='text/css'>

<link rel='icon' type='image/ico' href='favicon.ico'>

Expand Down Expand Up @@ -209,16 +208,5 @@
<!-- google maps -->
<script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script>

<!-- less -->
<!-- TODO - enable for development only -->
<script type="text/javascript">
less = {
async: false,
poll: 1000,
dumpLineNumbers: 'comments'
};
</script>
<script src="lib/less-1.3.3.min.js" type="text/javascript"></script>

</body>
</html>

0 comments on commit 8e4aa48

Please sign in to comment.