1.0.4 • Published 6 years ago

gulp-pool v1.0.4

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

gulp-jspool

include any files npm.io

Installation

npm install gulp-pool

use

//in code
'@include(./src/ctr.js)'

//in gulpfile.js
  ...
  let pool=require("gulp-pool");
  ...
  gulp.src("main.js").pipe(pool()).pipe(gulp.dest("dest"));
  //you can use pool({data:{name:"",age:""}}) to configure data parameters in the template

write

//file structure
main.js
index.html
html
    header.html
    footer.html
lib  
   utils.js
app
   action
         index.js
         lib
            slide.js


//in main.js
.... some code
'@include(./lib/utils.js)';
'@include(./app/action/index.js)';
.... some code


//in action.js
'@include(./lib/slide.js)'


//in index.html
....some code
'@include(./html/header.html)';
...
'@include(./html/footer.html)';
...some code

//in header.html,?name? use ths value in the configuration of ...pipe(pool({name:"your"}))
<div>?name?</div>

next release

  • supports global profile path