Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed npm transpiled code #893

Merged
merged 2 commits into from
Mar 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@
"plugins": [
"transform-es2015-modules-commonjs"
]
},
"npm": {
"presets": [
[
"es2015",
{
"loose": true,
"modules": "commonjs"
}
],
"stage-0",
"react"
]
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"design": "grunt design",
"dev": "grunt dev",
"dist": "grunt dist",
"prepublish": "grunt dist",
"prepublish": "cross-env BABEL_ENV=npm grunt dist",
"format": "prettier --write --print-width 100 --single-quote 'src/**/*.js' 'src/**/*.jsx'",
"lint": "eslint src",
"assert-uncomitted": "uncommitted",
Expand Down
18 changes: 10 additions & 8 deletions scripts/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ bower_release()
npm_release()
{
verbose "Checking if version $1 of $NPM_NAME is already available in npm…"

NPM_EXISTS=$(npm info -s $NPM_NAME@$1 version)

if [ ! -z "$NPM_EXISTS" ]; then
if [ ! -z "$NPM_EXISTS" ] && [ "$NPM_EXISTS" == "$1" ]; then
verbose "There is already a version $NPM_EXISTS in npm. Skipping npm publish…"
else
if [ ! -z "$STABLE" ]; then
Expand All @@ -97,15 +97,17 @@ fi
# Clean
rm -f build/*.js

# Build
# Build & Release Webpack Bundle
npm run dist build

# Release
git checkout -b dist
bower_release
new_line
npm_release "$VERSION"
new_line
cdn_release "$VERSION"
new_line

# Build & Release NPM
npm run prepublish
npm_release "$VERSION"

git checkout master
git branch -D dist
git branch -D dist