composite-call-with-dates
v0.2.0
Published
Package which makes ts-transformer-dates and composite-call packages work well together
Downloads
232
Readme
composite-call-with-dates
Package which makes ts-transformer-dates and composite-call packages work well together
Install
npm install composite-call-with-dates
Or
yarn add composite-call-with-dates
Usage
- Replace dates and composite-call transformers with this transformer:
- const datesTransformer = require('ts-transformer-dates/lib/transformer').default;
- const composeTransformer = require('composite-call/dist/transformer');
+ const composeWithDatesTransfomrer = require('composite-call-with-dates/dist/transformer').default;
module.exports = {
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'awesome-typescript-loader',
options: {
getCustomTransformers: function(program) {
return {
before: [
- composeTransformer(program),
- datesTransformer(program),
+ composeWithDatesTransfomrer
],
};
},
},
},
]
}
}
- And then, instead of:
import { compose } from 'composite-call';
Use:
import { compose } from 'composite-call-with-dates';
And that's it!
More information
More information about Api and transformers you can find here:
License
MIT © Artiom Tretjakovas