allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [2/3] allura git commit: [#8093] production mode for scss building
Date Tue, 23 Oct 2018 19:34:16 GMT
[#8093] production mode for scss building


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/d5564424
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/d5564424
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/d5564424

Branch: refs/heads/db/8093
Commit: d5564424c3e4999f69b1fd260b816c2daf72bf62
Parents: 3f509bb
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Tue Oct 23 18:54:17 2018 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Tue Oct 23 19:32:07 2018 +0000

----------------------------------------------------------------------
 Brocfile.js            | 2 +-
 package.json           | 9 ++++++---
 scripts/asf-release.sh | 5 +++--
 3 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/d5564424/Brocfile.js
----------------------------------------------------------------------
diff --git a/Brocfile.js b/Brocfile.js
index 9ac6eab..71c60f5 100644
--- a/Brocfile.js
+++ b/Brocfile.js
@@ -22,7 +22,7 @@ var funnel = require('broccoli-funnel');
 var uglifyJavaScript = require('broccoli-uglify-js');
 var mergeTrees = require('broccoli-merge-trees');
 
-var production = (process.env.BROCCOLI_ENV === 'production');
+var production = (process.env.BROCCOLI_ENV === 'production' || process.env.NODE_ENV === 'production');
 
 /* main output tree */
 var tree = funnel('Allura/allura/public/nf/js', {

http://git-wip-us.apache.org/repos/asf/allura/blob/d5564424/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index aefa566..9c09447 100644
--- a/package.json
+++ b/package.json
@@ -13,8 +13,10 @@
     "lint-es6": "eslint -c .eslintrc-es6  --ignore-path .eslintignore-es6 Allura/allura/public/**/*.es6.js
|| true",
     "lint": "npm run lint-es5 && npm run lint-es6",
     "node-sass": "node-sass",
-    "css": "node-sass --include-path node_modules/foundation-sites/scss/ --source-map true
Allura/allura/nf/responsive/scss/ --output Allura/allura/nf/responsive/css/",
-    "css-watch": "npm run css -- --watch"
+    "css": "per-env",
+    "css:development": "node-sass --include-path node_modules/foundation-sites/scss/ --source-map
true Allura/allura/nf/responsive/scss/ --output Allura/allura/nf/responsive/css/",
+    "css:production": "node-sass --include-path node_modules/foundation-sites/scss/ --output-style
compressed Allura/allura/nf/responsive/scss/ --output Allura/allura/nf/responsive/css/",
+    "css-watch": "npm run css:development -- --watch"
   },
   "repository": {
     "type": "git",
@@ -40,6 +42,7 @@
     "eslint-plugin-react": "^3.16.1",
     "esprima-fb": "^15001.1001.0-dev-harmony-fb",
     "foundation-sites": "^6.4.3",
-    "node-sass": "^4.9.4"
+    "node-sass": "^4.9.4",
+    "per-env": "^1.0.2"
   }
 }

http://git-wip-us.apache.org/repos/asf/allura/blob/d5564424/scripts/asf-release.sh
----------------------------------------------------------------------
diff --git a/scripts/asf-release.sh b/scripts/asf-release.sh
index dc1bb78..433c9c0 100755
--- a/scripts/asf-release.sh
+++ b/scripts/asf-release.sh
@@ -68,12 +68,13 @@ COMMIT_SHA=`git rev-parse $RELEASE_TAG`
 mkdir -p $RELEASE_DIR
 git archive -o $RELEASE_FILE --prefix $RELEASE_BASE/ $RELEASE_TAG
 
-# expand archive, run broccoli in it, rebuild archive
+# expand archive, run broccoli & sass in it, rebuild archive
 cd $RELEASE_DIR
 tar xzf $RELEASE_FILE
 cd $RELEASE_FILE_EXTRACTED
 npm install >/dev/null
-BROCCOLI_ENV=production npm run build
+NODE_ENV=production npm run build
+NODE_ENV=production npm run css
 rm -rf node_modules
 cd ..
 tar czf $RELEASE_FILE $RELEASE_BASE


Mime
View raw message