Skip to content

Commit 3fd5c8f

Browse files
committed
Fixes the problem that the published script is not compatible with node.
1 parent d93aa50 commit 3fd5c8f

3 files changed

Lines changed: 218 additions & 14 deletions

File tree

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src

package-lock.json

Lines changed: 211 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
"name": "@kkboxorg/kkbox-javascript-developer-sdk",
33
"version": "1.0.0",
44
"description": "KKBOX Open API developer SDK for JavaScript. Use it to easily access KKBOX open API to get various metadata about KKBOX's tracks, albums, artists, playlists and stations. ",
5-
"main": "src/SDK.js",
5+
"main": "./dist/SDK.js",
66
"scripts": {
77
"test": "mocha --trace-warnings -R spec -t 5000 --compilers babel-register ./test/authtest ./test/apitest",
88
"test-sdk": "mocha -t 5000 --compilers babel-register ./test/sdktest",
99
"test-auth": "mocha -t 5000 --compilers babel-register ./test/authtest",
1010
"test-all": "mocha -t 5000 --compilers babel-register",
1111
"test-jenkins": "JUNIT_REPORT_PATH=report.xml jenkins-mocha -t 5000 --cobertura --compilers babel-register --colors --reporter mocha-jenkins-reporter ./test/authtest ./test/apitest",
12-
"build": "webpack -p",
12+
"build-webpack": "webpack -p",
13+
"build": "babel src --presets babel-preset-es2015 --out-dir dist",
14+
"prepublishOnly": "npm run build",
1315
"doc": "./node_modules/.bin/esdoc && open ./public/index.html",
1416
"build-doc": "./node_modules/.bin/esdoc"
1517
},
@@ -24,7 +26,7 @@
2426
"babel-polyfill": "^6.23.0"
2527
},
2628
"devDependencies": {
27-
"babel-cli": "^6.24.0",
29+
"babel-cli": "^6.26.0",
2830
"babel-core": "^6.24.0",
2931
"babel-loader": "^6.4.1",
3032
"babel-plugin-syntax-dynamic-import": "^6.18.0",
@@ -33,6 +35,7 @@
3335
"babel-plugin-transform-runtime": "^6.23.0",
3436
"babel-preset-babili": "^0.1.2",
3537
"babel-preset-env": "^1.3.2",
38+
"babel-preset-es2015": "^6.24.1",
3639
"esdoc": "^0.5.2",
3740
"esdoc-standard-plugin": "0.0.7",
3841
"jenkins-mocha": "^4.1.2",

0 commit comments

Comments
 (0)