One less Grunt dependency (minifying css)
This commit is contained in:
parent
47214108d4
commit
49d0834719
15
Gruntfile.js
15
Gruntfile.js
@ -1,19 +1,5 @@
|
|||||||
module.exports = function(grunt) {
|
module.exports = function(grunt) {
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
cssmin: {
|
|
||||||
options: {
|
|
||||||
banner: "/*"+
|
|
||||||
" * Converse.js (Web-based XMPP instant messaging client) \n"+
|
|
||||||
" * http://conversejs.org \n"+
|
|
||||||
" * Copyright (c) 2012, Jan-Carel Brand <jc@opkode.com> \n"+
|
|
||||||
" * Dual licensed under the MIT and GPL Licenses \n"+
|
|
||||||
" */"
|
|
||||||
},
|
|
||||||
minify: {
|
|
||||||
dest: 'css/converse.min.css',
|
|
||||||
src: ['css/converse.css']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
json: {
|
json: {
|
||||||
main: {
|
main: {
|
||||||
options: {
|
options: {
|
||||||
@ -28,6 +14,5 @@ module.exports = function(grunt) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
|
||||||
grunt.loadNpmTasks('grunt-json');
|
grunt.loadNpmTasks('grunt-json');
|
||||||
};
|
};
|
||||||
|
14
Makefile
14
Makefile
@ -10,6 +10,7 @@ PHANTOMJS ?= ./node_modules/.bin/phantomjs
|
|||||||
RJS ?= ./node_modules/.bin/r.js
|
RJS ?= ./node_modules/.bin/r.js
|
||||||
PO2JSON ?= ./node_modules/.bin/po2json
|
PO2JSON ?= ./node_modules/.bin/po2json
|
||||||
SASS ?= ./.bundle/bin/sass
|
SASS ?= ./.bundle/bin/sass
|
||||||
|
CLEANCSS ?= ./node_modules/.bin/cleancss
|
||||||
SPHINXBUILD ?= ./bin/sphinx-build
|
SPHINXBUILD ?= ./bin/sphinx-build
|
||||||
SPHINXOPTS =
|
SPHINXOPTS =
|
||||||
|
|
||||||
@ -38,7 +39,6 @@ help:
|
|||||||
@echo " changes Make an overview of all changed/added/deprecated items added to the documentation."
|
@echo " changes Make an overview of all changed/added/deprecated items added to the documentation."
|
||||||
@echo " clean Remove downloaded the stamp-* guard files as well as all NPM, bower and Ruby packages."
|
@echo " clean Remove downloaded the stamp-* guard files as well as all NPM, bower and Ruby packages."
|
||||||
@echo " css Generate CSS from the Sass files."
|
@echo " css Generate CSS from the Sass files."
|
||||||
@echo " cssmin Minify the CSS files."
|
|
||||||
@echo " dev Set up the development environment. To force a fresh start, run 'make clean' first."
|
@echo " dev Set up the development environment. To force a fresh start, run 'make clean' first."
|
||||||
@echo " epub Export the documentation to epub."
|
@echo " epub Export the documentation to epub."
|
||||||
@echo " html Make standalone HTML files of the documentation."
|
@echo " html Make standalone HTML files of the documentation."
|
||||||
@ -127,11 +127,14 @@ dev: stamp-bower stamp-bundler build
|
|||||||
## Builds
|
## Builds
|
||||||
|
|
||||||
.PHONY: css
|
.PHONY: css
|
||||||
css: css/converse.css
|
css: sass/*.scss css/converse.css css/converse.min.css
|
||||||
|
|
||||||
css/converse.css:: stamp-bundler stamp-bower sass
|
css/converse.css:: stamp-bundler stamp-bower sass
|
||||||
$(SASS) -I ./components/bourbon/app/assets/stylesheets/ sass/converse.scss css/converse.css
|
$(SASS) -I ./components/bourbon/app/assets/stylesheets/ sass/converse.scss css/converse.css
|
||||||
|
|
||||||
|
css/converse.min.css:: stamp-npm
|
||||||
|
$(CLEANCSS) css/converse.css > css/converse.min.css
|
||||||
|
|
||||||
.PHONY: watch
|
.PHONY: watch
|
||||||
watch: stamp-bundler
|
watch: stamp-bundler
|
||||||
$(SASS) --watch -I ./components/bourbon/app/assets/stylesheets/ sass/converse.scss:css/converse.css
|
$(SASS) --watch -I ./components/bourbon/app/assets/stylesheets/ sass/converse.scss:css/converse.css
|
||||||
@ -165,16 +168,11 @@ dist/converse-mobile.js: stamp-bower src locale components *.js
|
|||||||
.PHONY: jsmin
|
.PHONY: jsmin
|
||||||
jsmin: $(BUILDS)
|
jsmin: $(BUILDS)
|
||||||
|
|
||||||
.PHONY: cssmin
|
|
||||||
cssmin: stamp-npm
|
|
||||||
$(GRUNT) cssmin
|
|
||||||
|
|
||||||
.PHONY: dist
|
.PHONY: dist
|
||||||
dist:: build
|
dist:: build
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build:: stamp-npm
|
build:: stamp-npm css
|
||||||
$(GRUNT) cssmin
|
|
||||||
$(GRUNT) json
|
$(GRUNT) json
|
||||||
make jsmin
|
make jsmin
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Converse.js (Web-based XMPP instant messaging client)
|
* Converse.js (Web-based XMPP instant messaging client)
|
||||||
* http://conversejs.org
|
* http://conversejs.org
|
||||||
*
|
*
|
||||||
* Copyright (c) 2012-2014, JC Brand <jc@opkode.com>
|
* Copyright (c) 2012-2016, JC Brand <jc@opkode.com>
|
||||||
* Licensed under the Mozilla Public License
|
* Licensed under the Mozilla Public License
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
|
@ -33,10 +33,10 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"bower": "latest",
|
"bower": "latest",
|
||||||
|
"clean-css": "^3.4.19",
|
||||||
"greenkeeper": "^4.0.0",
|
"greenkeeper": "^4.0.0",
|
||||||
"grunt": "^1.0.1",
|
"grunt": "^1.0.1",
|
||||||
"grunt-cli": "^1.1.0",
|
"grunt-cli": "^1.1.0",
|
||||||
"grunt-contrib-cssmin": "~1.0.1",
|
|
||||||
"grunt-json": "^0.2.0",
|
"grunt-json": "^0.2.0",
|
||||||
"http-server": "^0.9.0",
|
"http-server": "^0.9.0",
|
||||||
"jquery-easing": "0.0.1",
|
"jquery-easing": "0.0.1",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Converse.js (Web-based XMPP instant messaging client)
|
* Converse.js (Web-based XMPP instant messaging client)
|
||||||
* http://conversejs.org
|
* http://conversejs.org
|
||||||
*
|
*
|
||||||
* Copyright (c) 2012-2014, JC Brand <jc@opkode.com>
|
* Copyright (c) 2012-2016, JC Brand <jc@opkode.com>
|
||||||
* Licensed under the Mozilla Public License
|
* Licensed under the Mozilla Public License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user