ember-cli-typescript-blueprint-polyfill

0.1.0 • Public • Published

ember-cli-typescript-blueprint-polyfill

This library exports a function that will polyfill the Ember CLI implementation of TypeScript blueprint functionality in Ember apps and addons that are on a version of Ember CLI that does not include support for TypeScript blueprints.

Usage

For any blueprint that is authored in TypeScript (e.g. whose files directory contains .ts files), in the blueprint's index.js:

  • add shouldTransformTypeScript: true,
  • require typescriptBlueprintPolyfill and call it in the blueprint's init method, passing in this as the only argument
// my-app/blueprints/foo/index.js
const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');

module.exports = {
  shouldTransformTypeScript: true,

  init() {
    this._super && this._super.init.apply(this, arguments);
    typescriptBlueprintPolyfill(this);
  },
};

Package Sidebar

Install

npm i ember-cli-typescript-blueprint-polyfill

Weekly Downloads

79,679

Version

0.1.0

License

MIT

Unpacked Size

9.41 kB

Total Files

6

Last publish

Collaborators

  • ef4
  • rwjblue
  • chriskrycho
  • cafreeman