1.0.4 • Published 5 years ago
yinchtml v1.0.4
yinchtml
a html include tool
usage
as a global module
npm install yinchtml -g
yinchtml .
yinchtml your path
as a local module
npm install yinchtml
npx yinchtml .
npx yinchtml your path
yinchtml-config.js
this is config file for yinchtml,it is necessary. the struct like this.
module.exports = [
{
tpl:'tpl',
inc:'.',
dist:'.'
},
{
tpl:'tpl',
inc:'.',
dist:'test'
}
];
include tag
the html <!--[include file_path]-->
string will be replace by file data.
write it in anywhere that you want to include other html file.
tpl
:the html template directory,such as .php file
inc
:the include directory,such asphp <?php include('./head.php'); ?>
head file
inc
:the include directory,such asphp <?php include('./head.php'); ?>
script file
dist
:the dist directory,the final html files