Skip to content

Commit

Permalink
Change bundle files csso-browser.js -> csso.js & csso.min.js
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed Oct 21, 2019
1 parent 8a0dee1 commit cb1e698
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Dropped support for Node.js prior 8.0
- Bumped [CSSTree](https://github.com/csstree/csstree) to `1.0.0-alpha.36` (#399)
- Changed bundle files: `dist/csso.js` and `dist/csso.min.js` instead single `dist/csso-browser.js` (min version)

## 3.5.1 (June 7, 2018)

Expand Down
3 changes: 2 additions & 1 deletion dist/.npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*
!csso-browser.js
!csso.js
!csso.min.js
12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
"test": "mocha --reporter dot",
"lint": "eslint lib test",
"lint-and-test": "npm run lint && npm test",
"hydrogen": "node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/csso --stat -o /dev/null",
"build": "rollup --config && terser dist/csso.js --compress --mangle -o dist/csso.min.js",
"coverage": "nyc npm test",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"travis": "nyc npm run lint-and-test && npm run coveralls",
"browserify": "rollup --config && terser dist/csso-browser.js --compress --mangle -o dist/csso-browser.js",
"hydrogen": "node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/csso --stat -o /dev/null",
"gh-pages": "git clone --depth=1 -b gh-pages https://github.com/css/csso.git .gh-pages && npm run browserify && cp dist/csso-browser.js .gh-pages/ && cd .gh-pages && git commit -am \"update\" && git push && cd .. && rm -rf .gh-pages",
"prepublish": "npm run browserify",
"postpublish": "npm run gh-pages"
Expand All @@ -76,10 +76,8 @@
"node": ">=8.0.0"
},
"files": [
"dist/csso-browser.js",
"lib",
"HISTORY.md",
"LICENSE",
"README.md"
"dist/csso.js",
"dist/csso.min.js",
"lib"
]
}
13 changes: 11 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
const path = require('path');
const resolve = require('rollup-plugin-node-resolve');
const json = require('rollup-plugin-json');
const commonjs = require('rollup-plugin-commonjs');

module.exports = {
input: 'lib/index.js',
output: {
file: 'dist/csso-browser.js',
file: 'dist/csso.js',
exports: 'named',
name: 'csso',
format: 'umd'
},
plugins: [
resolve({ browser: true }),
commonjs(),
json()
json(),
{
name: 'version',
load(id) {
if (id === path.resolve('package.json')) {
return '{ "version": "?????" }';
}
}
}
]
};

0 comments on commit cb1e698

Please sign in to comment.