Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
upgrade sass to 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
breezewish committed May 17, 2015
1 parent 81dfa97 commit 66a31a6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var onHeaders = require('on-headers');

var uglifyjs = require('uglify-js');
var cssmin = require('cssmin');
JSON.minify = require("node-json-minify");
var jsonMinify = require("node-json-minify");
var sass;
var less;
var stylus;
Expand Down Expand Up @@ -62,7 +62,7 @@ function minifyIt(type, options, content, callback) {
try {
result = sass.renderSync({
data: content
}).css;
}).css.toString();
try {
if (!options.noMinify) {
result = cssmin(result);
Expand Down Expand Up @@ -135,7 +135,7 @@ function minifyIt(type, options, content, callback) {
var result = content;
try {
if (!options.noMinify) {
result = JSON.minify(content);
result = jsonMinify(content);
}
} catch(err) {
}
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@
"url": "git://github.com/breeswish/express-minify.git"
},
"dependencies": {
"coffee-script": "^1.9.0",
"cssmin": "^0.4.2",
"less": "^2.4.0",
"coffee-script": "^1.9.2",
"cssmin": "^0.4.3",
"less": "^2.5.0",
"node-json-minify": "^0.1.3-a",
"node-sass": "^2.0.1",
"node-sass": "^3.1.1",

This comment has been minimized.

Copy link
@Martii

Martii May 22, 2015

@summerwish
Failure in dep upgrade with SunOS systems... details at OpenUserJS/OpenUserJS.org#631 and OpenUserJS/OpenUserJS.org#632 ... we have downgraded on production/dev and all is well so this should probably be retested in your package. Thanks. :)

This comment has been minimized.

Copy link
@breezewish

breezewish May 23, 2015

Author Owner

I think we should not downgrade node-sass because of it not supporting SunOS currently. Open issues on node-sass and update it when the issue got fixed would be the best solution.
Currently you can downgrade express-minify. I would pay attention to this issue.

This comment has been minimized.

Copy link
@breezewish

breezewish May 23, 2015

Author Owner

I'm trying to separate SASS and other precompiling stuff to another package. It also can solve your issue here. Still thinking about the caching layer (support memory or file as a backend, support other backends would be great). Do you have some recommendations?

This comment has been minimized.

Copy link
@breezewish

breezewish May 23, 2015

Author Owner

Add: the cache layer should support LRU or other invalidating algorithms..

This comment has been minimized.

Copy link
@Martii

Martii May 26, 2015

I'm trying to separate SASS and other precompiling stuff to another package. It also can solve your issue here.

That sounds useful.

... not supporting SunOS currently.

What platforms your project decides on to support is up to you but OpenSolaris is out there... so just a thought. Our project is in the works of going to IA since node-sass just can't keep up with the times for all platforms... I'm trying my best to keep this package/project in ours as I do like it's simplicity and feature set.

Do you have some recommendations?

Not at this time because I'm dealing with platform migration issues at the moment.

This comment has been minimized.

Copy link
@breezewish

breezewish May 27, 2015

Author Owner

I removed coffee-script, less, node-sass, stylus dependencies. They become optional. You should now be able to use the latest express-minify on SunOS if you dont use sass.

"on-headers": "^1.0.0",
"stylus": "^0.50.0",
"uglify-js": "^2.4.16"
"stylus": "^0.51.1",
"uglify-js": "^2.4.21"
},
"devDependencies": {
"mocha": "^2.1.0",
"supertest": "^0.15.0",
"should": "^5.0.0",
"mocha": "^2.2.5",
"supertest": "^1.0.1",
"should": "^6.0.1",
"async": "^0.9.0",
"compression": "^1.4.0"
"compression": "^1.4.4"
},
"scripts": {
"test": "mocha --check-leaks --reporter dot"
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ function init(callback) {
minifyFunc.sass = function(content, callback) {
var css = sass.renderSync({
data: content
}).css;
}).css.toString();
callback({
processed: css,
minified: cssmin(css)
Expand Down

2 comments on commit 66a31a6

@PeterDaveHello
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems there are some works with nothing to do with sass upgrading?

@breezewish
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄 you are so sharp-eyed !

Please sign in to comment.