-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from spielrs/development
- Loading branch information
Showing
43 changed files
with
1,880 additions
and
1,011 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[build] | ||
target="wasm32-unknown-unknown" | ||
|
||
[target.'cfg(all(target_arch = "wasm32", not(cargo_web)))'] | ||
runner = 'wasm-bindgen-test-runner' |
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,31 @@ | ||
name: Yew Styles | ||
|
||
on: | ||
pull_request: | ||
branches: [ master, development ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: wasm-pack | ||
uses: jetli/[email protected] | ||
with: | ||
version: 'latest' | ||
- name: install rustfmt | ||
run: rustup component add rustfmt | ||
- name: install clippy | ||
run: rustup component add clippy | ||
- name: install stable | ||
run: rustup install stable | ||
- name: add wasm32-unknown-unknown | ||
run: rustup target add wasm32-unknown-unknown | ||
- name: download geckodriver | ||
run: curl --retry 5 -LO https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz | ||
- name: uncompress geckodriver | ||
run: tar -xzf geckodriver-v0.26.0-linux64.tar.gz | ||
- name: execute CI | ||
run: GECKODRIVER=$(pwd)/geckodriver ./ci/run_checks.sh |
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 @@ crate/pkg | |
crate/target | ||
crate/wasm-pack.log | ||
crate/yew_styles/target | ||
crate/yew_styles/pkg | ||
.cache |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,29 +1,42 @@ | ||
# `yewstyle` | ||
|
||
This is an initial project of a framework style for yew | ||
|
||
you can run the project with: | ||
|
||
* `npm start` | ||
|
||
To install yew-styles in your project, execute in the root path: | ||
# Yew Styles | ||
Yew Styles is a style framework for yew | ||
|
||
## Motivation | ||
The purpose of developing this project is first, | ||
provide a style framework for yew because there isn't not many options currently, | ||
also to create a layout system which is not far of the flexbox concept, and, | ||
to take the rust benefits and implement a properties selected by enumeration | ||
in the most of the cases which makes fast for developing applications and avoids the practice try and error | ||
|
||
## How it works | ||
Each component is splited in two parts, the logical yew component and its sass module, | ||
however, it is not necessary to worry about the sass module only it needs to be include in the project | ||
### How install it | ||
1. Install the sass module: `npm install yew-styles` | ||
2. Add the yew_style crate in Cargo.toml file: `yew_styles = "0.3.0"` | ||
3. Import the main.css file in you main javascript/typescript file project: | ||
```typescript | ||
import 'node_modules/yew-styles/main.css'; | ||
``` | ||
4. Ready to import and use in your project 🚀 | ||
|
||
* `npm install yew-styles` | ||
## Run the documentation page | ||
1. `git clone https://github.com/spielrs/yew_styles.git` | ||
2. `cd yew_styles` | ||
3. `npm start` | ||
|
||
* after import the css in your index.js/index.ts file: | ||
In the left side there is a list of links where each one access to a correspondent component documentation, | ||
there, shows how to use it. | ||
|
||
```javascript | ||
import 'node_modules/yew-styles/main.css'; | ||
``` | ||
## Run the tests | ||
Inside of the project run: | ||
|
||
* include in your Cargo.toml if you want to use web-sys feature this: | ||
`cargo test --target wasm32-unknown-unknown --manifest-path=crate/yew_styles/Cargo.toml` | ||
|
||
```toml | ||
yew_styles= {path= "./yew_styles", version = "0.2.0", features = ["web_sys"]} | ||
``` | ||
## Development phase | ||
Yew style is in early phase, currently doesn't have enough components to cover all the requirements that could need a website/web application. | ||
All contributions are appreciated. | ||
|
||
or this if you want to use stdweb instead | ||
## License | ||
|
||
```toml | ||
yew_styles= {path= "./yew_styles", version = "0.2.0", features = ["std_web"]} | ||
``` | ||
Yew Style is MIT licensed. See [license](LICENSE) |
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,4 +1,7 @@ | ||
import './yew-styles/main.sass'; | ||
import './page-styles/main.sass'; | ||
import 'prismjs/themes/prism.css'; | ||
import 'prismjs/components/prism-rust'; | ||
|
||
import module from '../crate/Cargo.toml'; | ||
module.run(); |
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 |
---|---|---|
|
@@ -8,4 +8,7 @@ | |
&:hover | ||
background-color: rgb(230, 236, 241) | ||
|
||
|
||
.container | ||
.item | ||
code | ||
font-size: 1vw |
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,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euxo pipefail | ||
|
||
cargo fmt --manifest-path=crate/yew_styles/Cargo.toml --all -- --check | ||
cargo clippy --manifest-path=crate/yew_styles/Cargo.toml --all -- --deny=warnings | ||
wasm-pack test --headless --firefox crate/yew_styles |
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,2 @@ | ||
[build] | ||
target="wasm32-unknown-unknown" |
Oops, something went wrong.