Skip to content

Commit

Permalink
Dev: rebuild minified adminbasics
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Sep 3, 2019
1 parent 7a8435b commit de19668
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -19,6 +19,7 @@
!.travis.yml
!.babelrc
!.eslintrc
!.env-cmdrc


# upload directory : whole except the index.html and readme.txt
Expand Down
10 changes: 1 addition & 9 deletions application/config/packages.php
Expand Up @@ -246,16 +246,8 @@
'devBaseUrl' => 'assets/packages/adminbasics/',
'basePath' => 'core.adminbasics',
'position' =>CClientScript::POS_HEAD,
// 'css' => array(
// 'css/lime-admin-common.css',
// 'css/jcarousel.responsive.css',
// 'css/attributeMap.css',
// 'css/attributeMapToken.css',
// 'css/displayParticipants.css',
// 'build/adminbasics'.(($debug > 0) ? '' : '.min').'.css',
// ),
'js' => array(
'build/adminbasics'.(($debug > 0) ? '' : '.min').'.js',
'build/adminbasics'.$minVersion.'.js',
),
'depends' => array(
'jquery',
Expand Down
8 changes: 8 additions & 0 deletions assets/packages/adminbasics/.env-cmdrc
@@ -0,0 +1,8 @@
{
"dev": {
"NODE_ENV": "developement"
},
"prod": {
"NODE_ENV": "production"
}
}
2 changes: 1 addition & 1 deletion assets/packages/adminbasics/build/adminbasics.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/packages/adminbasics/build/adminbasics.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/packages/adminbasics/build/adminbasics.rtl.min.css

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions assets/packages/adminbasics/package.json
Expand Up @@ -3,11 +3,9 @@
"license": "GPL-3.0",
"author": "LimeSurvey DevTeam",
"scripts": {
"devltr": "env-cmd -e devltr rollup -c",
"devrtl": "env-cmd -e devrtl rollup -c",
"buildltr": "env-cmd -e prodltr rollup -c",
"buildrtl": "env-cmd -e prodrtl rollup -c",
"build": "yarn run devltr && yarn run buildltr"
"dev": "env-cmd -e dev rollup -c",
"prod": "env-cmd -e prod rollup -c",
"build": "yarn run dev && yarn run prod"
},
"devDependencies": {
"@babel/core": "^7.4.4",
Expand Down
7 changes: 2 additions & 5 deletions assets/packages/adminbasics/rollup.config.js
Expand Up @@ -7,9 +7,8 @@ import { terser } from "rollup-plugin-terser";
import WriteRTLCSS from './buildplugins/rollup-plugin-writertlcss';

const ENVIRONEMENT = process.env.NODE_ENV.trim();
const DIRECTION = process.env.DIRECTION_ENV.trim();

console.log(`Building adminbasics for mode ${ENVIRONEMENT} and direction ${DIRECTION}`);
console.log(`Building adminbasics for mode ${ENVIRONEMENT}`);


let plugins = [];
Expand All @@ -24,8 +23,7 @@ if( ENVIRONEMENT=='production' ) {
plugins = [
replace({
ENVENVIRONEMENT:ENVIRONEMENT,
'process.env.NODE_ENV': ENVIRONEMENT,
ENVDIRECTION:DIRECTION,
'process.env.NODE_ENV': JSON.stringify(ENVIRONEMENT),
'process.env.VUE_ENV': JSON.stringify('browser')
}),
babel({exclude: 'node_modules/**'}),
Expand All @@ -45,7 +43,6 @@ if( ENVIRONEMENT=='production' ) {
replace({
ENVENVIRONEMENT:ENVIRONEMENT,
'process.env.NODE_ENV': JSON.stringify(ENVIRONEMENT),
ENVDIRECTION:DIRECTION,
'process.env.VUE_ENV': JSON.stringify('browser')
}),
babel({exclude: 'node_modules/**'}),
Expand Down
8 changes: 8 additions & 0 deletions assets/packages/lstutorial/.env-cmdrc
@@ -0,0 +1,8 @@
{
"dev": {
"NODE_ENV": "developement"
},
"prod": {
"NODE_ENV": "production"
}
}

0 comments on commit de19668

Please sign in to comment.