2.0.0 • Published 10 months ago

ember-template-preprocessor v2.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

ember-template-preprocessor

instead of using ember-template-imports to find, parse & transform templates, this can be used.

const { parseTemplates, preprocessEmbeddedTemplates, transform } = require('ember-template-preprocessor');
const { TEMPLATE_TAG_NAME, TEMPLATE_LITERAL_IDENTIFIER, TEMPLATE_LITERAL_MODULE_SPECIFIER } = require('ember-template-preprocessor');

the output of parseTemplates is

<template>Hello!</template>
[
    {
        "contentRange": [
            10,
            16,
        ],
        "contents": "Hello!",
        "endRange": {
            "end": 27,
            "start": 16,
        },
        "range": [
            0,
            27,
        ],
        "startRange": {
            "end": 10,
            "start": 0,
        },
        "tagName": "template",
        "type": "template-tag",
    },
]

to transform

const { transform } = require('ember-template-preprocessor');
const transformed = transform('...')
2.0.0

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago