Is there any way instead to have a pre-run build s...
# typescript
c
Is there any way instead to have a pre-run build step or anything for me to run
tsc -b
?
l
Use the
compile
property of your package.json
script
block then
npm run compile
. This is the section from my package.json:
Copy code
json
  "scripts": {
    "compile": "tsc",
    "lint": "node_modules/tslint/bin/tslint --project tsconfig.json",
    "prepare": "npm run compile",
    "test": "node --trace-warnings --unhandled-rejections=strict node_modules/mocha/bin/_mocha --config test/mocha/.mocharc.json"
  },
c
I was hoping some sort of hook in the pulumi cli to automatically run a command when you run
pulumi up
etc
l
pulumi up has it built in. It compiles typescript dynamically, or something. I never see the compiled js files anywhere...
Only need the npm config stuff for running your tests.