42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
/*
|
|
* @Date: 2018-11-14 11:57:33
|
|
* @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);
|
|
let copyTasks = require('../utils/index')(config, 'electron');
|
|
|
|
grunt.initConfig({
|
|
|
|
config: config,
|
|
|
|
meta: {
|
|
base: "node_modules/@erayt",
|
|
dest: './app',
|
|
project: `../../../packages/${config.projectName}-pc/`
|
|
},
|
|
copy: Object.assign({
|
|
config: {
|
|
expand: true,
|
|
cwd:'../../../config/electron',
|
|
src: '*',
|
|
dest: '<%= meta.dest %>'
|
|
}
|
|
}, copyTasks),
|
|
clean: {
|
|
dest: ["<%= meta.dest %>/zh_CN/**","<%= meta.dest %>/en/**"],
|
|
cache: ["package-lock.json", "yarn.lock"]
|
|
}
|
|
});
|
|
|
|
require("time-grunt")(grunt);
|
|
// grunt plugins
|
|
require( "load-grunt-tasks" )( grunt );
|
|
|
|
grunt.registerTask("build",["clean","copy"]);
|
|
};
|
|
|