Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to bless ~4.0.0 #15

Closed
adam-lynch opened this issue Apr 28, 2015 · 13 comments
Closed

Upgrade to bless ~4.0.0 #15

adam-lynch opened this issue Apr 28, 2015 · 13 comments

Comments

@adam-lynch
Copy link
Member

No description provided.

@adam-lynch
Copy link
Member Author

4 isn't out yet. Need to do this on a branch.

@mtscout6
Copy link
Member

We just pushed v4.0.0-alpha.0 to npm today! Please let us know how it works for you so we can be confident about getting the actual release out. Also, the Bless project has a new home at https://github.com/BlessCSS/bless. Since it is now in a github organization we'd also like to extend the invitation to transfer this repo there and add you as a member of the organization. The goal being to consolidate and document bless and it's usage with different build tools. Our main focus will be towards Gulp, Grunt, Webpack, and possibly Browserify. If you have any questions feel free to reach out in our issue log or hit us up on gitter at https://gitter.im/BlessCSS/bless

@BrandonNoad
Copy link

It looks like bless v4.0.0 was released/pushed to npm today: BlessCSS/bless#89

Is it possible to update gulp-bless to use it?

Thanks

@adam-lynch
Copy link
Member Author

@BrandonNoad will take a look

@aabenoja
Copy link
Member

This might resolve BlessCSS/bless#92

@adam-lynch
Copy link
Member Author

Ok, I think it's ready. It would be good if you two could test #21 please;

npm install adam-lynch/gulp-bless#bless4

@BrandonNoad
Copy link

When I try to build my css assets, I'm getting this when using adam-lynch/gulp-bless#bless4:

events.js:154
      throw er; // Unhandled 'error' event
      ^
TypeError: Cannot read property 'reduce' of undefined
    at countRules (/Users/brandon/code/bonfire/app/node_modules/bless/lib/count.js:26:17)
    at count (/Users/brandon/code/bonfire/app/node_modules/bless/lib/count.js:44:14)
    at chunks$ (/Users/brandon/code/bonfire/app/node_modules/bless/lib/chunk.js:52:46)
    at tryCatch (/Users/brandon/code/bonfire/app/node_modules/babel-runtime/regenerator/runtime.js:72:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/brandon/code/bonfire/app/node_modules/babel-runtime/regenerator/runtime.js:334:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/brandon/code/bonfire/app/node_modules/babel-runtime/regenerator/runtime.js:105:21)
    at chunk (/Users/brandon/code/bonfire/app/node_modules/bless/lib/chunk.js:98:113)
    at Object.chunk (/Users/brandon/code/bonfire/app/node_modules/bless/lib/index.js:34:33)
    at Transform._transform (/Users/brandon/code/bonfire/app/node_modules/gulp-bless/index.js:33:36)
    at Transform._read (/Users/brandon/code/bonfire/app/node_modules/gulp-bless/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at Transform._write (/Users/brandon/code/bonfire/app/node_modules/gulp-bless/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (/Users/brandon/code/bonfire/app/node_modules/gulp-bless/node_modules/readable-stream/lib/_stream_writable.js:237:10)
    at writeOrBuffer (/Users/brandon/code/bonfire/app/node_modules/gulp-bless/node_modules/readable-stream/lib/_stream_writable.js:227:5)
    at Transform.Writable.write (/Users/brandon/code/bonfire/app/node_modules/gulp-bless/node_modules/readable-stream/lib/_stream_writable.js:194:11)
    at DestroyableTransform.ondata (/Users/brandon/code/bonfire/app/node_modules/readable-stream/lib/_stream_readable.js:583:20)
    at emitOne (events.js:90:13)
Segmentation fault: 11

@adam-lynch
Copy link
Member Author

@BrandonNoad hmm :/. I'm not sure why that is. It looks like a problem with bless itself. @mtscout6 @paulyoung any ideas?

Disclaimer: I'm completely guessing here. Bless (or a dependency) parses your CSS (AST) so maybe some invalid CSS could cause an issue. I know the stack trace shows the problem is in node_modules/bless/lib/counts.js but maybe that's just a symptom shown at a later stage. Plus you know, I'm completely guessing 😄.

@BrandonNoad
Copy link

Ya, I noticed the error was in the bless module. I'm using gulp-sass to compile sass to css, and it's not throwing any errors, so I'm assuming the css is valid. Maybe the errors aren't being logged properly though...I'll have to double-check that. I'll do a bit of digging to see if I can find the root cause of the problem.

@mtscout6
Copy link
Member

If you can provide a simple CSS input that would cause this error it would really help us dig into what the problem is exactly.

@BrandonNoad
Copy link

I've narrowed it down to 2 files in the foundation-sites (v5.5.3) library (the type and offcanvas components). I'll try to find the exact cause tomorrow.

@BrandonNoad
Copy link

The following css rule when run through bless seems to cause the error:

@page {
  margin: 0.34in; 
}

https://www.w3.org/TR/css3-page/#page-box-page-rule

@adam-lynch
Copy link
Member Author

OK I see there's a bless core issue. I'll close this and publish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants