couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject [3/3] fauxton commit: updated refs/heads/master to 4196723
Date Tue, 05 Jan 2016 10:32:04 GMT
Degruntify cssmin

Use a more modern command line tool which saves us 16K. Throw away
old grunt cruft.

old: 204K
new: 188K

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/16640f95
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/16640f95
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/16640f95

Branch: refs/heads/master
Commit: 16640f95593f47ef0b1bb5140f964feed3a8b2f6
Parents: 638ca17
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Mon Jan 4 18:12:40 2016 +0100
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Tue Jan 5 11:33:21 2016 +0100

----------------------------------------------------------------------
 Gruntfile.js | 23 +++++------------------
 package.json |  3 ++-
 2 files changed, 7 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16640f95/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index 09eed4c..5c00e44 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -181,21 +181,6 @@ module.exports = function (grunt) {
       }
     },
 
-    cssmin: {
-      compress: {
-        files: {
-          "dist/release/css/index.css": [
-            'dist/debug/css/index.css',
-            'assets/css/*.css',
-            "app/addons/**/assets/css/*.css"
-          ]
-        },
-        options: {
-          report: 'min'
-        }
-      }
-    },
-
     uglify: {
       release: {
         files: {
@@ -364,6 +349,10 @@ module.exports = function (grunt) {
         command: 'npm run build:less'
       },
 
+      'css-compress': {
+        command: 'npm run build:css-compress'
+      },
+
       stylecheckSingleFile: {
         command: '' // populated dynamically
       },
@@ -491,7 +480,6 @@ module.exports = function (grunt) {
   grunt.loadNpmTasks('grunt-contrib-jst');
   grunt.loadNpmTasks('grunt-contrib-concat');
   grunt.loadNpmTasks('grunt-contrib-uglify');
-  grunt.loadNpmTasks('grunt-contrib-cssmin');
   grunt.loadNpmTasks('grunt-shell');
   grunt.loadNpmTasks('grunt-md5');
 
@@ -514,10 +502,9 @@ module.exports = function (grunt) {
   grunt.registerTask('dependencies', ['get_deps', 'gen_load_addons:default']);
 
   // minify code and css, ready for release.
-  grunt.registerTask('minify', ['uglify', 'cssmin:compress']);
   grunt.registerTask('jsx', ['shell:build-jsx']);
   grunt.registerTask('build', ['shell:build-less', 'jst', 'requirejs', 'concat:requirejs',
'uglify',
-    'cssmin:compress', 'md5:requireJS', 'md5:css', 'template:release']);
+    'shell:css-compress', 'md5:requireJS', 'md5:css', 'template:release']);
 
   /*
    * Build the app in either dev, debug, or release mode

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16640f95/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 799fdd9..4114e2e 100644
--- a/package.json
+++ b/package.json
@@ -17,6 +17,7 @@
   },
   "dependencies": {
     "async": "~0.2.6",
+    "clean-css": "^3.4.9",
     "couchapp": "~0.11.0",
     "eslint": "^1.6.0",
     "grunt": "~0.4.1",
@@ -25,7 +26,6 @@
     "grunt-contrib-clean": "~0.4.1",
     "grunt-contrib-concat": "~0.3.0",
     "grunt-contrib-copy": "~0.4.1",
-    "grunt-contrib-cssmin": "~0.5.0",
     "grunt-contrib-jst": "~0.5.0",
     "grunt-contrib-requirejs": "~0.4.1",
     "grunt-contrib-uglify": "~0.2.0",
@@ -50,6 +50,7 @@
   "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",
     "test": "grunt test",
     "couchdebug": "grunt couchdebug",
     "couchdb": "grunt couchdb",


Mime
View raw message