version: 0.2
phases:
install:
commands:
- npm install
build:
commands:
- npm run build
- mkdir /tmp/artifact/
- cp -r /code/build/* /tmp/artifact/
artifacts:
files:
- '**/*'
discard-paths: yes
base-directory: /tmp/artifact/
{
"name": "my-express-app",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"start": "node app.js",
"build": "tsc"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.17.1",
"typescript": "^4.3.5"
}
}
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"outDir": "build",
"rootDir": "src",
"esModuleInterop": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"sourceMap": true,
"strict": true,
"typeRoots": ["./node_modules/@types"],
"lib": ["es6", "dom"]
}
}
这些步