62 lines
1.9 KiB
JavaScript
62 lines
1.9 KiB
JavaScript
/*
|
|||
|
|
* @Date: 2019-12-30 11:24:58
|
||
|
|
* @Author: Scm <chengqiuhua@erayt.com>
|
||
|
|
* @Copyright: 2015-2019 Erayt, Inc.
|
||
|
|
* @Description: If you have some questions, please contact: chengqiuhua@erayt.com.
|
||
|
|
*/
|
||
|
|
module.exports = function (grunt) {
|
||
|
|
const config = require('../../utils/config')(grunt);
|
||
|
|
grunt.initConfig({
|
||
|
|
config: config,
|
||
|
|
meta: {
|
||
|
|
base: "node_modules/@erayt",
|
||
|
|
dest: "../../../dist/static/theme"
|
||
|
|
},
|
||
|
|
copy: {
|
||
|
|
// vendor_antd: {
|
||
|
|
// expand: true,
|
||
|
|
// cwd: '<%= meta.base %>/antd/dist/@erayt',
|
||
|
|
// src: ['**', '!*.js', '!**/*.map', '!**/antd.css'],
|
||
|
|
// dest: '<%= meta.dest %>/vendor/css'
|
||
|
|
// },
|
||
|
|
basic: {
|
||
|
|
expand: true,
|
||
|
|
cwd: '<%= meta.base %>/eui3.5-customize-themes/dist',
|
||
|
|
src: ['**', '!**/css/app.css', '!**/css/*.map'],
|
||
|
|
dest: '<%= meta.dest %>'
|
||
|
|
},
|
||
|
|
vendor: {
|
||
|
|
expand: true,
|
||
|
|
cwd: '<%= meta.base %>/eui2-themes/dist/<%= config.theme %>',
|
||
|
|
src: '**',
|
||
|
|
dest: '<%= meta.dest %>/vendor',
|
||
|
|
},
|
||
|
|
login: {
|
||
|
|
expand: true,
|
||
|
|
cwd: '<%= meta.base %>/titanOne3.0-theme-login/dist/<%= config.theme %>',
|
||
|
|
src: '**',
|
||
|
|
dest: '<%= meta.dest %>/login/static',
|
||
|
|
},
|
||
|
|
resources: {
|
||
|
|
expand: true,
|
||
|
|
cwd: './asserts',
|
||
|
|
src: '**',
|
||
|
|
dest: '<%= meta.dest %>'
|
||
|
|
}
|
||
|
|
},
|
||
|
|
clean: {
|
||
|
|
cache: ["package-lock.json", "yarn.lock", "<%= meta.dest %>"]
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
require("time-grunt")(grunt);
|
||
|
|
// grunt plugins
|
||
|
|
require("load-grunt-tasks")(grunt);
|
||
|
|
|
||
|
|
// Full distribution task.
|
||
|
|
grunt.registerTask("default", ["copy"]);
|
||
|
|
|
||
|
|
grunt.registerTask("build", ["clean", "copy"]);
|
||
|
|
};
|
||
|
|
|