зеркало из https://github.com/mozilla/treeherder.git
Bug 1209523 - Fix grunt build minification of userguide.html
Also the s/userguide.app/userguide/ was to fix: Error: [$injector:nomod] Module 'userguide' is not available!
This commit is contained in:
Родитель
5065de4588
Коммит
a76a06b850
27
Gruntfile.js
27
Gruntfile.js
|
@ -82,6 +82,12 @@ module.exports = function(grunt) {
|
|||
file: 'dist/js/perf.min.js',
|
||||
cleanup: true
|
||||
},
|
||||
userguidejs: {
|
||||
replace: ['dist/**/*.html'],
|
||||
replacement: 'userguide.min.js',
|
||||
file: 'dist/js/userguide.min.js',
|
||||
cleanup: true
|
||||
},
|
||||
indexcss: {
|
||||
replace: ['dist/**/*.html'],
|
||||
replacement: 'index.min.css',
|
||||
|
@ -226,6 +232,27 @@ module.exports = function(grunt) {
|
|||
keepClosingSlash: true
|
||||
}
|
||||
}
|
||||
},
|
||||
userguide: {
|
||||
cwd: 'ui',
|
||||
src: 'partials/main/thShortcutTable.html',
|
||||
dest: 'dist/js/userguide.min.js',
|
||||
options: {
|
||||
usemin: 'dist/js/userguide.min.js',
|
||||
append: true,
|
||||
htmlmin: {
|
||||
collapseBooleanAttributes: true,
|
||||
collapseWhitespace: true,
|
||||
conservativeCollapse: true,
|
||||
removeAttributeQuotes: true,
|
||||
removeComments: true,
|
||||
removeEmptyAttributes: true,
|
||||
removeRedundantAttributes: true,
|
||||
removeScriptTypeAttributes: true,
|
||||
removeStyleLinkTypeAttributes: true,
|
||||
keepClosingSlash: true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
eslint: {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var userguideApp = angular.module('userguide.app', []);
|
||||
var userguideApp = angular.module('userguide', []);
|
||||
|
||||
userguideApp.config(function ($compileProvider) {
|
||||
// Disable debug data, as recommended by https://docs.angularjs.org/guide/production
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html ng-app="userguide.app">
|
||||
<html ng-app="userguide">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Treeherder User Guide</title>
|
||||
|
@ -14,10 +14,6 @@
|
|||
</head>
|
||||
|
||||
<body ng-controller="UserguideCtrl" id="userguide">
|
||||
<script src="vendor/angular/angular.js"></script>
|
||||
<script src="js/userguide.js"></script>
|
||||
<script src="js/controllers/userguide.js"></script>
|
||||
|
||||
<!-- Content panel -->
|
||||
<div class="panel panel-default">
|
||||
<!-- Header -->
|
||||
|
@ -614,5 +610,11 @@
|
|||
|
||||
<!-- End of content panel -->
|
||||
</div>
|
||||
|
||||
<!-- build:js js/userguide.min.js -->
|
||||
<script src="vendor/angular/angular.js"></script>
|
||||
<script src="js/userguide.js"></script>
|
||||
<script src="js/controllers/userguide.js"></script>
|
||||
<!-- endbuild -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
Загрузка…
Ссылка в новой задаче