|
4 | 4 | "description": "",
|
5 | 5 | "main": "lib/index.js",
|
6 | 6 | "scripts": {
|
7 |
| - "build": "babel --out-dir lib src", |
8 |
| - "build:watch": "npm run build -- --watch", |
| 7 | + "build": "npm run build:lib && npm run build:umd && npm run build:umd:min", |
| 8 | + "prebuild:lib": "rm -rf lib/*", |
| 9 | + "build:lib": "babel --out-dir lib src", |
| 10 | + "prebuild:umd": "rm -rf dist/*", |
| 11 | + "build:umd": "webpack --config webpack.config.js src/index.js dist/styled-components.js", |
| 12 | + "build:umd:min": "MINIFY_JS=true webpack --config webpack.config.js src/index.js dist/styled-components.min.js", |
| 13 | + "build:watch": "npm run build:lib -- --watch", |
9 | 14 | "test": "mocha \"./src/**/*.test.js\" --require babel-core/register",
|
10 | 15 | "test:watch": "npm run test -- --watch",
|
11 | 16 | "flow": "flow; test $? -eq 0 -o $? -eq 2",
|
12 | 17 | "lint": "eslint src",
|
13 |
| - "prepublish": "rm -rf lib/* && npm run build" |
| 18 | + "prepublish": "npm run build" |
14 | 19 | },
|
15 | 20 | "repository": {
|
16 | 21 | "type": "git",
|
|
38 | 43 | },
|
39 | 44 | "devDependencies": {
|
40 | 45 | "babel-cli": "^6.14.0",
|
41 |
| - "babel-core": "^6.13.2", |
42 | 46 | "babel-eslint": "^6.1.2",
|
| 47 | + "babel-loader": "^6.2.5", |
43 | 48 | "babel-plugin-add-module-exports": "^0.2.1",
|
44 | 49 | "babel-plugin-transform-flow-strip-types": "^6.14.0",
|
45 |
| - "babel-preset-es2015": "^6.13.2", |
46 |
| - "babel-preset-es2016": "^6.11.3", |
| 50 | + "babel-preset-latest": "^6.14.0", |
47 | 51 | "babel-preset-react": "^6.11.1",
|
48 | 52 | "eslint": "^3.5.0",
|
49 | 53 | "eslint-config-airbnb": "^11.1.0",
|
|
53 | 57 | "expect": "^1.20.2",
|
54 | 58 | "flow-bin": "^0.32.0",
|
55 | 59 | "mocha": "^3.0.2",
|
56 |
| - "proxyquire": "^1.7.10" |
| 60 | + "proxyquire": "^1.7.10", |
| 61 | + "webpack": "^1.13.2" |
57 | 62 | },
|
58 | 63 | "babel": {
|
59 | 64 | "presets": [
|
60 |
| - "es2015", |
61 |
| - "es2016", |
| 65 | + "latest", |
62 | 66 | "react"
|
63 | 67 | ],
|
64 | 68 | "plugins": [
|
|
0 commit comments