0.0.20 • Published 3 years ago

@barusu-react/rollup-plugin-postcss-dts v0.0.20

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

npm version npm download npm license

Install

yarn add --dev @barusu-react/rollup-plugin-postcss-dts

Examples

Options

dts

  • boolean

    • true: use default CSSDtsProps

    • false: don't generate *.d.ts (default)

  • CSSDtsProps

    • indent: {string}:

      • Default: (two spaces)
    • semicolon: {boolean}: whether to add a semicolon at the end of the statement

      • Default: false
    • encoding: {string}: encoding of the target '.d.ts' file

      • Default: utf-8
    • alsoCreateTargetCssDts: {boolean}: whether to aslo create a '*.d.s' file for the output CSS files

      • Default: false
    • hook: {GetCSSTokenHook}:

      interface GetCSSTokenHook {
        /**
         * get css tokens.
         * @param cssPath
         * @param json
         * @param outputFilePath
         * @see https://github.com/css-modules/postcss-modules#saving-exported-classes
         */
        getJSON?: (
          cssPath: string,
          json: { [key: string]: string },
          outputFilePath: string,
        ) => Promise<void> | void
      }
    • shouldGenerateDtsFile:

      /**
       * Determine whether to generate typescript declaration file
       * for the specified file
       *
       * @param cssPath         filepath of the css file
       * @param json            css class name map
       * @param outputFilepath  filepath of the ts declaration file
       */
      shouldGenerateDtsFile?: (
        cssPath: string,
        json: { [key: string]: string },
        outputFilePath: string,
      ) => boolean

Other Options

References

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

4 years ago

0.0.12

4 years ago

0.0.13

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago