diff --git a/README.md b/README.md index 06f025b..102e211 100644 --- a/README.md +++ b/README.md @@ -47,5 +47,5 @@ impressor(image, sizes, function (images) { ``` $ npm install $ bower install -$ gulp +$ npm run bundle ``` diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index 8b6cf7a..0000000 --- a/gulpfile.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; - -var gulp = require("gulp"); -var purescript = require("gulp-purescript"); -var uglify = require("gulp-uglify"); -var source = require("vinyl-source-stream"); -var browserify = require("browserify"); -var insert = require("gulp-insert"); -var rename = require("gulp-rename"); - -var sources = [ - "src/**/*.purs", - "bower_components/purescript-*/src/**/*.purs" -]; - -var foreigns = [ - "bower_components/purescript-*/src/**/*.js", - "src/**/*.js" -]; - -gulp.task("make", function () { - return purescript.psc({ src: sources, ffi: foreigns }); -}); - -gulp.task("pscBundle", ["make"], function () { - return purescript.pscBundle({ - src: "output/**/*.js", - output: "js/psc-bundle.js", - module: "Impressor" - }) -}); - -gulp.task("exportPscBundle", ["pscBundle"], function () { - return gulp.src("js/psc-bundle.js") - .pipe(insert.append("module.exports = PS;")) - .pipe(gulp.dest("js")); -}); - -gulp.task("bundle", ["exportPscBundle"], function () { - return browserify({ - entries: "js/entry.js", - standalone: "Impressor" - }) - .bundle() - .pipe(source("impressor.js")) - .pipe(gulp.dest("dist")); -}); - -gulp.task("uglify", ["bundle"], function () { - return gulp.src("dist/impressor.js") - .pipe(uglify()) - .pipe(rename({ - extname: '.min.js' - })) - .pipe(gulp.dest("dist")); -}) - -gulp.task("default", ["bundle"]); diff --git a/package.json b/package.json index ee059a8..c03e7fb 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "scripts": { "psc-bundle": "pulp build --main \"Impressor\" --optimise --skip-entry-point > js/impressorPscBundle.js && echo \"module.exports = PS;\" >> js/impressorPscBundle.js", - "bundle": "npm run psc-bundle && ./node_modules/.bin/webpack --progress --colors" + "bundle": "npm run psc-bundle && ./node_modules/.bin/webpack --progress --colors", }, "devDependencies": {