diff --git a/build-tasks/compile-js.js b/build-tasks/compile-js.js
index 6af823e..9e5794b 100644
--- a/build-tasks/compile-js.js
+++ b/build-tasks/compile-js.js
@@ -22,6 +22,14 @@ module.exports = () => {
.pipe(sourcemaps.write())
.pipe(gulp.dest(path.join('dist', 'js')));
+ const production = browserify(path.join('src', 'js', 'main.js'), {
+ debug: false
+ })
+ .bundle()
+ .pipe(source('pw-image-editor.js'))
+ .pipe(buffer())
+ .pipe(gulp.dest(path.join('dist', 'js')));
+
const min = browserify(path.join('src', 'js', 'main.js'), {
debug: false
})
@@ -31,5 +39,13 @@ module.exports = () => {
.pipe(uglifyJs())
.pipe(gulp.dest(path.join('dist', 'js')));
- return merge(debug, min);
+ const init = browserify(path.join('src', 'js', 'init.js'), {
+ debug: false
+ })
+ .bundle()
+ .pipe(source('init.js'))
+ .pipe(buffer())
+ .pipe(gulp.dest(path.join('dist', 'js')));
+
+ return merge(debug, production, min, init);
};
diff --git a/index.php b/index.php
index 9b5a60a..bc13307 100644
--- a/index.php
+++ b/index.php
@@ -21,12 +21,13 @@