mirror of
https://github.com/scratchfoundation/scratch-audio.git
synced 2025-08-28 22:12:42 -04:00
publish to npm
This commit is contained in:
parent
a4184769b6
commit
cd38820fea
3 changed files with 34 additions and 9 deletions
3
.npmignore
Normal file
3
.npmignore
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Testing
|
||||
/.nyc_output
|
||||
/coverage
|
20
.travis.yml
20
.travis.yml
|
@ -5,3 +5,23 @@ node_js:
|
|||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
after_script:
|
||||
- |
|
||||
# RELEASE_BRANCHES and NPM_TOKEN defined in Travis settings panel
|
||||
declare exitCode
|
||||
$(npm bin)/travis-after-all
|
||||
exitCode=$?
|
||||
if [[
|
||||
# Execute after all jobs finish successfully
|
||||
$exitCode = 0 &&
|
||||
# Only release on release branches
|
||||
$RELEASE_BRANCHES =~ $TRAVIS_BRANCH &&
|
||||
# Don't release on PR builds
|
||||
$TRAVIS_PULL_REQUEST = "false"
|
||||
]]; then
|
||||
# Authenticate NPM
|
||||
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
|
||||
# Set version to timestamp
|
||||
npm --no-git-tag-version version $($(npm bin)/json -f package.json version)-prerelease.$(date +%s)
|
||||
npm publish
|
||||
fi
|
||||
|
|
20
package.json
20
package.json
|
@ -7,7 +7,8 @@
|
|||
"test": "npm run lint && npm run build",
|
||||
"build": "webpack --bail",
|
||||
"watch": "webpack --watch",
|
||||
"lint": "eslint ."
|
||||
"lint": "eslint .",
|
||||
"prepublish": "npm run build"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -20,13 +21,14 @@
|
|||
},
|
||||
"homepage": "https://github.com/LLK/scratch-audioengine#readme",
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.17.0",
|
||||
"babel-eslint": "^7.0.0",
|
||||
"babel-loader": "^6.2.5",
|
||||
"babel-preset-es2015": "^6.16.0",
|
||||
"eslint": "^3.7.1",
|
||||
"soundfont-player": "^0.10.5",
|
||||
"tone": "^0.8.0",
|
||||
"webpack": "^1.13.2"
|
||||
"babel-core": "6.17.0",
|
||||
"babel-eslint": "7.0.0",
|
||||
"babel-loader": "6.2.5",
|
||||
"babel-preset-es2015": "6.16.0",
|
||||
"eslint": "3.7.1",
|
||||
"soundfont-player": "0.10.5",
|
||||
"tone": "0.8.0",
|
||||
"travis-after-all": "1.4.4",
|
||||
"webpack": "1.13.2"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue