mirror of
https://github.com/MinimalBible/MinimalBible
synced 2026-06-11 15:52:06 -04:00
Initial gulp build system
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
<div id="content" />
|
||||
<div id="content"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function set_content(content) {
|
||||
|
||||
+4
File diff suppressed because one or more lines are too long
+4
File diff suppressed because one or more lines are too long
@@ -0,0 +1,30 @@
|
||||
var gulp = require('gulp');
|
||||
var gutil = require('gulp-util');
|
||||
var source = require('vinyl-source-stream');
|
||||
var watchify = require('watchify');
|
||||
var browserify = require('browserify');
|
||||
var uglify = require('gulp-uglify');
|
||||
var buffer = require('gulp-buffer');
|
||||
|
||||
gulp.task('watch', function() {
|
||||
var bundler = watchify(browserify('./src/book.coffee', watchify.args));
|
||||
|
||||
// Optionally, you can apply transforms
|
||||
// and other configuration options on the
|
||||
// bundler just as you would with browserify
|
||||
bundler.transform('coffeeify');
|
||||
|
||||
bundler.on('update', rebundle);
|
||||
|
||||
function rebundle() {
|
||||
return bundler.bundle()
|
||||
// log errors if they happen
|
||||
.on('error', gutil.log.bind(gutil, 'Browserify Error'))
|
||||
.pipe(source('book-bundle.js'))
|
||||
.pipe(buffer())
|
||||
.pipe(uglify())
|
||||
.pipe(gulp.dest('./dist'));
|
||||
}
|
||||
|
||||
return rebundle();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
require 'angular'
|
||||
Reference in New Issue
Block a user