From a1ad68e838f22d6ae06cb3f13c8cdafbf57c34f8 Mon Sep 17 00:00:00 2001 From: Tvrqvoise Date: Wed, 6 Feb 2019 11:03:47 -0600 Subject: [PATCH] fix(module): transpile everything except ES6 modules in the 'module' entrypoint (#477) (#480) --- .gitignore | 1 + .travis.yml | 2 +- package.json | 14 ++++++++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 9b3850a8e..5dc720811 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ coverage /locale /plugin dayjs.min.js +/lib #dev demo.js diff --git a/.travis.yml b/.travis.yml index 51231394a..e155eab66 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ script: - codecov after_success: - if [ "$TRAVIS_BRANCH" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then - npx travis-deploy-once && npm run build && npm install -g @semantic-release/changelog @semantic-release/git semantic-release && semantic-release && npm run test:sauce; + 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; fi branches: except: diff --git a/package.json b/package.json index 0b6d70217..bfd8556ac 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,12 @@ "description": "2KB immutable date time library alternative to Moment.js with the same modern API ", "main": "dayjs.min.js", "types": "index.d.ts", - "module": "./src/index.js", + "module": "./lib/index.js", "scripts": { "test": "TZ=Pacific/Auckland npm run test-tz && TZ=Europe/London npm run test-tz && npm run test-tz && jest", "test-tz": "jest test/timezone.test --coverage=false", "lint": "./node_modules/.bin/eslint src/* test/* build/*", + "babel": "BABEL_ENV=build babel src --out-dir lib --copy-files", "build": "cross-env BABEL_ENV=build node build && npm run size", "sauce": "npx karma start karma.sauce.conf.js", "test:sauce": "npm run sauce -- 0 && npm run sauce -- 1 && npm run sauce -- 2 && npm run sauce -- 3", @@ -40,9 +41,14 @@ { "path": "@semantic-release/changelog" }, - ["@semantic-release/git", { - "assets": ["CHANGELOG.md"] - }] + [ + "@semantic-release/git", + { + "assets": [ + "CHANGELOG.md" + ] + } + ] ] }, "keywords": [