Gruntfile.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. 'use strict';
  2. module.exports = function (grunt) {
  3. var post = ['src/client.js','src/post.js'];
  4. // Project configuration.
  5. grunt.initConfig({
  6. pkg: grunt.file.readJSON('package.json'),
  7. meta: {
  8. banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
  9. '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
  10. '<%= pkg.homepage ? " * " + pkg.homepage + "\\n" : "" %>' +
  11. ' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
  12. ' Licensed <%= pkg.license %> */\n\n'
  13. },
  14. jshint: {
  15. files: ['Gruntfile.js', 'js/*.js', 'panels/*/*.js' ],
  16. options: {
  17. bitwise: true,
  18. maxlen: 140,
  19. curly: true,
  20. eqeqeq: true,
  21. immed: true,
  22. indent: 2,
  23. latedef: true,
  24. newcap: true,
  25. noarg: true,
  26. sub: true,
  27. undef: true,
  28. boss: true,
  29. eqnull: true,
  30. globalstrict: true,
  31. devel: true,
  32. node: true,
  33. globals: {
  34. '$LAB': false,
  35. '_': false,
  36. '$': false,
  37. 'kbn' : false,
  38. window: false,
  39. document: false,
  40. exports: true,
  41. module: false,
  42. config: false,
  43. moment: false
  44. }
  45. }
  46. },
  47. less: {
  48. production: {
  49. options: {
  50. paths: ["vendor/bootstrap/less"],
  51. yuicompress:true
  52. },
  53. files: {
  54. "common/css/bootstrap.dark.min.css": "vendor/bootstrap/less/bootstrap.dark.less",
  55. "common/css/bootstrap.light.min.css": "vendor/bootstrap/less/bootstrap.light.less"
  56. }
  57. }
  58. }
  59. });
  60. // load plugins
  61. grunt.loadNpmTasks('grunt-contrib-jshint');
  62. grunt.loadNpmTasks('assemble-less');
  63. // Default task.
  64. grunt.registerTask('default', ['jshint','less']);
  65. };