Initial Commit

This commit is contained in:
2018-05-19 02:20:19 +02:00
commit 8621248968
6554 changed files with 1121559 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
{
"paths": {
"entry": "./index.js",
"dest": "./dst"
},
"names": {
"app": "synth.min.js",
"glob": "synth"
}
}

View File

@@ -0,0 +1,35 @@
const config = require('../config');
const gulp = require('gulp');
const browserify = require('browserify');
const babelify = require('babelify');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
const uglify = require('gulp-uglify');
const sourcemaps = require('gulp-sourcemaps');
const gutil = require('gulp-util');
gulp.task('browserify', function () {
// set up the browserify instance on a task basis
let b = browserify({
entries: config.paths.entry,
debug: true,
standalone: config.names.glob,
transform: [
babelify.configure({
presets: ['es2015'],
sourceMapsAbsolute: true,
}),
],
});
return b.bundle()
.pipe(source(config.names.app))
.pipe(buffer())
.pipe(sourcemaps.init({loadMaps: true}))
// Add transformation tasks to the pipeline here.
.pipe(uglify())
.on('error', gutil.log)
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(config.paths.dest));
});

View File

@@ -0,0 +1,3 @@
const gulp = require('gulp');
gulp.task('default', ['browserify']);