0.0.7 • Published 10 years ago

gulp-freemarker-axd v0.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

gulp-freemarker-axd

freemarker plugin for gulp

Usage

First, install gulp-freemarker-axd as a development dependency:

npm install --save-dev gulp-freemarker-axd

Then, add it to your gulpfile.js:

var freemarker = require("gulp-freemarker-axd");

gulp.src("./mock/*.json")
	.pipe(freemarker({
		viewRoot: "WEB-INF/views/",
		options: {},
		globalData:"",
        directiveUrl:""
	}))
	.pipe(gulp.dest("./www"));

You should provide mock files, which type is json:

{
	"file": "hello.ftl",
	"data": {
		"name": "World"
	}
}
  • file is relative to viewRoot, gulp-freemarker-axd will read and process ${viewRoot}/${file} file.

  • data is the data model the template required.

API

freemarker(options)

options.viewRoot

Type: String Required: true

The directory where all templates files in.

options.options

Type: Object Default: {}

Options for Freemarker.js. see also https://github.com/ijse/freemarker.js#configurations.

License

MIT License

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago