Exemplo n.º 1
0
gulp.task('ejs', function () {
  return gulp.src(['src/ejs/**/*.ejs', '!src/ejs/**/_*.ejs'])
    .pipe(plumber(plumberRequest))
    .pipe(ejs(ejsOptions))
    .pipe(minifyHTML())
    .pipe(gulp.dest('dest/'));
});
Exemplo n.º 2
0
gulp.task('ejs', function() {
  return gulp.src(paths.ejsPath)
    .pipe(ejs()
      .on('error', gutil.log)
      .on('error', gutil.beep))
    .pipe(gulp.dest(paths.assetsOutput));
});
Exemplo n.º 3
0
const generate = (config) => {
  if (!argv.name || !argv.path || !argv.type){
    const map = {
      "name" : isDefined(argv.name),
      "path" : isDefined(argv.path),
      "type" : isDefined(argv.type)
    }
    console.log(map);

    console.log("############################");
    console.log("COMPONENT TEMPLATES ARE NOT GENERATED");
    for(arg in map){
      if(!map[arg]){
        console.log(arg + ' is not defined' , argv[arg]);
      }
    }
    console.log("usage: gulp generate --path ./somepath --type nameOfType --name nameOfComponent");
    console.log("example: gulp generate --path . --type component --name myNewComponent");
    console.log("############################");
  }
  else{
    console.log(config.generator_path,argv.type);
    gulp.src(path.join(config.generator_path,argv.type,"*"))
    .pipe(ejs({
      name: argv.name
    }).on('error',(e)=>{console.log(e);}))
    .pipe(rename((path) => {
      path.basename = path.basename.replace('temp',argv.name);
    }))
    .pipe(gulp.dest(path.join(process.env.INIT_CWD,argv.path)));
  }
}
Exemplo n.º 4
0
gulp.task('html', function () {
  var data = getPageData();
  return gulp.src('./source/*.html')
  	.pipe(ejs(data).on('error', gutil.log))
    .pipe(gulpif(COMPRESS, prettify({indent_size: 2})))
  	.pipe(gulp.dest('./build'));
});
Exemplo n.º 5
0
gulp.task('ejs', function() {
    gulp.src('source/index.ejs')
    .pipe(ejs({
        debug: true
    }))
    .pipe(gulp.dest("source"));
});
Exemplo n.º 6
0
gulp.task('ejs', function() {
	gulp.src(['./app/source/ejs/**/*.ejs','!./app/source/ejs/**/_*.ejs'])
		.pipe(plumber())
		.pipe(ejs())
		.pipe(gulp.dest('./app/public'))
		.pipe(browser.reload({stream:true}))
});
Exemplo n.º 7
0
gulp.task('inject', function() {
  var options = {
    read: false,
    ignorePath: frontEnd.baseDir,
    addRootSlash: false
  };

  var wiredepOptions = {
    directory: frontEnd.baseDir + 'bower_components/',
    ignorePath: '../../' + frontEnd.baseDir
  };

  var sources_js = ['!' + frontEnd.baseDir + 'bower_components/**/*.js', frontEnd.baseDir + '**/*.js'];
  var sources_css = ['!' + frontEnd.baseDir + 'bower_components/**/*.css', frontEnd.baseDir + '**/*.css'];

  var ejsOptions = {
    projectName: project.name
  };

  return gulp.src('config/templates/index.html.tpl')
    .pipe(ejs(ejsOptions))
    .pipe(inject(gulp.src(sources_js), options))
    .pipe(inject(gulp.src(sources_css), options))
    .pipe(wiredep(wiredepOptions))
    .pipe(removeHtmlComments())
    .pipe(rename('index.html'))
    .pipe(gulp.dest(frontEnd.baseDir));
});
Exemplo n.º 8
0
gulp.task('ejs', () => {
    return gulp.src(config.path.ejs.src)
        .pipe(plumber({errorHandler: notify.onError('<%= error.message %>')}))
        .pipe(ejs({}, {"ext": ".html"}))
        .pipe(gulp.dest(config.path.ejs.dest))
        .pipe(browser.stream());
});
Exemplo n.º 9
0
  colors.forEach(function (color) {
    var colorStream = gulp.src('src/global-assets/images/shapes/*.svg')
      .pipe(ejs({ color: color.value }, { ext: '.svg' }))
      .pipe(gulp.dest('src/global-assets/images/shapes/' + color.name));

    streams.push(colorStream);
  });
