JSPM

@roots/bud-typescript

6.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 417
  • Score
    100M100P100Q93960F
  • License MIT

Adds Typescript support to Bud.

Package Exports

  • @roots/bud-typescript
  • @roots/bud-typescript/extension
  • @roots/bud-typescript/tsconfig/tsconfig.json
  • @roots/bud-typescript/typecheck

Readme

bud.js

MIT License npm Follow Roots

@roots/bud-typescript

Adds Typescript support to Bud.


Installation

Install @roots/bud-typescript to your project.

Yarn:

yarn add @roots/bud-typescript --dev

npm:

npm install @roots/bud-typescript --save-dev

Usage

Typechecking

:::info

This step is optional but recommended.

:::

:::danger Known issue

bud.typescript.typecheck.enable() will die when using ts-bud

It is unclear what the problem is as of right now (see #1480). In order to enable typechecking you must author your config file in JS until this is resolved.

:::

By default TypeScript files will only be compiled to JS during builds. If you also want typechecking, you can enable it in your bud configuration:

bud.typescript.typecheck.enable();

Usage

If you are authoring your config file in TypeScript you must use the ts-bud command instead of bud.

General ts configuration is handled using a standard tsconfig.json in your project root. See the TypeScript docs on tsconfig.json for more information.

There is a base tsconfig available for you to extend:

{
  "extends": "@roots/bud-typescript/tsconfig/tsconfig.json"
}

Contributing

Contributions are welcome from everyone.

We have contribution guidelines to help you get started.

License

@roots/bud-typescript is licensed under MIT.

Community

Keep track of development and community news.

Sponsors

Help support our open-source development efforts by becoming a patron.

KM Digital Carrot C21 Redwood Realty WordPress.com Pantheon