wasm-pack fixes
This commit is contained in:
@@ -13,7 +13,8 @@ When using this plugin it is best to pull every time since it can be updated oft
|
||||
|
||||
### Build
|
||||
|
||||
- `build_profile` (default=`release`): Build profile to use for `wasm-pack build`
|
||||
- `profile` (default=`release`): Build profile to use for `wasm-pack build`
|
||||
- `target` (default=`bundler`): Target to build for
|
||||
- `make`: Optionally run a make target building
|
||||
|
||||
### Publish
|
||||
@@ -37,4 +38,4 @@ pipeline:
|
||||
token:
|
||||
from_secret: DEPLOY_TOKEN
|
||||
registry: https://git.koval.net/api/packages/cyclane/npm/
|
||||
```
|
||||
```
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
# Properties: actions
|
||||
# username, token, registry=https://registry.npmjs.org, scope, folder=.
|
||||
# build_profile=release, make
|
||||
# profile=release, target=bundler, make
|
||||
|
||||
# publish: username, token
|
||||
# build:
|
||||
@@ -14,7 +14,8 @@ echo username: ${PLUGIN_USERNAME}
|
||||
echo registry: ${PLUGIN_REGISTRY:-https://registry.npmjs.org/}
|
||||
echo scope: ${PLUGIN_SCOPE}
|
||||
echo folder: ${PLUGIN_FOLDER:-.}
|
||||
echo build_profile: ${PLUGIN_BUILD_PROFILE:-release}
|
||||
echo profile: ${PLUGIN_PROFILE:-release}
|
||||
echo target: ${PLUGIN_TARGET:-bundler}
|
||||
echo make: ${PLUGIN_MAKE}
|
||||
|
||||
set -eu
|
||||
@@ -23,9 +24,9 @@ cd ${PLUGIN_FOLDER:-.}
|
||||
|
||||
if [[ "${PLUGIN_ACTIONS}" =~ '(^|,)build(,|$)' ]]; then
|
||||
if [ "${PLUGIN_SCOPE:-}" = "" ]; then
|
||||
wasm-pack build --${PLUGIN_BUILD_PROFILE:-release}
|
||||
wasm-pack build --${PLUGIN_PROFILE:-release} --target ${PLUGIN_TARGET:-bundler}
|
||||
else
|
||||
wasm-pack build --${PLUGIN_BUILD_PROFILE:-release} --scope ${PLUGIN_SCOPE}
|
||||
wasm-pack build --${PLUGIN_PROFILE:-release} --target ${PLUGIN_TARGET:-bundler} --scope ${PLUGIN_SCOPE}
|
||||
fi
|
||||
|
||||
if [ "${PLUGIN_MAKE:-}" != "" ]; then
|
||||
@@ -35,6 +36,7 @@ fi
|
||||
|
||||
if [[ "${PLUGIN_ACTIONS}" =~ '(^|,)publish(,|$)' ]]; then
|
||||
cd pkg
|
||||
npm pkg set type=module
|
||||
REGISTRY=${PLUGIN_REGISTRY:-https://registry.npmjs.org/}
|
||||
|
||||
if [ "${PLUGIN_SCOPE:-}" = "" ]; then
|
||||
@@ -45,4 +47,4 @@ if [[ "${PLUGIN_ACTIONS}" =~ '(^|,)publish(,|$)' ]]; then
|
||||
|
||||
npm config set -- $(echo ${REGISTRY} | sed -Ee "s/^https?://"):_authToken "${PLUGIN_TOKEN}"
|
||||
npm publish
|
||||
fi
|
||||
fi
|
||||
|
Reference in New Issue
Block a user