0.3.1 • Published 7 years ago

deviate-html2ts v0.3.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

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.
0.3.1

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago