couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject [1/3] fauxton commit: updated refs/heads/master to 4196723
Date Tue, 05 Jan 2016 10:32:02 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 638ca1744 -> 41967231e


cleanup: do not build releases from debug / testserver dir

do not use files from the testserver or debug builds as a source
for production releases.

do not leave intermediate files in the testserver dir from
previous releases

PR: #595
PR-URL: https://github.com/apache/couchdb-fauxton/pull/595
Reviewed-By: Benjamin Keen <ben.keen@gmail.com>


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

Branch: refs/heads/master
Commit: 41967231e4404af54e12921f1d07362747c117c6
Parents: baf9ee9
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Mon Jan 4 18:31:36 2016 +0100
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Tue Jan 5 11:33:21 2016 +0100

----------------------------------------------------------------------
 Gruntfile.js         | 26 +++++++++++++++-----------
 build-helper/less.js |  2 +-
 package.json         |  7 ++++---
 3 files changed, 20 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/41967231/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index e543815..4edee3e 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -155,7 +155,7 @@ module.exports = function (grunt) {
           }
         },
         files: {
-          "dist/debug/templates.js": [
+          'dist/tmp-out/templates.js': [
             "app/templates/**/*.html",
             "app/addons/**/templates/**/*.html"
           ]
@@ -171,12 +171,12 @@ module.exports = function (grunt) {
     // index.html.
     concat: {
       requirejs: {
-        src: ["assets/js/libs/require.js", "dist/debug/templates.js", "dist/debug/require.js"],
-        dest: "dist/debug/js/require.js"
+        src: ["assets/js/libs/require.js", 'dist/tmp-out/templates.js', 'dist/tmp-out/require.js'],
+        dest: 'dist/tmp-out/require.js'
       },
 
       test_config_js: {
-        src: ["dist/debug/templates.js", "test/test.config.js"],
+        src: ['dist/tmp-out/templates.js', "test/test.config.js"],
         dest: 'test/test.config.js'
       }
     },
@@ -195,7 +195,7 @@ module.exports = function (grunt) {
       },
       style: {
         files: initHelper.watchFiles(['.less', '.css'], ["./app/**/*.css", "./app/**/*.less",
"./assets/**/*.css", "./assets/**/*.less"]),
-        tasks: ['clean:watch', 'dependencies', 'shell:build-less']
+        tasks: ['clean:watch', 'dependencies', 'shell:build-less-debug']
       },
       html: {
         // the index.html is added in as a dummy file incase there is no
@@ -217,7 +217,7 @@ module.exports = function (grunt) {
           mainConfigFile: "app/config.js",
 
           // Output file.
-          out: "dist/debug/require.js",
+          out: 'dist/tmp-out/require.js',
 
           // Root application module.
           name: "config",
@@ -335,8 +335,12 @@ module.exports = function (grunt) {
         command: 'npm run stylecheck'
       },
 
-      'build-less': {
-        command: 'npm run build:less'
+      'build-less-debug': {
+        command: 'npm run build:less:debug'
+      },
+
+      'build-less-release': {
+        command: 'npm run build:less:release'
       },
 
       'css-compress': {
@@ -496,7 +500,7 @@ module.exports = function (grunt) {
 
   // minify code and css, ready for release.
   grunt.registerTask('jsx', ['shell:build-jsx']);
-  grunt.registerTask('build', ['shell:build-less', 'jst', 'requirejs', 'concat:requirejs',
'shell:uglify',
+  grunt.registerTask('build', ['shell:build-less-release', 'jst', 'requirejs', 'concat:requirejs',
'shell:uglify',
     'shell:css-compress', 'md5:requireJS', 'md5:css', 'template:release']);
 
   /*
@@ -506,11 +510,11 @@ module.exports = function (grunt) {
   grunt.registerTask('dev', ['debugDev', 'couchserver']);
 
   // build a debug release
-  grunt.registerTask('debug', ['lint', 'dependencies', "gen_initialize:development", 'jsx',
'concat:requirejs', 'shell:build-less',
+  grunt.registerTask('debug', ['lint', 'dependencies', "gen_initialize:development", 'jsx',
'concat:requirejs', 'shell:build-less-debug',
     'template:development', 'copy:debug']);
 
   grunt.registerTask('debugDev', ['clean', 'dependencies', "gen_initialize:development",
'jsx', 'shell:stylecheck',
-    'shell:build-less', 'template:development', 'copy:debug']);
+    'shell:build-less-debug', 'template:development', 'copy:debug']);
 
   grunt.registerTask('watchRun', ['clean:watch', 'dependencies', 'shell:stylecheck']);
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/41967231/build-helper/less.js
----------------------------------------------------------------------
diff --git a/build-helper/less.js b/build-helper/less.js
index 5cf7733..e43d95b 100644
--- a/build-helper/less.js
+++ b/build-helper/less.js
@@ -1,7 +1,7 @@
 'use strict';
 
 const root = __dirname + '/../';
-const target = root + 'dist/debug/css/index.css';
+const target = root + process.argv[2];
 
 const fs = require('fs');
 const async = require('async');

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/41967231/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 26f0a95..5e588db 100644
--- a/package.json
+++ b/package.json
@@ -49,9 +49,10 @@
   },
   "scripts": {
     "stylecheck": "eslint --ext=js,jsx .",
-    "build:less": "mkdirp ./dist/debug/css && node ./build-helper/less.js",
-    "build:css-compress": "mkdirp ./dist/release/css/ && cleancss -o dist/release/css/index.css
dist/debug/css/index.css",
-    "build:uglify": "mkdirp ./dist/release/js/ && uglifyjs --mangle --compress --screw-ie8
-o dist/release/js/require.js dist/debug/js/require.js",
+    "build:less:debug": "mkdirp ./dist/debug/css && node ./build-helper/less.js dist/debug/css/index.css",
+    "build:less:release": "mkdirp ./dist/tmp-out && node ./build-helper/less.js dist/tmp-out/index.css",
+    "build:css-compress": "mkdirp ./dist/release/css/ && cleancss -o dist/release/css/index.css
dist/tmp-out/index.css",
+    "build:uglify": "mkdirp ./dist/release/js/ && uglifyjs --mangle --compress=warnings=false
--screw-ie8 -o dist/release/js/require.js dist/tmp-out/require.js",
     "test": "grunt test",
     "couchdebug": "grunt couchdebug",
     "couchdb": "grunt couchdb",


Mime
View raw message