babel-plugin-s2s-action-root-ts
v1.2.0
Published
generate action root
Downloads
2
Readme
babel-plugin-s2s-action-root-ts
plugin for https://github.com/akameco/s2s
Install
$ npm install --save-dev babel-plugin-s2s-action-root-ts
Example
IN:
OUT:
/***** Do not edit this file *****/
import { Action as FooAction } from "../examples/foo/actionTypes";
import { Action as BarAction } from "../containers/bar/actionTypes";
export type Action = FooAction | BarAction;
Usage
module.exports = {
watch: './**/*.ts',
plugins: [
{
test: /actionTypes.ts$/,
plugin: ['s2s-action-root-ts', {
input: 'containers/**/actionTypes.ts',
output: 'types/action.ts',
globOptions: {},
}],
},
],
}
input,
type: string
required: true
glob pattern.
output
type: string
required: true
outputh path.
globOptions
type: object
required: false
See https://github.com/isaacs/node-glob#options