wasm-pack fixes
This commit is contained in:
parent
0f952aef2f
commit
53ba27bd11
|
@ -0,0 +1,12 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.yml]
|
||||||
|
indent_style=space
|
|
@ -19,6 +19,7 @@ pipeline:
|
||||||
settings:
|
settings:
|
||||||
actions: build,publish
|
actions: build,publish
|
||||||
folder: wasm/o-x-rust
|
folder: wasm/o-x-rust
|
||||||
|
target: web
|
||||||
scope: game-algorithms
|
scope: game-algorithms
|
||||||
username: cyclane
|
username: cyclane
|
||||||
token:
|
token:
|
||||||
|
|
|
@ -13,7 +13,8 @@ When using this plugin it is best to pull every time since it can be updated oft
|
||||||
|
|
||||||
### Build
|
### 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
|
- `make`: Optionally run a make target building
|
||||||
|
|
||||||
### Publish
|
### Publish
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Properties: actions
|
# Properties: actions
|
||||||
# username, token, registry=https://registry.npmjs.org, scope, folder=.
|
# username, token, registry=https://registry.npmjs.org, scope, folder=.
|
||||||
# build_profile=release, make
|
# profile=release, target=bundler, make
|
||||||
|
|
||||||
# publish: username, token
|
# publish: username, token
|
||||||
# build:
|
# build:
|
||||||
|
@ -14,7 +14,8 @@ echo username: ${PLUGIN_USERNAME}
|
||||||
echo registry: ${PLUGIN_REGISTRY:-https://registry.npmjs.org/}
|
echo registry: ${PLUGIN_REGISTRY:-https://registry.npmjs.org/}
|
||||||
echo scope: ${PLUGIN_SCOPE}
|
echo scope: ${PLUGIN_SCOPE}
|
||||||
echo folder: ${PLUGIN_FOLDER:-.}
|
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}
|
echo make: ${PLUGIN_MAKE}
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
@ -23,9 +24,9 @@ cd ${PLUGIN_FOLDER:-.}
|
||||||
|
|
||||||
if [[ "${PLUGIN_ACTIONS}" =~ '(^|,)build(,|$)' ]]; then
|
if [[ "${PLUGIN_ACTIONS}" =~ '(^|,)build(,|$)' ]]; then
|
||||||
if [ "${PLUGIN_SCOPE:-}" = "" ]; then
|
if [ "${PLUGIN_SCOPE:-}" = "" ]; then
|
||||||
wasm-pack build --${PLUGIN_BUILD_PROFILE:-release}
|
wasm-pack build --${PLUGIN_PROFILE:-release} --target ${PLUGIN_TARGET:-bundler}
|
||||||
else
|
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
|
fi
|
||||||
|
|
||||||
if [ "${PLUGIN_MAKE:-}" != "" ]; then
|
if [ "${PLUGIN_MAKE:-}" != "" ]; then
|
||||||
|
@ -35,6 +36,7 @@ fi
|
||||||
|
|
||||||
if [[ "${PLUGIN_ACTIONS}" =~ '(^|,)publish(,|$)' ]]; then
|
if [[ "${PLUGIN_ACTIONS}" =~ '(^|,)publish(,|$)' ]]; then
|
||||||
cd pkg
|
cd pkg
|
||||||
|
npm pkg set type=module
|
||||||
REGISTRY=${PLUGIN_REGISTRY:-https://registry.npmjs.org/}
|
REGISTRY=${PLUGIN_REGISTRY:-https://registry.npmjs.org/}
|
||||||
|
|
||||||
if [ "${PLUGIN_SCOPE:-}" = "" ]; then
|
if [ "${PLUGIN_SCOPE:-}" = "" ]; then
|
||||||
|
|
|
@ -25,7 +25,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "o-x-rust"
|
name = "o-x-rust"
|
||||||
version = "0.0.1"
|
version = "0.0.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
|
|
@ -3,9 +3,8 @@ name = "o-x-rust"
|
||||||
description = "Naughts and crosses WASM algorithms"
|
description = "Naughts and crosses WASM algorithms"
|
||||||
repository = "https://git.koval.net/cyclane/game-algorithms/src/branch/main/wasm/o-x-rust"
|
repository = "https://git.koval.net/cyclane/game-algorithms/src/branch/main/wasm/o-x-rust"
|
||||||
license = "GNU GPLv3"
|
license = "GNU GPLv3"
|
||||||
license-file = "LICENSE"
|
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
version = "0.0.1"
|
version = "0.0.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
Loading…
Reference in New Issue