mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
fix(dashboard/build): update gruntfile for release build
This commit is contained in:
parent
ef99b9ac49
commit
c08bcb6f5b
@ -1,5 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var util = require('util');
|
||||
|
||||
module.exports = function(grunt) {
|
||||
/*jshint maxstatements:false */
|
||||
|
||||
@ -37,7 +39,10 @@ module.exports = function(grunt) {
|
||||
|
||||
concurrent: {
|
||||
dev: {
|
||||
tasks: ['watch', /*'test-watch'*/],
|
||||
tasks: [
|
||||
'watch',
|
||||
//'test-watch'
|
||||
],
|
||||
options: {
|
||||
logConcurrentOutput: true
|
||||
}
|
||||
@ -194,6 +199,17 @@ module.exports = function(grunt) {
|
||||
dest: '<%= config.distPath %>/img'
|
||||
}]
|
||||
},
|
||||
'coreos-web': {
|
||||
files: [{
|
||||
cwd: '<%= config.appPath %>/coreos-web',
|
||||
expand: true,
|
||||
src: [
|
||||
'fonts/*',
|
||||
'img/*'
|
||||
],
|
||||
dest: '<%= config.distPath %>/coreos-web'
|
||||
}]
|
||||
},
|
||||
'dist-static': {
|
||||
files: [
|
||||
{
|
||||
@ -229,7 +245,7 @@ module.exports = function(grunt) {
|
||||
grunt.registerTask('clean-paths', 'clean up resource paths', function() {
|
||||
grunt.log.writeln('cleaning paths...');
|
||||
function clean(path) {
|
||||
return path.replace('cp/static/', '');
|
||||
return path.replace('mod/dashboard/static/', '');
|
||||
}
|
||||
['concat', 'uglify', 'cssmin'].forEach(function(task) {
|
||||
var config = grunt.config(task);
|
||||
@ -261,7 +277,7 @@ module.exports = function(grunt) {
|
||||
|
||||
grunt.registerTask('dev', [
|
||||
'clean',
|
||||
//'jshint',
|
||||
'jshint',
|
||||
'views',
|
||||
'sass',
|
||||
'concurrent:dev'
|
||||
@ -271,7 +287,7 @@ module.exports = function(grunt) {
|
||||
'clean',
|
||||
'jshint',
|
||||
'views',
|
||||
'test',
|
||||
//'test',
|
||||
'sass',
|
||||
'useminPrepare',
|
||||
'clean-paths',
|
||||
@ -283,7 +299,8 @@ module.exports = function(grunt) {
|
||||
'usemin',
|
||||
'copy:dist-static',
|
||||
'clean:dist-static',
|
||||
'copy:images'
|
||||
'copy:images',
|
||||
'copy:coreos-web'
|
||||
]);
|
||||
|
||||
grunt.registerTask('default', ['build']);
|
||||
|
@ -7,7 +7,7 @@
|
||||
<title co-title co-title-suffix=" · etcd">etcd</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<!-- build:css /cp/static/main.css -->
|
||||
<!-- build:css /mod/dashboard/static/main.css -->
|
||||
<link rel="stylesheet" href="/mod/dashboard/static/coreos-web/coreos.css">
|
||||
<link rel="stylesheet" href="/mod/dashboard/static/compiled/main.css">
|
||||
<!-- endbuild -->
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
<co-toast></co-toast>
|
||||
|
||||
<!-- build:js /cp/static/deps.js -->
|
||||
<!-- build:js /mod/dashboard/static/deps.js -->
|
||||
<script src="/mod/dashboard/static/bower_components/jquery/dist/jquery.js"></script>
|
||||
<script src="/mod/dashboard/static/bower_components/angular/angular.js"></script>
|
||||
<script src="/mod/dashboard/static/bower_components/angular-route/angular-route.js"></script>
|
||||
@ -42,11 +42,11 @@
|
||||
<script src="/mod/dashboard/static/bower_components/underscore/underscore.js"></script>
|
||||
<script src="/mod/dashboard/static/bower_components/underscore.string/lib/underscore.string.js"></script>
|
||||
<script src="/mod/dashboard/static/bower_components/d3/d3.js"></script>
|
||||
<script src="/mod/dashboard/static/coreos-web/coreos.js"></script>
|
||||
<script src="/mod/dashboard/static/coreos-web/coreos.min.js"></script>
|
||||
<script src="/mod/dashboard/static/vega.js"></script>
|
||||
<!-- endbuild -->
|
||||
|
||||
<!-- build:js /cp/static/app.js -->
|
||||
<!-- build:js /mod/dashboard/static/app.js -->
|
||||
<script src="/mod/dashboard/static/compiled/views.js"></script>
|
||||
<script src="/mod/dashboard/static/etcd-dashboard.js"></script>
|
||||
<script src="/mod/dashboard/static/module/etcd-api.js"></script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user