Skip to content

Commit 3a6dc5d

Browse files
authored
update v3.9.0 (#249) from HapticX/dev
update v3.9.0
2 parents a079117 + b1ecbe4 commit 3a6dc5d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+994
-1246
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
7+
[*.nim]
8+
indent_style = space
9+
indent_size = 2

.github/workflows/examples.yml

Lines changed: 89 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,89 @@
1-
name: Examples 📕
2-
3-
on:
4-
push:
5-
branches:
6-
- 'master'
7-
paths-ignore:
8-
- 'docs/**'
9-
- '.github/ISSUE_TEMPLATE/*'
10-
- '*.md'
11-
- '*.nimble'
12-
- '.gitignore'
13-
- 'LICENSE'
14-
- '**/FUNDING.yml'
15-
- '**/gh-pages.yml'
16-
- '**/tests.yml'
17-
- '**/language_bindings.yml'
18-
- '**/jvm_bindings.yml'
19-
pull_request:
20-
paths-ignore:
21-
- 'docs/**'
22-
- '.github/ISSUE_TEMPLATE/*'
23-
- '*.md'
24-
- '*.nimble'
25-
- '.gitignore'
26-
- 'LICENSE'
27-
- '**/FUNDING.yml'
28-
- '**/gh-pages.yml'
29-
- '**/tests.yml'
30-
- '**/language_bindings.yml'
31-
- '**/jvm_bindings.yml'
32-
33-
jobs:
34-
build:
35-
runs-on: ${{ matrix.os }}
36-
strategy:
37-
matrix:
38-
os:
39-
- ubuntu-latest
40-
nim_version:
41-
- '2.0.0'
42-
env:
43-
TIMEOUT_EXIT_STATUS: 124
44-
steps:
45-
- uses: actions/checkout@v3
46-
- name: Cache nimble
47-
id: cache-nimble
48-
uses: actions/cache@v3
49-
with:
50-
path: ~/.nimble
51-
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
52-
- uses: jiro4989/setup-nim-action@v1
53-
with:
54-
nim-version: ${{ matrix.nim_version }}
55-
56-
- name: Install Dependencies
57-
run: |
58-
nimble refresh
59-
nimble install -y -d
60-
61-
- name: Hello World 👋
62-
run: |
63-
cd examples/hello_world/src
64-
nim c -d:httpx main
65-
cd ../../../
66-
shell: bash
67-
68-
- name: TODO App ✅
69-
run: |
70-
cd examples/todo/src
71-
nim js --hints:off --warnings:off main
72-
cd ../../../
73-
shell: bash
74-
75-
- name: NimLang 👑
76-
run: |
77-
cd examples/nimlang/src
78-
nimble install highlightjs
79-
nim js --hints:off --warnings:off main
80-
cd ../../../
81-
shell: bash
82-
83-
- name: Website 🌐
84-
run: |
85-
cd examples/website/src
86-
nim js --hints:off --warnings:off main
87-
cd ../../../
88-
shell: bash
1+
name: Examples 📕
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
- 'dev'
8+
paths-ignore:
9+
- 'docs/**'
10+
- '.github/ISSUE_TEMPLATE/*'
11+
- '*.md'
12+
- '*.nimble'
13+
- '.gitignore'
14+
- 'LICENSE'
15+
- '**/FUNDING.yml'
16+
- '**/gh-pages.yml'
17+
- '**/tests.yml'
18+
- '**/language_bindings.yml'
19+
- '**/jvm_bindings.yml'
20+
pull_request:
21+
paths-ignore:
22+
- 'docs/**'
23+
- '.github/ISSUE_TEMPLATE/*'
24+
- '*.md'
25+
- '*.nimble'
26+
- '.gitignore'
27+
- 'LICENSE'
28+
- '**/FUNDING.yml'
29+
- '**/gh-pages.yml'
30+
- '**/tests.yml'
31+
- '**/language_bindings.yml'
32+
- '**/jvm_bindings.yml'
33+
34+
jobs:
35+
build:
36+
runs-on: ${{ matrix.os }}
37+
strategy:
38+
matrix:
39+
os:
40+
- ubuntu-latest
41+
nim_version:
42+
- '2.0.0'
43+
env:
44+
TIMEOUT_EXIT_STATUS: 124
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: actions/cache@v4
48+
with:
49+
path:
50+
~/.nimble
51+
~/.choosenim
52+
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
53+
- uses: jiro4989/setup-nim-action@v1
54+
with:
55+
nim-version: ${{ matrix.nim_version }}
56+
57+
- name: Install Dependencies
58+
run: |
59+
nimble refresh
60+
nimble install -y -d
61+
62+
- name: Hello World 👋
63+
run: |
64+
cd examples/hello_world/src
65+
nim c -d:httpx main
66+
cd ../../../
67+
shell: bash
68+
69+
- name: TODO App ✅
70+
run: |
71+
cd examples/todo/src
72+
nim js --hints:off --warnings:off main
73+
cd ../../../
74+
shell: bash
75+
76+
- name: NimLang 👑
77+
run: |
78+
cd examples/nimlang/src
79+
nimble install highlightjs
80+
nim js --hints:off --warnings:off main
81+
cd ../../../
82+
shell: bash
83+
84+
- name: Website 🌐
85+
run: |
86+
cd examples/website/src
87+
nim js --hints:off --warnings:off main
88+
cd ../../../
89+
shell: bash

.github/workflows/gh-pages.yml

Lines changed: 85 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,85 @@
1-
name: Github Pages 🌐
2-
3-
on:
4-
push:
5-
branches:
6-
- 'master'
7-
paths-ignore:
8-
- '.github/ISSUE_TEMPLATE/*'
9-
- '*.md'
10-
- '*.nimble'
11-
- '.gitignore'
12-
- 'LICENSE'
13-
- '**/FUNDING.yml'
14-
- '**/tests.yml'
15-
- '**/examples.yml'
16-
- '**/language_bindings.yml'
17-
- '**/jvm_bindings.yml'
18-
pull_request:
19-
paths-ignore:
20-
- '.github/ISSUE_TEMPLATE/*'
21-
- '*.md'
22-
- '*.nimble'
23-
- '.gitignore'
24-
- 'LICENSE'
25-
- '**/FUNDING.yml'
26-
- '**/tests.yml'
27-
- '**/examples.yml'
28-
- '**/language_bindings.yml'
29-
- '**/jvm_bindings.yml'
30-
31-
permissions:
32-
contents: write
33-
34-
jobs:
35-
before:
36-
runs-on: windows-latest
37-
if: "! contains(github.event.head_commit.message, '[skip ci]')"
38-
steps:
39-
- run: echo "not contains '[skip ci]'"
40-
41-
docs:
42-
runs-on: windows-latest
43-
needs: before
44-
env:
45-
nim_version: '2.0.0'
46-
node_version: '20'
47-
steps:
48-
- uses: actions/checkout@v3
49-
50-
- name: Use Node.js ${{ env.node_version }}
51-
uses: actions/setup-node@v1
52-
with:
53-
node-version: ${{ env.node_version }}
54-
55-
- name: Install uglify-js 👀
56-
run: |
57-
npm install uglify-js -g
58-
59-
- name: Cache nimble
60-
id: cache-nimble
61-
uses: actions/cache@v1
62-
with:
63-
path: ~/.nimble
64-
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
65-
66-
- uses: jiro4989/setup-nim-action@v1
67-
with:
68-
nim-version: ${{ env.nim_version }}
69-
70-
- name: Install Dependencies 🔃
71-
run: |
72-
nimble refresh
73-
nimble install -y
74-
75-
- name: Generate API documents 📃
76-
run: nim doc --index:on -d:docgen --project --out:docs --hints:off src/happyx.nim
77-
78-
- name: Build HappyX website 🌐
79-
timeout-minutes: 2
80-
run: |
81-
cd ./examples/website/src/
82-
nim js -d:production -d:release --opt:size --hints:off --warnings:off --out:main_full.js main
83-
uglifyjs main_full.js -c -m --mangle-props regex=/N[ST]I\w+/ -o main.js
84-
cd ../../..
85-
mkdir ./docs/happyx/public/
86-
mkdir ./docs/public/
87-
cp ./examples/website/src/index.html ./docs/
88-
cp ./examples/website/src/main.js ./docs/
89-
cp ./examples/website/src/happyx/public/* ./docs/happyx/public/
90-
cp ./examples/website/src/happyx/public/* ./docs/public/
91-
92-
- name: Deploy documents 💨
93-
uses: peaceiris/actions-gh-pages@v3
94-
with:
95-
github_token: ${{ secrets.GITHUB_TOKEN }}
96-
publish_dir: ./docs
97-
if: github.ref == 'refs/heads/master'
1+
name: Github Pages 🌐
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
paths-ignore:
8+
- '.github/ISSUE_TEMPLATE/*'
9+
- '*.md'
10+
- '*.nimble'
11+
- '.gitignore'
12+
- 'LICENSE'
13+
- '**/FUNDING.yml'
14+
- '**/tests.yml'
15+
- '**/examples.yml'
16+
- '**/language_bindings.yml'
17+
- '**/jvm_bindings.yml'
18+
19+
permissions:
20+
contents: write
21+
22+
jobs:
23+
before:
24+
runs-on: windows-latest
25+
if: "! contains(github.event.head_commit.message, '[skip ci]')"
26+
steps:
27+
- run: echo "not contains '[skip ci]'"
28+
29+
docs:
30+
runs-on: windows-latest
31+
needs: before
32+
env:
33+
nim_version: '2.0.0'
34+
node_version: '20'
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: Use Node.js ${{ env.node_version }}
39+
uses: actions/setup-node@v1
40+
with:
41+
node-version: ${{ env.node_version }}
42+
43+
- name: Install uglify-js 👀
44+
run: |
45+
npm install uglify-js -g
46+
47+
- name: Cache nimble
48+
id: cache-nimble
49+
uses: actions/cache@v1
50+
with:
51+
path: ~/.nimble
52+
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
53+
54+
- uses: jiro4989/setup-nim-action@v1
55+
with:
56+
nim-version: ${{ env.nim_version }}
57+
58+
- name: Install Dependencies 🔃
59+
run: |
60+
nimble refresh
61+
nimble install -y
62+
63+
- name: Generate API documents 📃
64+
run: nim doc --index:on -d:docgen --project --out:docs --hints:off src/happyx.nim
65+
66+
- name: Build HappyX website 🌐
67+
timeout-minutes: 2
68+
run: |
69+
cd ./examples/website/src/
70+
nim js -d:production -d:release --opt:size --hints:off --warnings:off --out:main_full.js main
71+
uglifyjs main_full.js -c -m --mangle-props regex=/N[ST]I\w+/ -o main.js
72+
cd ../../..
73+
mkdir ./docs/happyx/public/
74+
mkdir ./docs/public/
75+
cp ./examples/website/src/index.html ./docs/
76+
cp ./examples/website/src/main.js ./docs/
77+
cp ./examples/website/src/happyx/public/* ./docs/happyx/public/
78+
cp ./examples/website/src/happyx/public/* ./docs/public/
79+
80+
- name: Deploy documents 💨
81+
uses: peaceiris/actions-gh-pages@v4
82+
with:
83+
github_token: ${{ secrets.GITHUB_TOKEN }}
84+
publish_dir: ./docs
85+
if: github.ref == 'refs/heads/master'

0 commit comments

Comments
 (0)