Skip to content

Commit 767017d

Browse files
Tvrqvoiseiamkun
authored andcommitted
fix(module): transpile everything except ES6 modules in the 'module' entrypoint (#477) (#480) (#482)
1 parent 508c3a7 commit 767017d

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ coverage
1616
/locale
1717
/plugin
1818
dayjs.min.js
19+
/lib
1920

2021
#dev
2122
demo.js

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ script:
1616
- codecov
1717
after_success:
1818
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
19-
npx travis-deploy-once && npm run build && npm install -g @semantic-release/changelog @semantic-release/git semantic-release && semantic-release && npm run test:sauce;
19+
npx travis-deploy-once && npm run build && npm run babel && npm install -g @semantic-release/changelog @semantic-release/git semantic-release && semantic-release && npm run test:sauce;
2020
fi
2121
branches:
2222
except:

package.json

+10-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
"description": "2KB immutable date time library alternative to Moment.js with the same modern API ",
55
"main": "dayjs.min.js",
66
"types": "index.d.ts",
7-
"module": "./src/index.js",
7+
"module": "./lib/index.js",
88
"scripts": {
99
"test": "TZ=Pacific/Auckland npm run test-tz && TZ=Europe/London npm run test-tz && npm run test-tz && jest",
1010
"test-tz": "jest test/timezone.test --coverage=false",
1111
"lint": "./node_modules/.bin/eslint src/* test/* build/*",
12+
"babel": "BABEL_ENV=build babel src --out-dir lib --copy-files",
1213
"build": "cross-env BABEL_ENV=build node build && npm run size",
1314
"sauce": "npx karma start karma.sauce.conf.js",
1415
"test:sauce": "npm run sauce -- 0 && npm run sauce -- 1 && npm run sauce -- 2 && npm run sauce -- 3",
@@ -40,9 +41,14 @@
4041
{
4142
"path": "@semantic-release/changelog"
4243
},
43-
["@semantic-release/git", {
44-
"assets": ["CHANGELOG.md"]
45-
}]
44+
[
45+
"@semantic-release/git",
46+
{
47+
"assets": [
48+
"CHANGELOG.md"
49+
]
50+
}
51+
]
4652
]
4753
},
4854
"keywords": [

0 commit comments

Comments
 (0)