composite-call-with-dates
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

composite-call-with-dates

Package which makes ts-transformer-dates and composite-call packages work well together

npm version npm downloads vulnerabilities

Install

npm install composite-call-with-dates

Or

yarn add composite-call-with-dates

Usage

  1. 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
                ],
            };
          },
        },
      },
    ]
  }
}
  1. 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

Created with aqu 🌊

Package Sidebar

Install

npm i composite-call-with-dates

Weekly Downloads

12

Version

0.2.0

License

MIT

Unpacked Size

46.1 kB

Total Files

14

Last publish

Collaborators

  • sirse
  • frachtbot