deviate-html2ts
v0.3.1
Published
Based on "grunt-html2ts" https://www.npmjs.com/package/grunt-html2ts and "gulp-html-to-ts" https://github.com/AbraaoAlves/gulp-html-to-ts
Downloads
14
Readme
Html2ts
Based on "grunt-html2ts" https://www.npmjs.com/package/grunt-html2ts and "gulp-html-to-ts" https://github.com/AbraaoAlves/gulp-html-to-ts
But with the ability to run straight from NPM.
Install
npm install deviate-html2ts --save-dev
Run
Add to packages.json
under scripts:
"html2ts-build": "node /node_modules/deviate-html2ts/html2ts.js -b",
"html2ts-watch": "node /node_modules/deviate-html2ts/html2ts.js -w",
"html2ts-buildandwatch": "node /node_modules/deviate-html2ts/html2ts.js -bw",
"html2ts-build-single-projects": "node /node_modules/deviate-html2ts/html2ts.js -b -p project1",
"html2ts-build-multiple-projects": "node /node_modules/deviate-html2ts/html2ts.js -b -p project1 -p project2",
Options
-w
for watching all html templates using the glob [./**/*.tpl.html]
-b
for building all html templates using the glob [./**/*.tpl.html]
-p
for building specific projects, multiple -p can be used for specifing multiple projects (only useful when using options file)
Options file (Optional)
Place html2ts.json
in the same folder as your package.json
{
"projects": [
{
"name": "default",
"projectFolder": "",
"globPattern": './**/*.tpl.html',
"outFolder": null
}
]
}
outFolder
is relative to the project folder, leave empty to generate in the same folder.
globPattern
for projects needs to be **/*.tpl.html
if the project folder is specified.
Todo
- Clean all templates before build.
- When using -bw make sure build completes before the watch starts.