mirror of
https://github.com/bvanroll/rpiRadio.git
synced 2025-08-30 20:42:44 +00:00
Initial Commit
This commit is contained in:
69
ProjectNow/NodeServer/node_modules/midi-player-ts/gulpfile.js
generated
vendored
Normal file
69
ProjectNow/NodeServer/node_modules/midi-player-ts/gulpfile.js
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
"use strict";
|
||||
|
||||
const browserify = require("browserify");
|
||||
const gulp = require("gulp");
|
||||
const source = require("vinyl-source-stream");
|
||||
const buffer = require("vinyl-buffer");
|
||||
const uglify = require("gulp-uglify");
|
||||
const concat = require("gulp-concat");
|
||||
const rename = require("gulp-rename");
|
||||
const babel = require("gulp-babel");
|
||||
const sourcemaps = require("gulp-sourcemaps");
|
||||
const gutil = require("gulp-util");
|
||||
|
||||
gulp.task("module", function() {
|
||||
// set up the browserify instance on a task basis
|
||||
const b = browserify({
|
||||
debug: true,
|
||||
node: true,
|
||||
standalone: "MidiPlayer",
|
||||
builtins: [],
|
||||
bundleExternal: false,
|
||||
ignoreMissing: false,
|
||||
browserField: false,
|
||||
});
|
||||
|
||||
b.add("./src/index.js");
|
||||
b.exclude("fs");
|
||||
b.exclude("bundle");
|
||||
|
||||
return (b
|
||||
.transform("babelify", { presets: ["env"] })
|
||||
.bundle()
|
||||
.pipe(source("midiplayer.js"))
|
||||
.pipe(buffer())
|
||||
// .pipe(sourcemaps.init({ loadMaps: true }))
|
||||
.on("error", gutil.log)
|
||||
// .pipe(sourcemaps.write("."))
|
||||
.pipe(gulp.dest("module")) );
|
||||
});
|
||||
|
||||
gulp.task("browserify", function() {
|
||||
// set up the browserify instance on a task basis
|
||||
const b = browserify({
|
||||
debug: true,
|
||||
standalone: "MidiPlayer",
|
||||
browserField: false,
|
||||
});
|
||||
|
||||
b.add("./src/index.js");
|
||||
b.external("fs");
|
||||
|
||||
return (b
|
||||
.transform("babelify", { presets: ["env"] })
|
||||
.bundle()
|
||||
.pipe(source("midiplayer.js"))
|
||||
.pipe(buffer())
|
||||
// .pipe(sourcemaps.init({ loadMaps: true }))
|
||||
.on("error", gutil.log)
|
||||
// .pipe(sourcemaps.write("."))
|
||||
.pipe(gulp.dest("browser")) );
|
||||
});
|
||||
|
||||
gulp.task("default", ["browserify", "module"], function() {
|
||||
gulp
|
||||
.src("./browser/midiplayer.js")
|
||||
.pipe(uglify())
|
||||
.pipe(rename("midiplayer.min.js"))
|
||||
.pipe(gulp.dest("browser"));
|
||||
});
|
Reference in New Issue
Block a user