Exemplo n.º 10
0
gulp.task('ejs', function () {
  return gulp.src(['lib/emails/**/*.ejs'])
    .pipe(ejs({
      msg: "ejs + mjml rocks"
    }))
    .pipe(gulp.dest('build/lib/emails/'))
});
Exemplo n.º 11
0
gulp.task('html.build', function() {

	var styles = fs.readFileSync('build/styles.min.css').toString();
	var scripts = fs.readFileSync('build/scripts.min.js').toString();	
	

	
	return gulp.src("source/templates/index.ejs")
    		.pipe(ejs({
    			title : "Test Suite",
    			data : {
    				styles : styles,
    				scripts  : scripts ,
    			},
    			config : {
    				styles : "production_embed",
    				scripts : "production_embed",
    				sc : shortcuts	    			
    			},
    			open : '{{',
			close : '}}'			
		})).pipe(gulp.dest("build"))
		.pipe(htmlmin({collapseWhitespace: true}))
		.pipe(rename({ suffix: '.min' }))
		.pipe(gulp.dest('build'));
});
Exemplo n.º 12
0
gulp.task('ejs', function() {
    return gulp.src('src/tpl/**/*.ejs')
        .pipe(ejs({
          msg: "Hello Gulp!"
        }))
        .pipe(gulp.dest('./src/'))
        .pipe(reload({stream:true}))
});
Exemplo n.º 13
0
gulp.task('ejs', () => {
	gulp.src(
		[path.dev + "ejs/**/*.ejs",'!' + path.dev + "ejs/**/_*.ejs"]
	)
	.pipe(plumber())
	.pipe(ejs(ejs,{"ext": ".html"}))
	.pipe(gulp.dest(path.dist))
});
Exemplo n.º 14
0
gulp.task('html', function() {
	var data = JSON.parse(fs.readFileSync(conf.params.path));

	return gulp.src(conf.source.html)
		.pipe(ejs(data))
		// .pipe(ejs())
		.pipe(gulp.dest(conf.dest.html));
});
Exemplo n.º 15
0
gulp.task("ejs", function() {
    gulp.src(
        [DEV + "/ejs/**/*.ejs",'!' + DEV + "/ejs/**/_*.ejs"]
    )
        .pipe(ejs())
        .pipe(gulp.dest(PUBLIC))
        .pipe(browser.reload({stream:true}));
});
Exemplo n.º 16
0
gulp.task("html", function () {
    gulp.src("./index.ejs")
        .pipe(ejs({}))
        .pipe(rev())
        .pipe(minifyHTML(minifyHTMLConfig))
        .pipe(rename('index.html'))
        .pipe(gulp.dest("./"));
});
Exemplo n.º 17
0
gulp.task('ejs', () => {
  const options = { config }
  const settings = { ext: '.html' }
  return gulp.src('./src/ejs/*.ejs')
    .pipe(ejs(options, settings))
    .on('error', gutil.log)
    .pipe(gulp.dest('./build'))
})
Exemplo n.º 18
0
gulp.task('ejs', function() {
return gulp.src('./src/templates/*.ejs')
  .pipe(ejs({
    utils: utils
  }).on('error', gutil.log))
  .pipe(gulp.dest('./dist'))
  .pipe(connect.reload());
});
Exemplo n.º 19
0
 const confPromise = new Promise((resolve, reject) => {
   const locals = {env: process.env, data: loadData('/nginx/data')}
   src(confGlob)
     .pipe(ejs(locals))
     .on('error', reject)
     .pipe(gulp.dest(dest))
     .on('end', resolve)
 })
