1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 05:09:42 +02:00

Improve Ember build process

This commit is contained in:
Harvey Kandola 2019-01-07 14:43:56 +00:00
parent e6ddb1ec24
commit 9206e9aaa1
6 changed files with 770 additions and 716 deletions

View file

@ -10,6 +10,7 @@ call ember b -o dist-prod/ --environment=production
echo "Copying Ember assets..."
cd ..
rd /s /q embed\bindata\public
mkdir embed\bindata\public
echo "Copying Ember assets folder"

View file

@ -8,23 +8,26 @@ echo "Build process started $NOW"
echo "Building Ember assets..."
cd gui
ember b -o dist-prod/ --environment=production
ember build ---environment=production --output-path dist-prod --suppress-sizes true
cd ..
echo "Copying Ember assets..."
cd ..
rm -rf embed/bindata/public
mkdir -p embed/bindata/public
cp -r gui/dist-prod/assets embed/bindata/public
cp -r gui/dist-prod/codemirror embed/bindata/public/codemirror
cp -r gui/dist-prod/tinymce embed/bindata/public/tinymce
cp -r gui/dist-prod/prism embed/bindata/public/prism
cp -r gui/dist-prod/sections embed/bindata/public/sections
cp -r gui/dist-prod/tinymce embed/bindata/public/tinymce
cp gui/dist-prod/*.* embed/bindata
cp gui/dist-prod/favicon.ico embed/bindata/public
cp gui/dist-prod/manifest.json embed/bindata/public
rm -rf embed/bindata/mail
mkdir -p embed/bindata/mail
cp domain/mail/*.html embed/bindata/mail
cp core/database/templates/*.html embed/bindata
rm -rf embed/bindata/scripts
mkdir -p embed/bindata/scripts
mkdir -p embed/bindata/scripts/mysql

File diff suppressed because one or more lines are too long

View file

@ -13,14 +13,14 @@
<link rel="manifest" href="/manifest.json">
<link rel="shortcut icon" href="/favicon.ico?v=2" />
<link rel="icon" type="image/png" href="/favicon-32x32.png?v=2" sizes="32x32" />
<link rel="stylesheet" href="/assets/vendor.css">
<link rel="stylesheet" href="/assets/documize.css">
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link rel="stylesheet" href="{{rootURL}}assets/documize.css">
{{content-for 'head-footer'}}
</head>
<body>
{{content-for 'body'}}
<script src="/assets/vendor.js"></script>
<script src="/assets/documize.js"></script>
<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/documize.js"></script>
{{content-for 'body-footer'}}
</body>
</html>

View file

@ -1,15 +1,5 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
'use strict';
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var isDevelopment = EmberApp.env() === 'development';
@ -21,20 +11,20 @@ module.exports = function (defaults) {
fingerprintAssetMap: true,
prepend: '/',
extensions: ['js', 'css'],
exclude: ['tinymce/**', 'codemirror/**', 'flowchart/**']
exclude: ['tinymce/**', 'codemirror/**', 'prism/**']
},
minifyJS: {
enabled: !isDevelopment,
options: {
exclude: ['tinymce/**', 'codemirror/**', 'flowchart/**']
exclude: ['tinymce/**', 'codemirror/**', 'prism/**']
}
},
minifyCSS: {
enabled: !isDevelopment,
options: {
exclude: ['tinymce/**', 'codemirror/**', 'flowchart/**']
exclude: ['tinymce/**', 'codemirror/**', 'prism/**']
}
},
@ -79,3 +69,14 @@ module.exports = function (defaults) {
return app.toTree();
};
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com

View file

@ -14,7 +14,7 @@
"build": "ember build",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"start": "ember server",
"start": "ember serve",
"test": "ember test"
},
"engines": {
@ -45,6 +45,7 @@
"ember-data": "~3.5.0",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.1.0",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit": "^3.4.1",
"ember-resolver": "^5.0.1",
"ember-simple-auth": "^1.7.0",