@macaron-elements/compiler
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

The Macaron compiler library and command-line interface

This library / CLI is the compiler that converts Macaron files to Web Components.

Installation

npm install -g @macaron-elements/compiler

Usage

# compile to src/*.js
macaron src/*.macaron

# compile to src/*.js and watches for changes
macaron --watch src/*.macaron

# compile to dist/*.js
macaron --output=dist src/*.macaron
macaron [options] <file paths or glob pattern>
Option Description
--watch Watch for changes and re-generate the component.
-o, --output Output directory. Defaults to the parent directory of the input

Help

macaron help

API

import { compile } from "@macaron-elements/compiler";

const data = fs.readFileSync("src/test.macaron", "utf-8");
const out = compile(data);
fs.writeFileSync("src/test.js", out);

Readme

Keywords

none

Package Sidebar

Install

npm i @macaron-elements/compiler

Weekly Downloads

3

Version

0.3.0

License

MIT

Unpacked Size

5.22 MB

Total Files

18

Last publish

Collaborators

  • seanchas116