Ejemplo n.º 1
0
gulp.task('markdown', function () {
    return gulp.src('src/md/*.md')
        .pipe(markdown())
        .pipe(rename({extname: '.md'}))
        .pipe(highlight())
        .pipe(gulp.dest('md'));
});
Ejemplo n.º 2
0
gulp.task('copy-templates', ['copy'], function() {
  var config = [];

  return gulp.src('./docs/templates/**/*.html')
    .pipe(dynamicRouting({
      path: 'build/assets/js/routes.js',
      root: 'docs'
    }))
    .pipe(markdown())
    .pipe(highlight())
    .pipe(gulp.dest('./build/templates'))
  ;
});
Ejemplo n.º 3
0
gulp.task('pug', function() {
  return gulp.src(PATH.view.entry)
    .pipe(pug())
    .pipe(highlighter())
    .pipe(gulp.dest(PREFIX_PATH.public));
});
gulp.task('prepare', () => {
  const slides = gulp.src('index.haml')
	  .pipe(haml())
	  .pipe(replace(
		  /(<link href=")(node_modules\/shower-material\/)(styles\/screen-16x10.css" rel="stylesheet" \/>)/g,
	      '$1shower/themes/material/$3', { skipBinary: true }
	  ))
	  .pipe(replace(
		  /(<script src=")(node_modules\/shower-core\/)(shower.min.js"><\/script>)/g,
	      '$1shower/$3', { skipBinary: true }
	  ))
    .pipe(highlight());

	const shower = gulp.src([
			'**',
			'!node_modules{,/**}',
			'!prepared{,/**}',
			'!CONTRIBUTING.md',
			'!LICENSE.md',
			'!README.md',
			'!gulpfile.js',
	                '!package.json',
	                '!index.haml',
	                '!*~'
		]);

	const core = gulp.src([
			'shower.min.js'
		], {
			cwd: 'node_modules/shower-core'
		})
		.pipe(rename( (path) => {
			path.dirname = 'shower/' + path.dirname;
		}));

	const material = gulp.src([
			'**', '!package.json'
		], {
			cwd: 'node_modules/shower-material'
		})
		.pipe(rename( (path) => {
			path.dirname = 'shower/themes/material/' + path.dirname;
		}))

	const ribbon = gulp.src([
			'**', '!package.json'
		], {
			cwd: 'node_modules/shower-ribbon'
		})
		.pipe(rename( (path) => {
			path.dirname = 'shower/themes/ribbon/' + path.dirname;
		}));

	const themes = merge(material, ribbon)
		.pipe(replace(
			/(<script src=")(\/shower-core\/)(shower.min.js"><\/script>)/,
			'$1../../$3', { skipBinary: true }
		));

        return merge(slides, shower, core, themes)
		.pipe(gulp.dest('prepared'));

});
Ejemplo n.º 5
0
lingon.postProcessors.push(['html', 'ejs'], function() {
  return [highlight(), unescapeQuot()];
});