-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add switching workspace mode (#6)
* Add switching workspace mode * Update README * Use pre script * Update README
- Loading branch information
Showing
8 changed files
with
120 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ ignore = [ | |
"contracts/cw20", | ||
"contracts/cw721", | ||
"contracts/cargo-generate.toml", | ||
"contracts/pre-script.rhai", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
[template] | ||
sub_templates = ["minimal", "cw20", "cw721"] | ||
|
||
[hooks] | ||
pre = ["../pre-script.rhai"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[package] | ||
name = "{{project-name}}" | ||
version = "0.1.0" | ||
authors = ["{{authors}}"] | ||
edition = "2021" | ||
|
||
[lib] | ||
crate-type = ["cdylib", "rlib"] | ||
|
||
[features] | ||
backtraces = ["cosmwasm-std/backtraces"] | ||
# use library feature to disable all instantiate/execute/query exports | ||
library = [] | ||
|
||
[dependencies] | ||
cosmwasm-schema = "=1.1.9" | ||
cosmwasm-std = "=1.1.9" | ||
cw-utils = "=1.0.1" | ||
cw2 = "=1.1.0" | ||
cw20 = "=1.1.0" | ||
cw-storage-plus = "=1.1.0" | ||
schemars = "0.8.1" | ||
semver = "1" | ||
serde = { version = "1.0.103", default-features = false, features = ["derive"] } | ||
thiserror = { version = "1.0.23" } | ||
|
||
[dev-dependencies] | ||
cw-multi-test = { workspace = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[package] | ||
name = "{{project-name}}" | ||
authors = ["{{authors}}"] | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[lib] | ||
crate-type = ["cdylib", "rlib"] | ||
|
||
[features] | ||
# for more explicit tests, cargo test --features=backtraces | ||
backtraces = ["cosmwasm-std/backtraces"] | ||
# use library feature to disable all instantiate/execute/query exports | ||
library = [] | ||
|
||
[dependencies] | ||
cosmwasm-schema = "=1.1.9" | ||
cosmwasm-std = "=1.1.9" | ||
cw-utils = "=1.0.1" | ||
cw2 = "=1.1.0" | ||
cw721 = "=0.16.0" | ||
cw-storage-plus = "=1.1.0" | ||
schemars = "0.8.10" | ||
serde = { version = "1.0.140", default-features = false, features = ["derive"] } | ||
thiserror = "1.0.31" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[package] | ||
authors = ["{{authors}}"] | ||
edition = "2021" | ||
name = "{{project-name}}" | ||
version = "0.1.0" | ||
|
||
exclude = [ | ||
# Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. | ||
"contract.wasm", | ||
"hash.txt", | ||
] | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[lib] | ||
crate-type = ["cdylib", "rlib"] | ||
|
||
[profile.release] | ||
codegen-units = 1 | ||
debug = false | ||
debug-assertions = false | ||
incremental = false | ||
lto = true | ||
opt-level = 3 | ||
overflow-checks = true | ||
panic = 'abort' | ||
rpath = false | ||
|
||
[features] | ||
# for more explicit tests, cargo test --features=backtraces | ||
backtraces = ["cosmwasm-std/backtraces"] | ||
# use library feature to disable all instantiate/execute/query exports | ||
library = [] | ||
|
||
[dependencies] | ||
cosmwasm-schema = "=1.1.9" | ||
cosmwasm-std = "=1.1.9" | ||
cw-storage-plus = "=1.1.0" | ||
cw2 = "=1.1.0" | ||
schemars = "0.8.15" | ||
serde = { version = "1.0.189", default-features = false, features = ["derive"] } | ||
thiserror = { version = "1.0.49" } | ||
|
||
[dev-dependencies] | ||
cw-multi-test = { workspace = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
if variable::get("workspace") == "false" { | ||
file::delete("Cargo.toml"); | ||
file::rename("Cargo-single.toml", "Cargo.toml"); | ||
} else { | ||
file::delete("Cargo-single.toml"); | ||
} |