Files
clay/mold.js
T

35 lines
936 B
JavaScript

'use strict';
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var path = require('path');
var template = require('gulp-template');
var stringify = require('stringify');
var del = require('del');
var projectPath = process.argv[2] || process.cwd();
var pebbleJsPath = path.resolve(projectPath, 'src/js/pebble-js-app.js');
var clayJsPath = path.resolve(projectPath, 'src/js/pebble-clay-js-app.js');
var warningMessage =
'/* Do not edit this file! Use "pebble-clay-js-app.js" instead. */';
gulp.task('clean', function() {
return del([pebbleJsPath]);
});
gulp.task('build', ['clean', 'pebble-js-app'], function() {
});
gulp.task('pebble-js-app', function() {
browserify(clayJsPath, { debug: false })
.transform(stringify(['.html', '.mustache']))
.bundle()
.pipe(source('pebble-js-app.js'))
.pipe(gulp.dest('./src/js/'));
});
gulp.start('build');