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

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