build support for lib assets

This commit is contained in:
Val Erastov 2022-06-26 14:35:30 -07:00
parent 2a815361b5
commit 6abd5c6899

View file

@ -2,6 +2,7 @@
const webpack = require('webpack');
const webpackConfig = require('./webpack.config');
const del = require('del');
const libAssets = require("./build/libAssets");
const exec = require('child_process').exec;
module.exports = function(grunt) {
@ -19,7 +20,18 @@ module.exports = function(grunt) {
}
grunt.initConfig({
copy: {
lib_assets: {
files: libAssets.map(asset => ({
expand: true,
cwd: 'node_modules',
src: asset, //path.join('node_modules', asset),
dest: `dist/lib-assets/`
}))
},
resources: {
expand: true,
cwd: 'web',
@ -27,6 +39,7 @@ module.exports = function(grunt) {
dest: 'dist/',
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']);
};