0.0.14 • Published 9 months ago

create-vee v0.0.14

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

Turn into .TS

Install

ts-node and typescript

npm install --save-dev ts-node typescript

Test

ts-node script.ts

Update

package.json

"main": "index.js",
  "scripts": {
    "v-kit": "ts-node index.ts",
    "build": "tsc"
  },
  "bin": {
    "create-v-kit": "ts-node index.ts"
  },

run function

npm run v-kit

Error Encountered

ts-node wasn't supported by node v21^

Resolve

  • remove "type": "module",
  • switch back to v16

chalk 4.1.2^ up are not commonjs compatible

Resolve

  • npm install chalk@4.1.2 --save

make a file executable for nodejs

  • add this line #!/usr/bin/env node

no such file or directory

  • const sourcePath = path.join(__dirname, 'tmp/v-kit')