Skip to content

m4w/patternplate-transform-typescript

 
 

Repository files navigation

TypeScript transform for patternplate patterns

patternplate-transform-typescript

GitHub license npm Travis Coverage Status Commitizen friendly Standard Version

Installation

npm install --save-dev typescript patternplate-transform-typescript

Usage

// configuration/patternplate-server/transforms.js
module.exports = {
  'typescript': {
    inFormat: 'tsx',
    outFormat: 'js',
    opts: {
      target: 'es5',
      module: 'commonjs',
      jsx: 'react'
    }
  },
  'react-to-markup': {
    inFormat: 'js',
    outFormat: 'html',
    opts: {
      automount: true
    }
  }
};

// configuration/patternplate-server/pattern.js
module.exports = {
  formats: {
    js: {
      transforms: ['typescript', 'react-to-markup']
    }
  }
};

Note: Currently there are a few transpiler/compiler defaults which are not overridable


Built by (c) Markus Wolf. Released under the MIT license.

About

TypeScript transform for patternplate

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.1%
  • JavaScript 0.9%