grunt: disallow pow and poa at the same time

This commit is contained in:
5chdn 2018-12-03 13:30:37 +01:00
parent f94779f132
commit 9650f8eb85
No known key found for this signature in database
GPG Key ID: 1A40871B597F5F80
57 changed files with 20 additions and 21 deletions

View File

@ -34,7 +34,7 @@ var styles = [
];
var src_pow = 'src/pow/';
var dest_pow = 'dist/pow/';
var dest_pow = 'dist/';
var styles_pow = [
'bootstrap.min.css',
@ -50,9 +50,9 @@ module.exports = function(grunt) {
build: ['dist'],
cleanup_js: ['dist/js/*.*', '!dist/js/netstats.*'],
cleanup_css: ['dist/css/*.css', '!dist/css/netstats.*.css'],
build_pow: ['dist/pow'],
cleanup_js_pow: ['dist/pow/js/*.*', '!dist/pow/js/netstats.*'],
cleanup_css_pow: ['dist/pow/css/*.css', '!dist/pow/css/netstats.*.css']
build_pow: ['dist'],
cleanup_js_pow: ['dist/js/*.*', '!dist/js/netstats.*'],
cleanup_css_pow: ['dist/css/*.css', '!dist/css/netstats.*.css']
},
jade: {
build: {
@ -74,7 +74,7 @@ module.exports = function(grunt) {
}
},
files: {
'dist/pow/index.html': 'src/pow/views/index.jade'
'dist/index.html': 'src/pow/views/index.jade'
}
}
},
@ -116,28 +116,28 @@ module.exports = function(grunt) {
expand: true,
cwd: 'src/pow/fonts/',
src: ['minimal-*.*'],
dest: 'dist/pow/fonts/',
dest: 'dist/fonts/',
filter: 'isFile'
},
{
expand: true,
cwd: 'src/pow/images/',
src: ['*.ico'],
dest: 'dist/pow/',
dest: 'dist/',
filter: 'isFile'
},
{
expand: true,
cwd: 'src/pow/css/',
src: styles_pow,
dest: 'dist/pow/css/',
dest: 'dist/css/',
filter: 'isFile'
},
{
expand: true,
cwd: 'src/pow/js/lib/',
src: ['*.*'],
dest: 'dist/pow/js/lib'
dest: 'dist/js/lib'
}
]
}
@ -154,9 +154,9 @@ module.exports = function(grunt) {
build_pow: {
files: [{
expand: true,
cwd: 'dist/pow/css',
cwd: 'dist/css',
src: ['*.css', '!*.min.css'],
dest: 'dist/pow/css/'
dest: 'dist/css/'
}]
}
},
@ -195,31 +195,31 @@ module.exports = function(grunt) {
options: {
sourceMap: false,
sourceMapIncludeSources: true,
sourceMapIn: ['dist/pow/js/lib/*.map']
sourceMapIn: ['dist/js/lib/*.map']
},
src: vendor,
dest: 'dist/pow/js/vendor.min.js'
dest: 'dist/js/vendor.min.js'
},
scripts : {
options: {
separator: ';\n',
},
src: scripts,
dest: 'dist/pow/js/app.js'
dest: 'dist/js/app.js'
},
netstats_pow: {
options: {
sourceMap: false,
sourceMapIncludeSources: true,
sourceMapIn: ['dist/pow/js/vendor.min.js.map', 'dist/pow/js/app.min.js.map']
sourceMapIn: ['dist/js/vendor.min.js.map', 'dist/js/app.min.js.map']
},
src: ['<%= concat.vendor.dest %>', '<%= uglify.app_pow.dest %>'],
dest: 'dist/pow/js/netstats.min.js',
dest: 'dist/js/netstats.min.js',
nonull: true,
},
css_pow: {
src: ['dist/pow/css/*.min.css', 'dist/pow/css/*.css'],
dest: 'dist/pow/css/netstats.min.css'
src: ['dist/css/*.min.css', 'dist/css/*.css'],
dest: 'dist/css/netstats.min.css'
}
},
uglify: {
@ -238,7 +238,7 @@ module.exports = function(grunt) {
sourceMap: false,
sourceMapIncludeSources: true
},
dest: 'dist/pow/js/app.min.js',
dest: 'dist/js/app.min.js',
src: ['<%= concat.scripts.dest %>']
}
}
@ -253,6 +253,5 @@ module.exports = function(grunt) {
grunt.registerTask('default', ['clean:build', 'clean:cleanup_js', 'clean:cleanup_css', 'jade:build', 'copy:build', 'cssmin:build', 'concat:vendor', 'concat:scripts', 'uglify:app', 'concat:netstats', 'concat:css', 'clean:cleanup_js', 'clean:cleanup_css']);
grunt.registerTask('pow', ['clean:build_pow', 'clean:cleanup_js_pow', 'clean:cleanup_css_pow', 'jade:build_pow', 'copy:build_pow', 'cssmin:build_pow', 'concat:vendor', 'concat:scripts', 'uglify:app_pow', 'concat:netstats_pow', 'concat:css_pow', 'clean:cleanup_js_pow', 'clean:cleanup_css_pow']);
grunt.registerTask('build', 'default');
grunt.registerTask('all', ['default', 'pow']);
grunt.registerTask('poa', 'default');
};

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 574 B

After

Width:  |  Height:  |  Size: 574 B

View File

Before

Width:  |  Height:  |  Size: 574 B

After

Width:  |  Height:  |  Size: 574 B

View File

Before

Width:  |  Height:  |  Size: 442 KiB

After

Width:  |  Height:  |  Size: 442 KiB

View File

Before

Width:  |  Height:  |  Size: 722 KiB

After

Width:  |  Height:  |  Size: 722 KiB

View File

Before

Width:  |  Height:  |  Size: 881 KiB

After

Width:  |  Height:  |  Size: 881 KiB

View File

Before

Width:  |  Height:  |  Size: 213 KiB

After

Width:  |  Height:  |  Size: 213 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB