wasm-pack fixes
ci/woodpecker/push/tools-wasm-pack-plugin Pipeline was successful Details
ci/woodpecker/push/wasm-o-x-rust Pipeline was successful Details

This commit is contained in:
Gleb Koval 2022-08-07 16:53:21 +00:00
parent 0f952aef2f
commit 53ba27bd11
Signed by: cyclane
GPG Key ID: 15E168A8B332382C
6 changed files with 26 additions and 11 deletions

12
.editorconfig Normal file
View File

@ -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

View File

@ -19,6 +19,7 @@ pipeline:
settings:
actions: build,publish
folder: wasm/o-x-rust
target: web
scope: game-algorithms
username: cyclane
token:

View File

@ -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

View File

@ -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

View File

@ -25,7 +25,7 @@ dependencies = [
[[package]]
name = "o-x-rust"
version = "0.0.1"
version = "0.0.2"
dependencies = [
"wasm-bindgen",
]

View File

@ -3,9 +3,8 @@ name = "o-x-rust"
description = "Naughts and crosses WASM algorithms"
repository = "https://git.koval.net/cyclane/game-algorithms/src/branch/main/wasm/o-x-rust"
license = "GNU GPLv3"
license-file = "LICENSE"
readme = "README.md"
version = "0.0.1"
version = "0.0.2"
edition = "2021"
[lib]