Skip to content

Commit a063539

Browse files
author
Balthazar Gronon
committed
feat(core): allow <script> usage with browserify
Also fix gitattributes 😄
1 parent 279bfe1 commit a063539

File tree

3 files changed

+767
-131
lines changed

3 files changed

+767
-131
lines changed

.gitattributes

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
yarn.lock --diff
1+
yarn.lock -diff

package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"start": "(cd showcase && command -v yarn >/dev/null && yarn && npm start || npm install && npm start)",
2323
"start-docs": "(cd docs && command -v yarn >/dev/null && yarn && npm start || npm install && npm start)",
2424
"clean": "rm -rf dist bundle.* index.html && mkdir dist",
25-
"build": "npm run clean && babel src -d dist --copy-files && node-sass src/main.scss dist/style.css --output-style compressed",
25+
"build:browser": "browserify src/index.js -t [ babelify ] --standalone reactVis | uglifyjs > dist/dist.min.js",
26+
"build": "npm run clean && babel src -d dist --copy-files && node-sass src/main.scss dist/style.css --output-style compressed && npm run build:browser",
2627
"lint": "eslint src tests showcase docs --ignore-pattern node_modules --ignore-pattern bundle.js",
2728
"lint-styles": "stylelint src/styles/*.scss --syntax scss",
2829
"test": "babel-node tests/index.js",
@@ -56,6 +57,8 @@
5657
"babel-preset-react": "^6.16.0",
5758
"babel-preset-stage-0": "^6.16.0",
5859
"babel-register": "^6.18.0",
60+
"babelify": "^7.3.0",
61+
"browserify": "^14.3.0",
5962
"canvas-prebuilt": "^1.6.0",
6063
"enzyme": "^2.7.0",
6164
"eslint": "^3.13.1",
@@ -72,7 +75,8 @@
7275
"react-dom": ">=15.4.2",
7376
"stylelint": "^7.7.1",
7477
"stylelint-config-standard": "^15.0.1",
75-
"tape": "^4.6.3"
78+
"tape": "^4.6.3",
79+
"uglify-js": "^2.8.22"
7680
},
7781
"peerDependencies": {
7882
"react": "0.14.x - 15.x",

0 commit comments

Comments
 (0)