Skip to content

Commit

Permalink
feat: SWC WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
colin969 committed Jun 29, 2022
1 parent 3f6ac1f commit e2d5773
Show file tree
Hide file tree
Showing 11 changed files with 1,457 additions and 381 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json') }}
- name: Install Dependencies
run: npm install
run: npm install --force
if: steps.cache.outputs.cache-hit != 'true'
env:
CI: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json') }}
- name: Install Dependencies
run: npm install
run: npm install --force
if: steps.cache.outputs.cache-hit != 'true'
env:
CI: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json') }}
- name: Install Dependencies
run: npm install
run: npm install --force
if: steps.cache.outputs.cache-hit != 'true'
env:
CI: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json') }}
- name: Install Dependencies
run: npm install
run: npm install --force
if: steps.cache.outputs.cache-hit != 'true'
env:
CI: true
Expand Down
15 changes: 15 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
},
"transform": {
"react": {
"runtime": "automatic"
},
"legacyDecorator": true,
"decoratorMetadata": true
}
}
}
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const publishInfo = [
/* ------ Watch ------ */

gulp.task('watch-back', (done) => {
execute('npx ttsc --project tsconfig.backend.json --pretty --watch', done);
execute('npx swc -w --config-file swcrc.back.json -d build src', done);
});

gulp.task('watch-renderer', (done) => {
Expand All @@ -113,7 +113,7 @@ gulp.task('watch-static', () => {
/* ------ Build ------ */

gulp.task('build-back', (done) => {
execute('npx ttsc --project tsconfig.backend.json --pretty', done);
execute('npx swc --config-file swcrc.back.json -d build src', done);
});

gulp.task('build-renderer', (done) => {
Expand Down
Loading

0 comments on commit e2d5773

Please sign in to comment.