浏览代码

fix(build): fixed build issues with concat not including require_config

Torkel Ödegaard 10 年之前
父节点
当前提交
8eb3e48bc7
共有 4 个文件被更改,包括 9 次插入9 次删除
  1. 1 1
      package.json
  2. 4 4
      public/views/index.html
  3. 3 3
      tasks/build_task.js
  4. 1 1
      tasks/options/concat.js

+ 1 - 1
package.json

@@ -21,7 +21,7 @@
     "grunt-contrib-connect": "~0.5.0",
     "grunt-contrib-copy": "~0.5.0",
     "grunt-contrib-cssmin": "~0.6.1",
-    "grunt-contrib-htmlmin": "~0.1.3",
+    "grunt-contrib-htmlmin": "~0.6.0",
     "grunt-contrib-jshint": "~0.10.0",
     "grunt-contrib-less": "~0.7.0",
     "grunt-contrib-requirejs": "~0.4.4",

+ 4 - 4
public/views/index.html

@@ -9,15 +9,15 @@
     <title>Grafana</title>
 
 		[[if .User.LightTheme]]
-		  <link rel="stylesheet" href="[[.AppSubUrl]]/css/grafana.light.min.css">
+		  <link rel="stylesheet" href="[[.AppSubUrl]]/public/css/grafana.light.min.css">
 		[[else]]
-		  <link rel="stylesheet" href="[[.AppSubUrl]]/css/grafana.dark.min.css">
+		  <link rel="stylesheet" href="[[.AppSubUrl]]/public/css/grafana.dark.min.css">
 		[[end]]
 
-    <link rel="icon" type="image/png" href="[[.AppSubUrl]]/img/fav32.png">
+    <link rel="icon" type="image/png" href="[[.AppSubUrl]]/public/img/fav32.png">
 		<base href="[[.AppSubUrl]]/" />
 
-		<!-- build:js [[.AppSubUrl]]/app/app.js -->
+		<!-- build:js [[.AppSubUrl]]/public/app/app.js -->
     <script src="[[.AppSubUrl]]/public/vendor/requirejs/require.js"></script>
     <script src="[[.AppSubUrl]]/public/app/require_config.js"></script>
     <!-- endbuild -->

+ 3 - 3
tasks/build_task.js

@@ -13,7 +13,7 @@ module.exports = function(grunt) {
     'karma:test',
     'phantomjs',
     'css',
-    'htmlmin:build',
+    // 'htmlmin:build',
     'ngtemplates',
     'cssmin:build',
     'ngAnnotate:build',
@@ -34,8 +34,8 @@ module.exports = function(grunt) {
 
     for(var key in summary){
       if(summary.hasOwnProperty(key)){
-        var orig = key.replace(root, root+'/[[.AppSubUrl]]');
-        var revved = summary[key].replace(root, root+'/[[.AppSubUrl]]');
+        var orig = key.replace(root, root+'/[[.AppSubUrl]]/public');
+        var revved = summary[key].replace(root, root+'/[[.AppSubUrl]]/public');
         fixed[orig] = revved;
       }
     }

+ 1 - 1
tasks/options/concat.js

@@ -27,7 +27,7 @@ module.exports = function(config) {
     js: {
       src: [
         '<%= tempDir %>/vendor/requirejs/require.js',
-        '<%= tempDir %>/app/components/require.config.js',
+        '<%= tempDir %>/app/require_config.js',
         '<%= tempDir %>/app/app.js',
       ],
       dest: '<%= genDir %>/app/app.js'