Skip to content

Instantly share code, notes, and snippets.

@mabel
Created September 15, 2018 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mabel/f53546a4ec76ae04f86d167294602f32 to your computer and use it in GitHub Desktop.
Save mabel/f53546a4ec76ae04f86d167294602f32 to your computer and use it in GitHub Desktop.
var gulp = require('gulp')
var pug = require('gulp-pug')
var stylus = require('gulp-stylus')
var coffee = require('gulp-coffee')
gulp.task('css', function() {
gulp.src('index.styl')
.pipe(stylus())
.pipe(gulp.dest('../public/css'))
})
gulp.task('html', function() {
var YOUR_LOCALS = {
title: 'Виртуальная аудитория',
description: 'JavaScript: online-занятия',
requireConfig: 'js/index',
}
gulp.src('index.pug')
.pipe(pug({locals: YOUR_LOCALS}))
.pipe(gulp.dest('../public'))
})
gulp.task('js', function() {
gulp.src('*.coffee')
.pipe(coffee())
.pipe(gulp.dest('../public/js'))
})
gulp.task('default', ['css', 'js', 'html'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment