mirror of
https://github.com/espocrm/espocrm.git
synced 2026-03-03 02:27:01 +00:00
build changes
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -23,3 +23,7 @@
|
||||
!/custom/Espo/Custom/.htaccess
|
||||
!/custom/Espo/Modules/.htaccess
|
||||
/install/config.php
|
||||
|
||||
client/css/espo/*
|
||||
client/lib/*
|
||||
client/modules/crm/lib/*
|
||||
|
||||
54
Gruntfile.js
54
Gruntfile.js
@@ -20,12 +20,13 @@
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
* * `grunt` - full build
|
||||
* * `grunt dev` - build only items needed for development (takes less time)
|
||||
* * `grunt offline` - build but skip *composer install*
|
||||
* * `grunt release` - full build plus upgrade packages`
|
||||
* * `grunt test` - build for tests running
|
||||
* * `grunt run-tests` - build and run unit and integration tests
|
||||
* * `grunt` - full build;
|
||||
* * `grunt dev` - build only items needed for development (takes less time);
|
||||
* * `grunt offline` - build but skip *composer install*;
|
||||
* * `grunt internal` - build only libs and css;
|
||||
* * `grunt release` - full build plus upgrade packages`;
|
||||
* * `grunt test` - build for tests running;
|
||||
* * `grunt run-tests` - build and run unit and integration tests.
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
@@ -95,7 +96,12 @@ module.exports = grunt => {
|
||||
},
|
||||
|
||||
clean: {
|
||||
start: ['build/EspoCRM-*'],
|
||||
start: [
|
||||
'build/EspoCRM-*',
|
||||
'client/lib/*',
|
||||
'client/modules/crm/lib/*',
|
||||
'client/css/espo/*',
|
||||
],
|
||||
final: ['build/tmp'],
|
||||
release: ['build/EspoCRM-' + pkg.version],
|
||||
beforeFinal: {
|
||||
@@ -136,7 +142,7 @@ module.exports = grunt => {
|
||||
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
|
||||
},
|
||||
files: {
|
||||
'build/tmp/client/espo.min.js': jsFilesToBundle,
|
||||
'client/lib/espo.min.js': jsFilesToBundle,
|
||||
},
|
||||
},
|
||||
lib: {
|
||||
@@ -148,7 +154,7 @@ module.exports = grunt => {
|
||||
options: {
|
||||
mode: true,
|
||||
},
|
||||
frontendFolders: {
|
||||
frontend: {
|
||||
expand: true,
|
||||
cwd: 'client',
|
||||
src: [
|
||||
@@ -161,19 +167,13 @@ module.exports = grunt => {
|
||||
'css/**',
|
||||
'sounds/**',
|
||||
'custom/**',
|
||||
'lib/**',
|
||||
],
|
||||
dest: 'build/tmp/client',
|
||||
},
|
||||
frontendLib: {
|
||||
files: jsFilesToCopy,
|
||||
},
|
||||
frontendCommitedLib: {
|
||||
expand: true,
|
||||
dot: true,
|
||||
cwd: 'client/lib',
|
||||
src: '**',
|
||||
dest: 'build/tmp/client/lib/',
|
||||
},
|
||||
backend: {
|
||||
expand: true,
|
||||
dot: true,
|
||||
@@ -416,17 +416,21 @@ module.exports = grunt => {
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-replace');
|
||||
|
||||
grunt.registerTask('offline', [
|
||||
'clean:start',
|
||||
'mkdir:tmp',
|
||||
|
||||
grunt.registerTask('internal', [
|
||||
'less',
|
||||
'cssmin',
|
||||
'uglify:bundle',
|
||||
'copy:frontendFolders',
|
||||
'copy:frontendLib',
|
||||
'copy:frontendCommitedLib',
|
||||
'copy:backend',
|
||||
'uglify:lib',
|
||||
]);
|
||||
|
||||
grunt.registerTask('offline', [
|
||||
'clean:start',
|
||||
'mkdir:tmp',
|
||||
'internal',
|
||||
'copy:frontend',
|
||||
'copy:backend',
|
||||
'replace',
|
||||
'clean:beforeFinal',
|
||||
'copy:final',
|
||||
@@ -521,10 +525,10 @@ function getCopyLibDataList() {
|
||||
let minify = item.minify;
|
||||
|
||||
if (item.files) {
|
||||
item.files.forEach(item => {
|
||||
item.files.forEach(item => {
|
||||
list.push({
|
||||
src: item.src,
|
||||
dest: 'build/tmp/' + (item.dest || 'client/lib/' + item.src.split('/').pop()),
|
||||
dest: item.dest || 'client/lib/' + item.src.split('/').pop(),
|
||||
minify: minify,
|
||||
});
|
||||
});
|
||||
@@ -538,7 +542,7 @@ function getCopyLibDataList() {
|
||||
|
||||
list.push({
|
||||
src: item.src,
|
||||
dest: 'build/tmp/' + (item.dest || 'client/lib/' + item.src.split('/').pop()),
|
||||
dest: item.dest || 'client/lib/' + item.src.split('/').pop(),
|
||||
minify: minify,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"scriptList": [
|
||||
"client/espo.min.js"
|
||||
"client/lib/espo.min.js"
|
||||
],
|
||||
"developerModeScriptList": [
|
||||
"client/src/loader.js",
|
||||
|
||||
4
client/css/espo/.gitignore
vendored
4
client/css/espo/.gitignore
vendored
@@ -1,4 +0,0 @@
|
||||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
|
||||
{if $isBuilt}
|
||||
<script type="text/javascript" src="../client/espo.min.js"></script>
|
||||
<script type="text/javascript" src="../client/lib/espo.min.js"></script>
|
||||
{else}
|
||||
{foreach from=$libFileList item=file}
|
||||
<script type="text/javascript" src="../{$file}"></script>
|
||||
|
||||
@@ -199,7 +199,7 @@ if (Utils::checkActionExists($action)) {
|
||||
|
||||
if (!empty($actionFile) && file_exists('install/core/tpl/' . $tplName)) {
|
||||
/* check if EspoCRM is built */
|
||||
$isBuilt = file_exists('client/espo.min.js');
|
||||
$isBuilt = file_exists('client/lib/espo.min.js');
|
||||
|
||||
$smarty->assign('isBuilt', $isBuilt);
|
||||
|
||||
|
||||
@@ -258,8 +258,8 @@ class Diff
|
||||
|
||||
libData.filesToCopy.forEach(item => fileList.push(item));
|
||||
|
||||
fileList.push('client/espo.min.js');
|
||||
fileList.push('client/espo.min.js.map');
|
||||
fileList.push('client/lib/espo.min.js');
|
||||
fileList.push('client/lib/espo.min.js.map');
|
||||
|
||||
fs.readdirSync('client/css/espo/').forEach(file => {
|
||||
fileList.push('client/css/espo/' + file);
|
||||
|
||||
8
upgrades/7.1/data.json
Normal file
8
upgrades/7.1/data.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"manifest": {
|
||||
"delete": [
|
||||
"client/espo.min.js",
|
||||
"client/espo.min.js.map"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user