Skip to content

Commit 5841b9c

Browse files
committed
refactor: 使用napi重写
1 parent 41370c6 commit 5841b9c

File tree

24 files changed

+846
-2224
lines changed

24 files changed

+846
-2224
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ jobs:
178178
sudo apt install -y fuse
179179
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
180180
chmod +x pyuploadtool-x86_64.AppImage
181-
./pyuploadtool-x86_64.AppImage **build/wcc **build/wcsc
181+
./pyuploadtool-x86_64.AppImage **build/wcc **build/wcsc **build/wcc_module.node **build/wcsc_module.node
182182
183183
- name: Release
184184
uses: softprops/action-gh-release@v1

.mocharc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ module.exports = {
77
// spec: "./test/spec/**/*.spec.ts",
88
spec: [
99
"./test/spec/**/*.spec.ts",
10+
// 'test/spec/wcc/module/module.spec.ts',
11+
// 'test/spec/issue/137/issue137.spec.ts',
1012
// 'test/spec/issue/129/issue129.spec.ts',
1113
// 'test/spec/issue/115/issue115.spec.ts',
1214
// 'test/spec/wcc/module/module.spec.ts',

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"args": [
1313
"${workspaceFolder}/test/runner/nwjs/compiler.js",
1414
"wcsc",
15-
"${workspaceFolder}/test/spec/issue/129/data/example.json"
15+
"${workspaceFolder}/test/spec/issue/137/data/example.json"
1616
],
1717
"cwd": "${workspaceFolder}"
1818
},

CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ project(wx_complier VERSION 0.1.0 LANGUAGES C CXX)
33

44
set(CMAKE_CXX_STANDARD 14)
55
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
6-
# set(CMAKE_VERBOSE_MAKEFILE ON)
7-
# message("before: ${CMAKE_CXX_FLAGS_DEBUG}")
8-
# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O1")
9-
# message("after: ${CMAKE_CXX_FLAGS_DEBUG}")
6+
set(TARGET_ARCH x64)
7+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_REENTRANT")
108

119
add_executable(wcc
1210
src/wcc.cpp

changelog.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
## 🌈 v0.1.4 / 2025-05-02
1+
## 🌈 v0.1.4 / 2025-05-01
22

33
🐞 Bug Fixes
4-
- 修正:Arch Linux崩溃
4+
- `WXSS::CSSTreeLib::CSSSyntaxTree::RenderCode`: Arch linux会崩溃.(数组访问越界)
55

66
## 🌈 v0.1.3 / 2025-02-17
77

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "3"
21
services:
32
wx_compiler:
43
image: jiyecafe/wechat-devtools-build:v3

docker/docker-entrypoint

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
22

3+
set -ex
4+
5+
npm install -g pnpm@8
6+
pnpm install
37
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC
48
echo "----"
59
strings /lib/x86_64-linux-gnu/libc.so.6 | grep GLIBC_

docker/entrypoint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -ex
23
gcc --version
34
g++ --version
45
# cmake --verion

package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@
1111
"keywords": [],
1212
"author": "",
1313
"license": "ISC",
14+
"dependencies": {
15+
"bindings": "^1.5.0",
16+
"cmake-js": "^7.3.0",
17+
"node-addon-api": "^7.1.0",
18+
"node-api-headers": "^1.5.0"
19+
},
20+
"binary": {
21+
"napi_versions": [
22+
7
23+
]
24+
},
1425
"devDependencies": {
1526
"@babel/cli": "^7.18.10",
1627
"@babel/core": "^7.18.13",

0 commit comments

Comments
 (0)