module.exports = {
hooks: {
- "before:init": "./build/release/pre-release.sh",
+ "before:init": "bash ./build/release/pre-release.sh",
"before:git:release": "git add -f dist/ dist-module/ changelog.md",
"after:version:bump":
- "sed -i 's/main/AUTHORS.txt/${version}/AUTHORS.txt/' package.json",
- "after:release": `./build/release/post-release.sh \${version} ${ blogURL }`
+ "sed -i 's/main\\/AUTHORS.txt/${version}\\/AUTHORS.txt/' package.json",
+ "after:release":
+ `bash ./build/release/post-release.sh \${version} ${ blogURL }`
},
git: {
changelog: "npm run release:changelog -- ${from} ${to}",
npm run release:dist $1 $2
cd $dist
git add -A
-npm version $1
+git commit -m "Release: $1"
+# -s to sign and annotate tag (recommended for releases)
+git tag -s $1 -m "Release: $1"
# Wait for confirmation from user to push changes to dist repo
read -p "Press enter to push changes to dist repo"
set -euo pipefail
-# Cleans all release and build artifacts
+# Install dependencies
+npm ci
+
+# Clean all release and build artifacts
npm run build:clean
npm run release:clean
-npm ci
+
+# Check authors
npm run authors:check
+
+# Run tests
npm test
# Clone dist and cdn repos to the tmp/release directory
"babel:tests": "babel test/data/core/jquery-iterability-transpiled-es6.js --out-file test/data/core/jquery-iterability-transpiled.js",
"build": "node ./build/command.js",
"build:all": "node -e \"(async () => { const { buildDefaultFiles } = await import('./build/tasks/build.js'); buildDefaultFiles() })()\"",
- "build:clean": "rimraf dist/*.{js,map} dist-module/*.{js,map}",
+ "build:clean": "rimraf --glob dist/*.{js,map} --glob dist-module/*.{js,map}",
"build:main": "node -e \"(async () => { const { build } = await import('./build/tasks/build.js'); build() })()\"",
"lint:dev": "eslint --cache .",
"lint:json": "jsonlint --quiet package.json",