0.8.0 • Published 3 years ago

typescript-xwind-plugin v0.8.0

Weekly downloads
120
License
MIT
Repository
github
Last release
3 years ago

typescript-xwind-plugin

NPM version License

This package is a typescript language service plugin that adds editor support for xwind tagged template syntax: tw`...` or xw`...`

Install

# with npm
npm install -D typescript-xwind-plugin

# with Yarn
yarn add -D typescript-xwind-plugin

Usage

Configure the plugins section in your tsconfig.json to add the language service plugin.

{
  "compilerOptions": {
    //compiler options...
    "plugins": [
      {
        "name": "typescript-xwind-plugin",
        "config": ".../User/.../tailwind.config.js", //Absolute filepath to tailwind config
        "ignoreErrors": null, //regex pattern string or null
        "tags": ["tw", "xw"] //tags that trigger xwind plugin
      }
    ]
  }
}

Note: If you're using VS Code, you'll have to use the workspace TypeScript version or install the VS Code extension.

License

MIT. Copyright (c) 2020 Arthur Petrie.