Skip to content

Commit cb673a9

Browse files
committed
Bundle with rollup
1 parent f93964d commit cb673a9

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
/node_modules
2-
/dist
2+
/index.js

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "css-to-react-native",
33
"version": "2.1.1",
44
"description": "Convert CSS text to a React Native stylesheet object",
5-
"main": "dist/index.js",
5+
"main": "index.js",
66
"scripts": {
7-
"build": "babel src --ignore test.js --out-dir dist",
7+
"build": "rollup ./src/index.js -o index.js --f cjs && babel index.js -o index.js",
88
"test": "jest",
99
"test:watch": "jest --watch",
1010
"lint": "eslint src",
@@ -13,7 +13,7 @@
1313
"lint-staged": "lint-staged"
1414
},
1515
"files": [
16-
"dist",
16+
"index.js",
1717
"src"
1818
],
1919
"repository": {
@@ -43,7 +43,8 @@
4343
"eslint-plugin-prettier": "^2.6.0",
4444
"jest": "^22.2.2",
4545
"lint-staged": "^6.1.0",
46-
"prettier": "^1.10.2"
46+
"prettier": "^1.10.2",
47+
"rollup": "^0.55.5"
4748
},
4849
"dependencies": {
4950
"css-color-keywords": "^1.0.0",

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-param-reassign */
22
import parse from 'postcss-value-parser'
33
import camelizeStyleName from 'fbjs/lib/camelizeStyleName'
4-
import transforms from './transforms'
4+
import transforms from './transforms/index'
55
import TokenStream from './TokenStream'
66

77
// Note if this is wrong, you'll need to change tokenTypes.js too

yarn.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3809,6 +3809,10 @@ rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1:
38093809
dependencies:
38103810
glob "^7.0.5"
38113811

3812+
rollup@^0.55.5:
3813+
version "0.55.5"
3814+
resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.55.5.tgz#2f88c300f7cf24b5ec2dca8a6aba73b04e087e93"
3815+
38123816
run-async@^2.2.0:
38133817
version "2.3.0"
38143818
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"

0 commit comments

Comments
 (0)