build: ⚡ build megalodon with swc
This commit is contained in:
parent
697af012bc
commit
f4b275f7b0
4 changed files with 40 additions and 5 deletions
|
@ -7,3 +7,4 @@ This directory contains all of the packages Calckey uses.
|
|||
- `client`: Web interface written in Vue3 and TypeScript
|
||||
- `sw`: Web [Service Worker](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) written in TypeScript
|
||||
- `calckey-js`: TypeScript SDK for both backend and client, also published on [NPM](https://www.npmjs.com/package/calckey-js) for public use
|
||||
- `megalodon`: TypeScript library used for Mastodon compatibility
|
||||
|
|
19
packages/megalodon/.swcrc
Normal file
19
packages/megalodon/.swcrc
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/swcrc",
|
||||
"jsc": {
|
||||
"parser": {
|
||||
"syntax": "typescript",
|
||||
"dynamicImport": true,
|
||||
"decorators": true
|
||||
},
|
||||
"transform": {
|
||||
"decoratorMetadata": true
|
||||
},
|
||||
"target": "es2022"
|
||||
},
|
||||
"minify": false,
|
||||
"module": {
|
||||
"type": "commonjs",
|
||||
"strict": true
|
||||
}
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
"main": "./lib/src/index.js",
|
||||
"typings": "./lib/src/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc -p ./",
|
||||
"build": "pnpm swc src -d built -D",
|
||||
"lint": "eslint --ext .js,.ts src",
|
||||
"doc": "typedoc --out ../docs ./src",
|
||||
"test": "NODE_ENV=test jest -u --maxWorkers=3"
|
||||
|
@ -49,6 +49,8 @@
|
|||
"async-lock": "1.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@swc/cli": "^0.1.62",
|
||||
"@swc/core": "^1.3.62",
|
||||
"@types/core-js": "^2.5.0",
|
||||
"@types/form-data": "^2.5.0",
|
||||
"@types/jest": "^29.4.0",
|
||||
|
@ -77,5 +79,8 @@
|
|||
"directories": {
|
||||
"lib": "lib",
|
||||
"test": "test"
|
||||
}
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@swc/core-android-arm64": "1.3.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -789,7 +789,7 @@ importers:
|
|||
version: 2.30.0
|
||||
emojilib:
|
||||
specifier: github:thatonecalculator/emojilib
|
||||
version: github.com/thatonecalculator/emojilib/9d16541664dc8fef3201ae9b647477070676a52e
|
||||
version: github.com/thatonecalculator/emojilib/15fd9504f943763a057ff803ee2009ec0524c96b
|
||||
escape-regexp:
|
||||
specifier: 0.0.1
|
||||
version: 0.0.1
|
||||
|
@ -970,7 +970,17 @@ importers:
|
|||
ws:
|
||||
specifier: 8.12.0
|
||||
version: 8.12.0
|
||||
optionalDependencies:
|
||||
'@swc/core-android-arm64':
|
||||
specifier: 1.3.11
|
||||
version: 1.3.11
|
||||
devDependencies:
|
||||
'@swc/cli':
|
||||
specifier: ^0.1.62
|
||||
version: 0.1.62(@swc/core@1.3.62)(chokidar@3.3.1)
|
||||
'@swc/core':
|
||||
specifier: ^1.3.62
|
||||
version: 1.3.62
|
||||
'@types/async-lock':
|
||||
specifier: 1.4.0
|
||||
version: 1.4.0
|
||||
|
@ -17434,8 +17444,8 @@ packages:
|
|||
url-polyfill: 1.1.12
|
||||
dev: true
|
||||
|
||||
github.com/thatonecalculator/emojilib/9d16541664dc8fef3201ae9b647477070676a52e:
|
||||
resolution: {tarball: https://codeload.github.com/thatonecalculator/emojilib/tar.gz/9d16541664dc8fef3201ae9b647477070676a52e}
|
||||
github.com/thatonecalculator/emojilib/15fd9504f943763a057ff803ee2009ec0524c96b:
|
||||
resolution: {tarball: https://codeload.github.com/thatonecalculator/emojilib/tar.gz/15fd9504f943763a057ff803ee2009ec0524c96b}
|
||||
name: emojilib
|
||||
version: 3.0.10
|
||||
dev: true
|
||||
|
|
Loading…
Reference in a new issue