mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 16:33:15 +01:00
build support for lib assets
This commit is contained in:
parent
2a815361b5
commit
6abd5c6899
1 changed files with 21 additions and 8 deletions
27
Gruntfile.js
27
Gruntfile.js
|
|
@ -2,6 +2,7 @@
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const webpackConfig = require('./webpack.config');
|
const webpackConfig = require('./webpack.config');
|
||||||
const del = require('del');
|
const del = require('del');
|
||||||
|
const libAssets = require("./build/libAssets");
|
||||||
const exec = require('child_process').exec;
|
const exec = require('child_process').exec;
|
||||||
|
|
||||||
module.exports = function(grunt) {
|
module.exports = function(grunt) {
|
||||||
|
|
@ -19,14 +20,26 @@ module.exports = function(grunt) {
|
||||||
}
|
}
|
||||||
|
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
|
|
||||||
copy: {
|
copy: {
|
||||||
|
|
||||||
|
lib_assets: {
|
||||||
|
files: libAssets.map(asset => ({
|
||||||
|
expand: true,
|
||||||
|
cwd: 'node_modules',
|
||||||
|
src: asset, //path.join('node_modules', asset),
|
||||||
|
dest: `dist/lib-assets/`
|
||||||
|
}))
|
||||||
|
},
|
||||||
|
|
||||||
resources: {
|
resources: {
|
||||||
expand: true,
|
expand: true,
|
||||||
cwd: 'web',
|
cwd: 'web',
|
||||||
src: '**',
|
src: '**',
|
||||||
dest: 'dist/',
|
dest: 'dist/',
|
||||||
filter: dirFilter(['web/app', 'web/test'])
|
filter: dirFilter(['web/app', 'web/test'])
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -60,5 +73,5 @@ module.exports = function(grunt) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
grunt.registerTask('default', ['clean', 'build', 'copy:resources', 'mark-revision', 'show-revision']);
|
grunt.registerTask('default', ['clean', 'build', 'copy:resources', 'copy:lib_assets', 'mark-revision', 'show-revision']);
|
||||||
};
|
};
|
||||||
Loading…
Reference in a new issue