0.3.1 • Published 5 months ago

kirby-template-sugar v0.3.1

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

Kirby Template Sugar

CLI Usage

No need to install the package, just run it with npx.

Build

Compile all files inside site/templates and site/snippets into site/dist. Note: we're using site as the root folder, so the other paths will be relative to it.

npx kirby-template-sugar "{templates,snippets}/*.kirby" --root site --outDir dist

Development

Same as build but with the --watch flag

npx kirby-template-sugar "{templates,snippets}/*.kirby" --root site --outDir dist --watch

Manual Usage

Install the package with

npm i kirby-template-sugar -D

and then

import { transform, transformFiles, watchFiles } from 'kirby-template-sugar'

const options = { root: 'src', outDir: 'dist' }

// either watch files
watchFiles('**/*.kirby', options)

// or compile them once
transformFiles('**/*.kirby', options)

// or compile a string
const result = transform(`<snippet:test $prop="<? true ?>" />`)
0.3.0

6 months ago

0.3.1

5 months ago

0.2.5

8 months ago

0.1.0

10 months ago

0.2.1

10 months ago

0.1.2

10 months ago

0.2.0

10 months ago

0.1.1

10 months ago

0.2.3

10 months ago

0.2.2

10 months ago

0.1.3

10 months ago

0.2.4

9 months ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago