Environment setup
Follow the steps to setup the project environment.
Create folder
mkdir -p tsdk-quickstart/server/src
cd tsdk-quickstart
Create tsconfig.json:
config='{
"compilerOptions": {
"module": "commonjs",
"declaration": false,
"removeComments": true,
"esModuleInterop": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"strictNullChecks": true,
"target": "es2017",
"sourceMap": true,
"baseUrl": "./",
"outDir": "./build",
"paths": {
"@/*": ["./*"]
},
"incremental": true,
"skipLibCheck": true
},
"exclude": ["./next-app"]
}'
echo $config > tsconfig.json
Generate config file: tsdk.config.js
In directory ./server, run below command to generate tsdk.config.js(tsdk.config README):
Export module
Switch to directory ./server
, run commands to generate fe-sdk
folder:
- tsdk.config.js
- package.json
- package.json
- pnpm-workspace.yaml
Folder and file explain: