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

Readme seems to be wrong? #430

Closed
callumlocke opened this issue Jan 7, 2015 · 7 comments
Closed

Readme seems to be wrong? #430

callumlocke opened this issue Jan 7, 2015 · 7 comments

Comments

@callumlocke
Copy link

How to use clean-css programmatically?

var CleanCSS = require('clean-css');
var source = 'a{font-weight:bold;}';
var minimized = new CleanCSS().minify(source).styles;

This gives me undefined. When I remove the .styles, it works.

@jakubpawlowicz
Copy link
Collaborator

@callumlocke I guess you use clean-css 2.x as API changed in 3.x - https://github.com/jakubpawlowicz/clean-css#how-to-upgrade-clean-css-from-2x-to-3x

@callumlocke
Copy link
Author

I did npm install clean-css as per the readme, so I should have whatever the latest published version is. Is v3 not published?

@jakubpawlowicz
Copy link
Collaborator

3.0.2 is the latest published version. What clean-css -v says?

@callumlocke
Copy link
Author

I did npm install clean-css this morning, and it gave me 2.2.23.

Also ran npm info clean-css... It shows that some 3.x versions do exist, but it says the "latest" is 2.2.23. I don't know why that would be, I've never encountered that before.

$ npm info clean-css
npm http GET https://registry.npmjs.org/clean-css
npm http 304 https://registry.npmjs.org/clean-css

