rcs5.0 commit
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* @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"]);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* @Date: 2019-01-28 16:08:04
|
||||
* @Author: Scm <chengqiuhua@erayt.com>
|
||||
* @Copyright: 2015-2019 Erayt, Inc.
|
||||
* @Description: If you have some questions, please contact: chengqiuhua@erayt.com.
|
||||
*/
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
require('@erayt/titanOne-electron');
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "@erayt/titanOne-asar-app",
|
||||
"version": "0.1.0",
|
||||
"description": "titanOne3.0 base app.asar",
|
||||
"main": "./main.js",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@erayt/titanOne-electron": "^3.1.12"
|
||||
},
|
||||
"author": "SCM <chengqiuhua@erayt.com>",
|
||||
"scripts": {
|
||||
"start": "electron ."
|
||||
},
|
||||
"devDependencies": {}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "@erayt/titanOne3.5-package-app",
|
||||
"version": "0.2.0",
|
||||
"description": "titanOne3.5多应用框架模块打包app.asar工具.",
|
||||
"scripts": {
|
||||
"build": "npm run compile:electron && npm run compile:asar",
|
||||
"compile:asar": "easar pack app ../../../dist/electron/app.asar --unpack \"{init,version}.json\"",
|
||||
"compile:electron": "grunt build"
|
||||
},
|
||||
"author": "SCM",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@erayt/titanOne-dll": "^3.0.0",
|
||||
"@erayt/titanOne3.0-electron-index": "^3.0.0",
|
||||
"@erayt/titanOne3.0-electron-login": "^3.0.0",
|
||||
"grunt": "^1.0.1",
|
||||
"grunt-contrib-clean": "^1.0.0",
|
||||
"grunt-contrib-copy": "~0.8.0",
|
||||
"load-grunt-tasks": "^4.0.0",
|
||||
"time-grunt": "^1.4.0"
|
||||
},
|
||||
"devDependencies": {}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* @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 (config, ide='web') {
|
||||
|
||||
let copyTasks = {};
|
||||
let i18ns = config.i18n;
|
||||
|
||||
if(typeof i18ns === 'string'){
|
||||
i18ns = [i18ns];
|
||||
}
|
||||
|
||||
i18ns.forEach(function (i18n) {
|
||||
|
||||
copyTasks[`login_${i18n}`] = {
|
||||
expand: true,
|
||||
cwd:`<%= meta.base %>/titanOne3.0-${ide}-login/build/M/${i18n}/`,
|
||||
src: '**',
|
||||
dest: `<%= meta.dest %>/${i18n}`
|
||||
};
|
||||
copyTasks[`pro_${i18n}`] = {
|
||||
expand: true,
|
||||
cwd:`<%= meta.project %>/dist`,
|
||||
src: ['**'],
|
||||
dest: `<%= meta.dest %>/${i18n}/views/index`
|
||||
};
|
||||
|
||||
copyTasks[`asserts_${i18n}`] = {
|
||||
expand: true,
|
||||
cwd:'../asserts',
|
||||
src: '**',
|
||||
dest: `<%= meta.dest %>/${i18n}/views`
|
||||
};
|
||||
copyTasks[`vendor_${i18n}`] = {
|
||||
expand: true,
|
||||
cwd:'<%= meta.base %>/titanOne-dll/vendor',
|
||||
src: '**',
|
||||
dest: `<%= meta.dest %>/${i18n}/views/vendor/js`
|
||||
};
|
||||
copyTasks[`index_${i18n}`] = {
|
||||
expand: true,
|
||||
cwd:`<%= meta.base %>/titanOne3.0-${ide}-index/build/<%= config.schema %>/${i18n}`,
|
||||
src: ['**','!views/index/**','!views/manage/**','!views/notice/**','!views/vendor/**','!views/test/**'],
|
||||
dest: `<%= meta.dest %>/${i18n}`
|
||||
};
|
||||
});
|
||||
|
||||
return copyTasks;
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
registry=http://192.168.10.78:7001/
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* @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);
|
||||
const copyTasks = require('../utils/index')(config, 'web');
|
||||
|
||||
grunt.initConfig({
|
||||
|
||||
config: config,
|
||||
|
||||
meta: {
|
||||
base: 'node_modules/@erayt',
|
||||
project: `../../../packages/${config.projectName}`,
|
||||
dest: `../../../dist/static/${config.appModuleName}`,
|
||||
},
|
||||
|
||||
copy: Object.assign({
|
||||
config: {
|
||||
expand: true,
|
||||
cwd: '../../../config/web',
|
||||
src: `*`,
|
||||
dest: `../../../dist/static/config`,
|
||||
},
|
||||
data: {
|
||||
expand: true,
|
||||
cwd: '../../../data',
|
||||
src: `*`,
|
||||
dest: `../../../dist/static/${config.appModuleName}/data`,
|
||||
},
|
||||
}, copyTasks),
|
||||
|
||||
clean: {
|
||||
dest: '<%= meta.dest %>',
|
||||
cache: ['package-lock.json', 'yarn.lock'],
|
||||
},
|
||||
});
|
||||
|
||||
require('time-grunt')(grunt);
|
||||
// grunt plugins
|
||||
require('load-grunt-tasks')(grunt);
|
||||
grunt.registerTask('emptyFile', 'Creates an empty file', function(args,args1) {
|
||||
console.log(args, args1);
|
||||
|
||||
grunt.file.write(`${grunt.config.data.meta.dest}/version.txt`, '');
|
||||
});
|
||||
grunt.registerTask('build', ['clean:dest', 'clean', 'copy',"emptyFile"]);
|
||||
|
||||
};
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "@erayt/titanOne3.5-package-app",
|
||||
"version": "0.2.0",
|
||||
"description": "titanOne3.5多应用框架模块打包app工具.",
|
||||
"scripts": {
|
||||
"build": "grunt build --force"
|
||||
},
|
||||
"meta": {
|
||||
"moduleName": "app"
|
||||
},
|
||||
"author": "SCM",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@erayt/titanOne-dll": "^3.0.11",
|
||||
"@erayt/titanOne3.0-web-login": "^3.0.0",
|
||||
"@erayt/titanOne-vue": "^0.1.0",
|
||||
"grunt": "1.2.1",
|
||||
"grunt-contrib-clean": "1.1.0",
|
||||
"grunt-contrib-copy": "0.8.2",
|
||||
"load-grunt-tasks": "4.0.0",
|
||||
"time-grunt": "1.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user