grunt-html-include

Support module development for html

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
grunt-html-include
210.1.210 years ago10 years agoMinified + gzip package size for grunt-html-include in KB

Readme

html-include

How to use
  1. @@include('filename')
Write the content of `./filename.html` here.
If `./filename.html` doesn't exist, it will search for it in the directory of `/components`.
Besides, the `/components/filename.css` will be writeen to `/css/filename.css`. So that,
you should put your common HTML components and CSS in the directory of `/components`
  1. @@include('filename', {"title": "HTML Include"})
This will replace all the `@@title@@` in `./filename.html` with `HTML Include`.
  1. @@include('filename', {"left": "@@include('leftContent')", "right": "@@include('rightContent')"})
Support nesting include.
  1. You could use @@include in the including file.
  1. Configuration
`options: {`
`workingDir: 'src',`
`componentCSS: 'css/components.css'`
`},`
`files: {`
`'dest': ['src/index.html', 'src/*.html']`
`}`
`workingDir`: the html source directory
`componentCSS`: the file of components.css
`files`: the files to 'html-include'