{ name: 'clean-css',
  description: 'A well-tested CSS minifier',
  'dist-tags': { latest: '2.2.23' },
  versions:
   [ '0.1.0',
     '0.2.0',
     '0.2.1',
     '0.2.2',
     '0.2.3',
     '0.2.4',
     '0.2.5',
     '0.2.6',
     '0.3.0',
     '0.3.1',
     '0.3.2',
     '0.3.3',
     '0.4.0',
     '0.4.1',
     '0.4.2',
     '0.5.0',
     '0.6.0',
     '0.7.0',
     '0.8.0',
     '0.8.1',
     '0.8.2',
     '0.8.3',
     '0.9.0',
     '0.9.1',
     '0.10.0',
     '0.10.1',
     '0.10.2',
     '1.0.0',
     '1.0.1',
     '1.0.2',
     '1.0.3',
     '1.0.4',
     '1.0.5',
     '1.0.6',
     '1.0.7',
     '1.0.8',
     '1.0.9',
     '1.0.10',
     '1.0.11',
     '1.0.12',
     '1.1.0',
     '1.1.1',
     '1.1.2',
     '1.1.3',
     '1.1.4',
     '1.1.5',
     '1.1.6',
     '1.1.7',
     '2.0.0',
     '2.0.1',
     '2.0.2',
     '2.0.3',
     '2.0.4',
     '2.0.5',
     '2.0.6',
     '2.0.7',
     '2.0.8',
     '2.1.0',
     '2.1.1',
     '2.1.2',
     '2.1.3',
     '2.1.4',
     '2.1.5',
     '2.1.6',
     '2.1.7',
     '2.1.8',
     '2.2.0',
     '2.2.1',
     '2.2.2',
     '2.2.3',
     '2.2.4',
     '2.2.5',
     '2.2.6',
     '2.2.7',
     '2.2.8',
     '2.2.9',
     '2.2.10',
     '2.2.11',
     '2.2.12',
     '2.2.13',
     '2.2.14',
     '2.2.15',
     '2.2.16',
     '2.2.17',
     '2.2.18',
     '2.2.19',
     '2.2.20',
     '2.2.21',
     '2.2.22',
     '2.2.23',
     '3.0.0',
     '3.0.1',
     '3.0.2' ],
  maintainers: 'goalsmashers <jakub@goalsmashers.com>',
  time:
   { modified: '2015-01-04T10:59:02.073Z',
     created: '2011-02-28T19:38:45.669Z',
     '0.1.0': '2011-02-28T19:38:46.238Z',
     '0.2.0': '2011-03-02T21:05:01.592Z',
     '0.2.1': '2011-03-20T18:50:12.374Z',
     '0.2.2': '2011-04-17T14:53:52.090Z',
     '0.2.3': '2011-04-18T07:39:35.264Z',
     '0.2.4': '2011-05-25T17:53:53.749Z',
     '0.2.5': '2011-11-27T09:13:16.219Z',
     '0.2.6': '2011-11-27T15:05:38.304Z',
     '0.3.0': '2011-11-29T13:07:17.279Z',
     '0.3.1': '2011-12-16T20:57:31.973Z',
     '0.3.2': '2012-01-17T20:08:35.060Z',
     '0.3.3': '2012-05-27T17:45:06.608Z',
     '0.4.0': '2012-06-04T13:18:57.627Z',
     '0.4.1': '2012-06-10T20:58:40.646Z',
     '0.4.2': '2012-06-28T20:50:48.336Z',
     '0.5.0': '2012-08-02T20:58:52.375Z',
     '0.6.0': '2012-08-05T20:40:36.334Z',
     '0.7.0': '2012-10-14T20:17:20.894Z',
     '0.8.0': '2012-10-21T10:41:39.387Z',
     '0.8.1': '2012-10-28T15:02:24.907Z',
     '0.8.2': '2012-10-31T21:54:01.790Z',
     '0.8.3': '2012-11-29T22:32:21.265Z',
     '0.9.0': '2012-12-15T22:44:33.084Z',
     '0.9.1': '2012-12-19T21:08:31.016Z',
     '0.10.0': '2013-02-09T16:25:15.119Z',
     '0.10.1': '2013-02-14T21:34:05.711Z',
     '0.10.2': '2013-03-19T20:31:33.357Z',
     '1.0.0': '2013-03-30T17:54:23.743Z',
     '1.0.1': '2013-04-08T06:30:47.764Z',
     '1.0.2': '2013-04-29T20:32:01.299Z',
     '1.0.3': '2013-05-20T18:08:38.756Z',
     '1.0.4': '2013-05-23T18:10:51.912Z',
     '1.0.5': '2013-05-27T21:43:15.247Z',
     '1.0.6': '2013-06-04T18:24:09.803Z',
     '1.0.7': '2013-06-05T18:25:43.908Z',
     '1.0.8': '2013-06-10T12:20:34.767Z',
     '1.0.9': '2013-06-11T11:10:34.822Z',
     '1.0.10': '2013-06-13T19:14:33.963Z',
     '1.0.11': '2013-07-08T14:27:07.987Z',
     '1.0.12': '2013-07-19T16:08:40.289Z',
     '1.1.0': '2013-09-06T08:20:49.871Z',
     '1.1.1': '2013-09-06T22:13:28.467Z',
     '1.1.2': '2013-09-29T11:06:51.455Z',
     '1.1.3': '2013-10-04T08:15:04.751Z',
     '1.1.4': '2013-10-23T14:23:01.379Z',
     '1.1.5': '2013-10-24T16:21:59.578Z',
     '1.1.6': '2013-10-26T09:16:32.622Z',
     '1.1.7': '2013-10-28T21:22:17.763Z',
     '2.0.0': '2013-11-04T13:32:52.782Z',
     '2.0.1': '2013-11-14T08:38:59.328Z',
     '2.0.2': '2013-11-18T21:35:07.288Z',
     '2.0.3': '2013-12-18T22:08:33.295Z',
     '2.0.4': '2013-12-19T14:40:01.676Z',
     '2.0.5': '2014-01-03T11:11:14.171Z',
     '2.0.6': '2014-01-04T16:02:19.443Z',
     '2.0.7': '2014-01-16T22:31:17.040Z',
     '2.0.8': '2014-02-07T21:09:43.288Z',
     '2.1.0': '2014-02-13T22:54:34.925Z',
     '2.1.1': '2014-02-19T08:09:55.708Z',
     '2.1.2': '2014-02-25T21:04:39.543Z',
     '2.1.3': '2014-02-26T21:05:49.779Z',
     '2.1.4': '2014-03-01T23:33:57.506Z',
     '2.1.5': '2014-03-07T20:47:20.465Z',
     '2.1.6': '2014-03-10T07:54:17.516Z',
     '2.1.7': '2014-03-24T20:44:25.968Z',
     '2.1.8': '2014-03-28T19:02:31.320Z',
     '2.2.0': '2014-06-11T21:26:48.888Z',
     '2.2.1': '2014-06-14T08:33:01.688Z',
     '2.2.2': '2014-06-18T21:50:27.777Z',
     '2.2.3': '2014-06-24T21:28:25.515Z',
     '2.2.4': '2014-06-27T22:09:48.464Z',
     '2.2.5': '2014-06-29T22:28:15.805Z',
     '2.2.6': '2014-07-05T13:58:32.497Z',
     '2.2.7': '2014-07-10T22:04:44.388Z',
     '2.2.8': '2014-07-14T21:46:41.706Z',
     '2.2.9': '2014-07-23T22:42:01.562Z',
     '2.2.10': '2014-07-27T13:29:20.751Z',
     '2.2.11': '2014-07-28T21:41:48.979Z',
     '2.2.12': '2014-08-02T10:38:36.229Z',
     '2.2.13': '2014-08-12T21:36:28.333Z',
     '2.2.14': '2014-08-25T14:11:37.768Z',
     '2.2.15': '2014-08-31T22:58:54.997Z',
     '2.2.16': '2014-09-16T20:16:38.624Z',
     '2.2.17': '2014-11-09T16:57:49.823Z',
     '2.2.18': '2014-11-17T20:16:09.799Z',
     '2.2.19': '2014-11-20T23:20:23.599Z',
     '2.2.20': '2014-12-02T21:21:56.521Z',
     '2.2.21': '2014-12-10T22:58:19.977Z',
     '2.2.22': '2014-12-13T10:57:47.894Z',
     '3.0.0': '2014-12-18T23:07:10.073Z',
     '3.0.1': '2014-12-19T21:10:27.340Z',
     '3.0.2': '2015-01-04T10:51:16.440Z',
     '2.2.23': '2015-01-04T10:59:02.073Z' },
  author: 'Jakub Pawlowicz <jakub@goalsmashers.com> (http://twitter.com/GoalSmashers)',
  repository:
   { type: 'git',
     url: 'https://github.com/GoalSmashers/clean-css.git' },
  users:
   { fgribreau: true,
     hughsk: true,
     dpobel: true,
     chilts: true,
     adamrenny: true,
     fox: true,
     sweetfancymoses: true,
     drahcir: true,
     varghju: true,
     wenbing: true,
     reekdeb: true,
     cedx: true,
     binnng: true,
     feryardiant: true,
     lufei: true,
     zhangyaochun: true,
     flip4bytes: true,
     chzhewl: true,
     beardwierd: true },
  readmeFilename: 'README.md',
  homepage: 'https://github.com/GoalSmashers/clean-css',
  keywords: [ 'css', 'minifier' ],
  bugs: { url: 'https://github.com/GoalSmashers/clean-css/issues' },
  license: 'MIT',
  version: '2.2.23',
  bin: { cleancss: './bin/cleancss' },
  main: 'index.js',
  files:
   [ 'bin',
     'lib',
     'History.md',
     'index.js',
     'LICENSE' ],
  scripts:
   { browserify: 'browserify --standalone CleanCSS index.js | uglifyjs --compress --mangle -o cleancss-browser.js',
     bench: 'node ./test/bench.js',
     check: 'jshint ./bin/cleancss .',
     prepublish: 'jshint .',
     test: 'vows' },
  dependencies: { commander: '2.2.x' },
  devDependencies:
   { browserify: '4.x',
     jshint: '2.5.x',
     nock: '0.28.x',
     'uglify-js': '2.4.x',
     vows: '0.7.x' },
  engines: { node: '>=0.8.0' },
  gitHead: 'a5bc953e47933745f3f5a9179dbfd60a9b7945b1',
  dist:
   { shasum: '0590b5478b516c4903edc2d89bd3fdbdd286328c',
     tarball: 'http://registry.npmjs.org/clean-css/-/clean-css-2.2.23.tgz' },
  directories: {} }

@jakubpawlowicz
Copy link
Collaborator

It seems like a npm issue worth reporting. I've just pushed 3.0.3 and it gets installed by npm as the latest now.

@jakubpawlowicz
Copy link
Collaborator

Ok, we it's a known issue - npm/npm#6778

@jakubpawlowicz
Copy link
Collaborator

Please reopen unless fixed.

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

2 participants