2.0.0 • Published 2 years ago

ember-template-preprocessor v2.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years 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

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago