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

Add an option to set a custom selector count limit #83

Open
TobiasEinarsson opened this issue Oct 1, 2015 · 6 comments
Open

Add an option to set a custom selector count limit #83

TobiasEinarsson opened this issue Oct 1, 2015 · 6 comments

Comments

@TobiasEinarsson
Copy link

I recently had some CSS parsing issues when my selector count reached just above 8190 and a third file was generated by Bless. In Google Chrome the selectors from the last file (which is the one with the imports in it) sometimes loaded before the others because it was very small in comparison (~20 selectors). This is most probably because of a bug in the Google Chrome CSS import code, but it would be very nice to have the possibility to manually set the limit to something lower than 4095.

@mtscout6
Copy link
Member

mtscout6 commented Oct 1, 2015

That should be an easy change, and we take pull requests. If you have specific questions with the implementation details feel free to ask.

@aabenoja aabenoja removed this from the v4.1 milestone Oct 1, 2015
@pankajpatel
Copy link

Hello, I would like to help in this enhancement. Though I am facing following error when I fire up npm test command

> bless@4.0.0 test /Library/WebServer/Documents/pankaj/github/bless
> ./run-tests
> npm run lint
> bless@4.0.0 lint /Library/WebServer/Documents/pankaj/github/bless
> eslint ./
src/chunk.js
  0:0  error  t.isReferencedIdentifier is not a function
{ same error in 13 files in src/ }
✖ 13 problems (13 errors, 0 warnings)

npm ERR! Darwin 15.4.0
npm ERR! argv "/Users/pankaj/.nvm/versions/node/v5.5.0/bin/node" "/Users/pankaj/.nvm/versions/node/v5.5.0/bin/npm" "run" "lint"
npm ERR! node v5.5.0
npm ERR! npm  v3.7.5
npm ERR! code ELIFECYCLE
npm ERR! bless@4.0.0 lint: `eslint ./`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bless@4.0.0 lint script 'eslint ./'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bless package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     eslint ./
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs bless
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls bless
npm ERR! There is likely additional logging output above.

@paulyoung
Copy link
Contributor

Possibly somehow related to #95.

@pankajpatel
Copy link

Hello,
I was looking into error, when I updated the eslint and babel-eslint, it started to work fine.
npm install eslint@2.x babel-eslint@6 --save-dev

Then in code coverage it showed error of promise undefined. So I installed promise package extraneously by
npm install promise
and referenced in every file where it threw error by adding
import Promise from 'promise'

And many errors were resolved.

What is the suggestion on adding promise package in the dependencies?

@mtscout6
Copy link
Member

Promise should come from Babel and the Babel-Runtime. There's no need to add another dependency. You will need to "compile" the JS through Babel for things to work, especially for older versions of node.

@pankajpatel
Copy link

Well running eslint alone via eslint ./ threw following errors:

/Library/WebServer/Documents/pankaj/github/bless/src/cli.js
  18:12  warning  'Promise' is not defined  no-undef

/Library/WebServer/Documents/pankaj/github/bless/src/commands/chunk.js
  27:14  warning  'Promise' is not defined  no-undef
  43:16  warning  'Promise' is not defined  no-undef

/Library/WebServer/Documents/pankaj/github/bless/src/commands/common-yargs.js
  5:48  warning  Strings must use singlequote  quotes

/Library/WebServer/Documents/pankaj/github/bless/src/count.js
  57:16  warning  'Promise' is not defined  no-undef

/Library/WebServer/Documents/pankaj/github/bless/test/cli-chunker.js
  27:19  warning  'Promise' is not defined  no-undef
  47:19  warning  'Promise' is not defined  no-undef
  60:10  warning  'Promise' is not defined  no-undef

✖ 8 problems (0 errors, 8 warnings)

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

No branches or pull requests

5 participants