Browse Source

added css concat task

Torkel Ödegaard 11 years ago
parent
commit
877ef36bc7
5 changed files with 21 additions and 11 deletions
  1. 4 1
      package.json
  2. 0 0
      src/css/default.min.css
  3. 1 8
      src/index.html
  4. 2 2
      tasks/default_task.js
  5. 14 0
      tasks/options/concat.js

+ 4 - 1
package.json

@@ -53,5 +53,8 @@
   "scripts": {
     "test": "grunt test"
   },
-  "license": "Apache License"
+  "license": "Apache License",
+  "dependencies": {
+    "grunt-contrib-concat": "^0.4.0"
+  }
 }

File diff suppressed because it is too large
+ 0 - 0
src/css/default.min.css


+ 1 - 8
src/index.html

@@ -7,23 +7,16 @@
     <meta name="viewport" content="width=device-width">
 
     <title>Grafana</title>
-    <link rel="stylesheet" href="css/bootstrap.dark.min.css" title="Light">
-    <link rel="stylesheet" href="css/timepicker.css">
-    <link rel="stylesheet" href="css/spectrum.css">
-    <link rel="stylesheet" href="css/animate.min.css">
-    <link rel="stylesheet" href="css/normalize.min.css">
+    <link rel="stylesheet" href="css/default.min.css" title="Light">
     <!-- load the root require context -->
     <script src="vendor/require/require.js"></script>
     <script src="app/components/require.config.js"></script>
     <script>require(['app'], function () {})</script>
-    <style>
-    </style>
 
   </head>
 
   <body ng-cloak body-class>
 
-    <!--<link rel="stylesheet" ng-href="css/bootstrap.{{dashboard.current.style||'dark'}}.min.css">-->
     <link rel="stylesheet" ng-href="css/bootstrap.{{dashboard.current.style||'dark'}}.min.css">
     <link rel="stylesheet" href="css/bootstrap-responsive.min.css">
     <link rel="stylesheet" href="css/font-awesome.min.css">

+ 2 - 2
tasks/default_task.js

@@ -1,5 +1,5 @@
 // Lint and build CSS
 module.exports = function(grunt) {
-  grunt.registerTask('default', ['jshint:source', 'jshint:tests', 'less:src']);
+  grunt.registerTask('default', ['jshint:source', 'jshint:tests', 'less:src', 'concat']);
   grunt.registerTask('test', ['default', 'karma:test']);
-};
+};

+ 14 - 0
tasks/options/concat.js

@@ -0,0 +1,14 @@
+module.exports = function(config) {
+  return {
+    css: {
+      src: [
+        '<%= srcDir %>/css/normalize.min.css', 
+        '<%= srcDir %>/css/bootstrap.dark.min.css', 
+        '<%= srcDir %>/css/timepicker.css', 
+        '<%= srcDir &>/css/spectrum.css',
+        '<%= srcDir &>/css/animate.min.css'
+      ],
+      dest: '<%= srcDir %>/css/default.min.css'
+    },
+  };
+};

Some files were not shown because too many files changed in this diff