From 353c8de9a5a2b0d5bc90c7c3b52088e530e96823 Mon Sep 17 00:00:00 2001 From: Rob Dodson Date: Tue, 20 Dec 2016 11:29:48 -0800 Subject: [PATCH] Add npm build step --- ep60-firebase-build/gulpfile.js | 16 ++++++++-------- ep60-firebase-build/package.json | 5 +---- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/ep60-firebase-build/gulpfile.js b/ep60-firebase-build/gulpfile.js index 914ba3c..77238f6 100644 --- a/ep60-firebase-build/gulpfile.js +++ b/ep60-firebase-build/gulpfile.js @@ -13,13 +13,13 @@ // Documentation on what goes into PolymerProject. const path = require('path'); const gulp = require('gulp'); +const mergeStream = require('merge-stream'); +const del = require('del'); const polymerJsonPath = path.join(process.cwd(), 'polymer.json'); const polymerJSON = require(polymerJsonPath); const polymer = require('polymer-build'); const polymerProject = new polymer.PolymerProject(polymerJSON); -const mergeStream = require('merge-stream'); const buildDirectory = 'build/bundled'; -const del = require('del'); /** * Waits for the given ReadableStream @@ -42,17 +42,17 @@ function build() { // Oh, well do you want to minify stuff? Go for it! // Here's how splitHtml & gulpif work .pipe(polymerProject.splitHtml()) - // .pipe(gulpif(/\.js$/, new JSOptimizeStream(optimizeOptions.js))) - // .pipe(gulpif(/\.css$/, new CSSOptimizeStream(optimizeOptions.css))) - // .pipe(gulpif(/\.html$/, new HTMLOptimizeStream(optimizeOptions.html))) + // .pipe(gulpif(/\.js$/, uglify())) + // .pipe(gulpif(/\.css$/, cssSlam())) + // .pipe(gulpif(/\.html$/, htmlMinifier())) .pipe(polymerProject.rejoinHtml()); // Okay now lets do the same to your dependencies let depsStream = polymerProject.dependencies() .pipe(polymerProject.splitHtml()) - // .pipe(gulpif(/\.js$/, new JSOptimizeStream(optimizeOptions.js))) - // .pipe(gulpif(/\.css$/, new CSSOptimizeStream(optimizeOptions.css))) - // .pipe(gulpif(/\.html$/, new HTMLOptimizeStream(optimizeOptions.html))) + // .pipe(gulpif(/\.js$/, uglify())) + // .pipe(gulpif(/\.css$/, cssSlam())) + // .pipe(gulpif(/\.html$/, htmlMinifier())) .pipe(polymerProject.rejoinHtml()); // Okay, now lets merge them into a single build stream. diff --git a/ep60-firebase-build/package.json b/ep60-firebase-build/package.json index d899635..4a5269a 100644 --- a/ep60-firebase-build/package.json +++ b/ep60-firebase-build/package.json @@ -3,12 +3,9 @@ "version": "0.0.0", "description": "A starting point for Polymer & Firebase apps", "scripts": { - "build": "node --harmony-async-await `which gulp`" + "build": "gulp" }, "license": "http://polymer.github.io/LICENSE.txt", - "bugs": { - "url": "https://github.com/PolymerElements/generator-polymer-init-firebase/issues" - }, "engines": { "node": ">=4.0" },