1.0.2 • Published 6 years ago

parcel-plugin-eft v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

parcel-plugin-eft

Add ef.js template support for parcel bundler.

Install

Install via yarn:

yarn add --dev parcel-plugin-eft

or via npm:

npm install --save-dev parcel-plugin-eft

Usage

With this plugin set up properly, you can then import any .eft or .ef template files directly:

import Hello from './hello.eft'

const helloWorld = new Hello({
  $data: {
    name: 'World'
  }
})

helloWorld.$mount({target: document.body})

Typescript Shims

Create shims.d.ts under your project root:

declare module '*.ef' {
  const template: any
  export default template;
}
declare module '*.eft' {
  const template: any
  export default template;
}