Exemplo n.º 20
0
 gulp.task('EJS',function(){
   gulp.src([config.path.ejsDir,'!'+config.path.templateDir])
   .pipe(plumber({
     errorHandler: notify.onError('Error: <%= error.message %>')
   }))
   .pipe(ejs({}, {ext: '.html'}))
   .pipe(gulp.dest(config.path.afterCompileEjs));
 });
Exemplo n.º 21
0
gulp.task('build-createWebsiteDefsPhp', function () {
  return gulp.src('src/Api/Library/Shared/WebsiteInstances.ejs')
    .pipe(data(function () {
      return JSON.parse(fs.readFileSync('src/Api/Library/Shared/WebsiteInstances.json'));
    }))
    .pipe(ejs())
    .pipe(dest('src/Api/Library/Shared/:name.php'))
    .pipe(gulp.dest('src/Api/Library/Shared/'));
});
Exemplo n.º 22
0
function _compile_html(mode) {
  var json = JSON.parse(fs.readFileSync('./src/html/messages/ja.json'));
  json.mode = mode;
  gulp.src(['./src/html/*.ejs', '!./src/html/parts/**'])
    .pipe(ejs(json, {
      ext: '.html' // default extension is the same as source file
    }))
    .pipe(gulp.dest('./app/' + mode + '/ja'))
}
gulp.task('ejs', function() {
  return gulp.src(paths.src.html)
    .pipe(ejs({
        msg: "Hello Gulp!"
    }, {
        ext: '.html'
    }))
    .pipe(gulp.dest(paths.dest.html));
});
Exemplo n.º 24
0
gulp.task('dist:ejs', function() {
    return gulp.src('source/index.ejs')
    .pipe(ejs({
        debug: false
    }))
    .pipe(gulp.dest('./dist/'))
    .pipe(gzip())
    .pipe(gulp.dest('./dist/'));
});
Exemplo n.º 25
0
gulp.task("ejs", function(){
    gulp.src(
        ["./ejs/**/*.ejs",'!' + "./ejs/**/_*.ejs"],
        { base: './ejs' }
    )
        .pipe(plumber())
        .pipe(ejs('',{"ext": ".html"}))
        .pipe(gulp.dest("./dist"));
});
Exemplo n.º 26
0
function taskEjs(pathSrc,pathDest) {
    return gulp.src(pathSrc)
        .pipe(plumber({
            errorHandler: notify.onError('<%= error.message %>')
        }))
        .pipe(ejs())
        .pipe(gulp.dest(pathDest))
        .pipe(browser.reload({stream: true}));
}
Exemplo n.º 27
0
 ]).forEach((comp) => {
   gulp.src('./templates/style.js')
     .pipe(ejs({
       compname: comp.compname,
     }))
     .pipe(babel(babelConfig))
     .on('error', console.log)
     .pipe(gulp.dest(`./lib/${comp.CompName}`));
 });
Exemplo n.º 28
0
gulp.task('build-createWebsiteDefsTs', function () {
  return gulp.src('src/angular-app/bellows/core/website-instances.ejs')
    .pipe(data(function () {
      return JSON.parse(fs.readFileSync('src/Api/Library/Shared/WebsiteInstances.json'));
    }))
    .pipe(ejs())
    .pipe(dest('src/angular-app/bellows/core/:name.generated-data.ts'))
    .pipe(gulp.dest('src/angular-app/bellows/core/'));
});
Exemplo n.º 29
0
 ]).forEach((comp) => {
   gulp.src('./templates/index.js')
     .pipe(ejs({
       compname: comp.compname,
     }))
     .pipe(babel(babelConfig))
     .on('error', console.log)
     .pipe(rename(`${comp.CompName}.js`))
     .pipe(gulp.dest('./lib'));
 });
Exemplo n.º 30
0
gulp.task('theme-views', ['tplData'], function(next){

    gulp.src('./theme/'+Theme+'/view/*.ejs')
    	.pipe( gulpEjs( tplData, {
            ext: '.html'
        }))
    	.pipe( gulp.dest(__dirname+'/build/') );

    next();
});