Skip to content

Commit

Permalink
Bumpup v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
t32k committed Aug 14, 2016
1 parent 74c7469 commit 97223eb
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 31 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
language: node_js
node_js:
- "5"
- "4"
- "0.12"
- "6"
sudo: false
cache:
directories:
- node_modules
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = function (grunt) {
},
restructure: {
options: {
restructuring: false,
restructure: false,
report: 'min'
},
files: {
Expand Down
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,6 @@

> Minify CSS files with CSSO.
## Getting Started
This plugin requires Grunt `>=0.4.0`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-csso --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of js:

```js
grunt.loadNpmTasks('grunt-csso');
```

*This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that [you upgrade](http://gruntjs.com/upgrading-from-0.3-to-0.4).*


## CSSO task

Run this task with the `grunt csso` command.
Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"name": "grunt-csso",
"description": "Minify CSS files with CSSO.",
"version": "1.0.0",
"version": "2.0.0",
"homepage": "https://github.com/t32k/grunt-csso",
"author": {
"name": "Koji Ishimoto",
"email": "[email protected]",
"url": "http://t32k.me"
"url": "http://t32k.me/"
},
"repository": {
"type": "git",
Expand All @@ -16,18 +15,18 @@
"url": "https://github.com/t32k/grunt-csso/issues"
},
"engines": {
"node": ">=0.12.0"
"node": ">=4.0.0"
},
"scripts": {
"grunt": "grunt",
"test": "grunt test"
},
"peerDependencies": {
"grunt": ">=0.4.0"
"grunt": ">=1.0.0"
},
"dependencies": {
"chalk": "^1.1.3",
"csso": "^1.8.1",
"csso": "^2.2.1",
"maxmin": "^2.1.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions tasks/csso.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = function (grunt) {
grunt.registerMultiTask('csso', 'Minify CSS files with CSSO.', function () {

var options = this.options({
restructuring: true,
restructure: true,
banner: '',
report: false,
debug: false
Expand Down Expand Up @@ -55,8 +55,8 @@ module.exports = function (grunt) {
}).join(grunt.util.normalizelf(grunt.util.linefeed));

// reverse flag
console.log(options.restructuring);
var proceed = csso.minify(original, { restructuring: options.restructuring, debug: options.debug });
console.log(options.restructure);
var proceed = csso.minify(original, { restructure: options.restructure, debug: options.debug }).css;

if (proceed.length === 0) {
grunt.log.warn('Destination is not created because minified CSS was empty.');
Expand Down
2 changes: 1 addition & 1 deletion test/csso-test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var fs = require('fs');
const fs = require('fs');

exports.csso = {
main: function (test) {
Expand Down

0 comments on commit 97223eb

Please sign in to comment.