This commit is contained in:
yuri
2016-02-16 17:27:45 +02:00
parent 223d07579b
commit 249852c3d7
808 changed files with 167 additions and 181 deletions

13
.gitignore vendored
View File

@@ -6,15 +6,14 @@
/data/config.php
/build
/node_modules
/client
/test.php
/main.html
/frontend/client/css/espo.css
/frontend/client/css/espo-vertical.css
/frontend/client/css/sakura.css
/frontend/client/css/sakura-vertical.css
/frontend/client/css/violet.css
/frontend/client/css/violet-vertical.css
/client/css/espo.css
/client/css/espo-vertical.css
/client/css/sakura.css
/client/css/sakura-vertical.css
/client/css/violet.css
/client/css/violet-vertical.css
/tests/testData/cache/*
composer.phar
vendor/

View File

@@ -65,7 +65,7 @@ module.exports = function (grunt) {
yuicompress: true,
},
files: {
'frontend/client/css/espo.css': 'frontend/less/espo/main.less',
'client/css/espo.css': 'frontend/less/espo/main.less',
}
},
espoVertical: {
@@ -73,7 +73,7 @@ module.exports = function (grunt) {
yuicompress: true,
},
files: {
'frontend/client/css/espo-vertical.css': 'frontend/less/espo-vertical/main.less',
'client/css/espo-vertical.css': 'frontend/less/espo-vertical/main.less',
}
},
sakura: {
@@ -81,7 +81,7 @@ module.exports = function (grunt) {
yuicompress: true,
},
files: {
'frontend/client/css/sakura.css': 'frontend/less/sakura/main.less',
'client/css/sakura.css': 'frontend/less/sakura/main.less',
}
},
sakuraVertical: {
@@ -89,7 +89,7 @@ module.exports = function (grunt) {
yuicompress: true,
},
files: {
'frontend/client/css/sakura-vertical.css': 'frontend/less/sakura-vertical/main.less',
'client/css/sakura-vertical.css': 'frontend/less/sakura-vertical/main.less',
}
},
violet: {
@@ -97,7 +97,7 @@ module.exports = function (grunt) {
yuicompress: true,
},
files: {
'frontend/client/css/violet.css': 'frontend/less/violet/main.less',
'client/css/violet.css': 'frontend/less/violet/main.less',
}
},
violetVertical: {
@@ -105,7 +105,7 @@ module.exports = function (grunt) {
yuicompress: true,
},
files: {
'frontend/client/css/violet-vertical.css': 'frontend/less/violet-vertical/main.less',
'client/css/violet-vertical.css': 'frontend/less/violet-vertical/main.less',
}
}
},
@@ -113,7 +113,7 @@ module.exports = function (grunt) {
minify: {
files: {
'build/tmp/client/css/espo.css': [
'frontend/client/css/espo.css',
'client/css/espo.css',
]
}
},
@@ -124,13 +124,13 @@ module.exports = function (grunt) {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
},
'build/tmp/client/espo.min.js': jsFilesToMinify.map(function (item) {
return 'frontend/' + item;
return '' + item;
})
},
copy: {
frontendFolders: {
expand: true,
cwd: 'frontend/client',
cwd: 'client',
src: [
'src/**',
'res/**',
@@ -151,7 +151,7 @@ module.exports = function (grunt) {
frontendLib: {
expand: true,
dot: true,
cwd: 'frontend/client/lib',
cwd: 'client/lib',
src: '**',
dest: 'build/tmp/client/lib/',
},

View File

@@ -28,12 +28,8 @@ Never update composer dependencies if you are going to contribute code back.
Now you can build. Build will create compiled css files.
If your repository is accessible via a web server then you can run EspoCRM by url `http://PROJECT_URL/frontend`.
To compose a proper config.php and populate database you can run install by opening `http(s)://{YOUR_CRM_URL}/install` location in a browser. Then open `data/config.php` file and add `isDeveloperMode => true`.
### How to build
You need to have nodejs and Grunt CLI installed.

View File

@@ -66,6 +66,8 @@ class ClientManager
$htmlFilePath = $this->mainHtmlFilePath;
}
$basePath = '';
if ($this->getConfig()->get('isDeveloperMode')) {
if (file_exists('frontend/' . $htmlFilePath)) {
$htmlFilePath = 'frontend/' . $htmlFilePath;
@@ -80,6 +82,7 @@ class ClientManager
$html = str_replace('{{useCache}}', $this->getConfig()->get('useCache') ? 'true' : 'false' , $html);
$html = str_replace('{{stylesheet}}', $this->getThemeManager()->getStylesheet(), $html);
$html = str_replace('{{runScript}}', $runScript , $html);
$html = str_replace('{{basePath}}', $basePath , $html);
echo $html;
exit;

View File

Before

Width:  |  Height:  |  Size: 248 KiB

After

Width:  |  Height:  |  Size: 248 KiB

View File

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 106 KiB

View File

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

Before

Width:  |  Height:  |  Size: 613 B

After

Width:  |  Height:  |  Size: 613 B

Some files were not shown because too many files have changed in this diff Show More