@bconnorwhite/bob

Bob is a toolkit for TypeScript projects


Keywords
bob, build, typescript, watch, clean, react, babel, node, docker, line, count, tool, tools, toolkit, publish, release, commit, lint, push, start, run, test, nodejs
License
MIT
Install
npm install @bconnorwhite/bob@2.9.5

Documentation

@bconnorwhite/bob

dependencies minzipped size typescript npm

Bob builds and watches typescript projects. He'll even clean up your build directory when you delete or move files.

yarn add @bconnorwhite/bob

Bob is also highly opinionated.

  • Your source directory must be ./src
  • Your build directory must be ./build
  • Bob only builds .ts and .tsx files, but he will copy over any other file types.

Commands

bob
Usage: bob [options] [command]

Options:
  -V, --version    output the version number
  -h, --help       display help for command

Commands:
  build [options]
  watch [options]
  clean
  help [command]   display help for command
bob build
Usage: bob build [options]

Options:
  -b --build        Only output build files
  -d --declaration  Only output declaration files
  -w --watch        Watch files for changes
  -h, --help        display help for command
bob watch
Usage: bob watch [options]

Options:
  -b --build        Only output build files
  -d --declaration  Only output declaration files
  -h, --help        display help for command
bob clean
Usage: bob clean [options]

Options:
  -h, --help  display help for command

Here is Bob's babel.config.json:

{
  "presets": [
    "@babel/preset-typescript",
    "@babel/preset-env",
    "@babel/preset-react"
  ],
  "plugins": [
    "@babel/plugin-transform-runtime"
  ]
}

Here is Bob's tsconfig.json:

{
  "compilerOptions": {
    "declaration": true,
    "emitDeclarationOnly": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "jsx": "preserve",
    "lib": [
      "dom",
      "esnext"
    ],
    "module": "esnext",
    "moduleResolution": "node",
    "noFallthroughCasesInSwitch": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "outDir": "./build",
    "removeComments": true,
    "resolveJsonModule": true,
    "skipLibCheck": true,
    "strict": true,
    "target": "esnext"
  },
  "include": [
    "./src/*.ts*"
  ]
}