Skip to content
This repository was archived by the owner on Oct 24, 2021. It is now read-only.

Commit 353c8de

Browse files
committed
Add npm build step
1 parent ce544f7 commit 353c8de

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

ep60-firebase-build/gulpfile.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
// Documentation on what goes into PolymerProject.
1414
const path = require('path');
1515
const gulp = require('gulp');
16+
const mergeStream = require('merge-stream');
17+
const del = require('del');
1618
const polymerJsonPath = path.join(process.cwd(), 'polymer.json');
1719
const polymerJSON = require(polymerJsonPath);
1820
const polymer = require('polymer-build');
1921
const polymerProject = new polymer.PolymerProject(polymerJSON);
20-
const mergeStream = require('merge-stream');
2122
const buildDirectory = 'build/bundled';
22-
const del = require('del');
2323

2424
/**
2525
* Waits for the given ReadableStream
@@ -42,17 +42,17 @@ function build() {
4242
// Oh, well do you want to minify stuff? Go for it!
4343
// Here's how splitHtml & gulpif work
4444
.pipe(polymerProject.splitHtml())
45-
// .pipe(gulpif(/\.js$/, new JSOptimizeStream(optimizeOptions.js)))
46-
// .pipe(gulpif(/\.css$/, new CSSOptimizeStream(optimizeOptions.css)))
47-
// .pipe(gulpif(/\.html$/, new HTMLOptimizeStream(optimizeOptions.html)))
45+
// .pipe(gulpif(/\.js$/, uglify()))
46+
// .pipe(gulpif(/\.css$/, cssSlam()))
47+
// .pipe(gulpif(/\.html$/, htmlMinifier()))
4848
.pipe(polymerProject.rejoinHtml());
4949

5050
// Okay now lets do the same to your dependencies
5151
let depsStream = polymerProject.dependencies()
5252
.pipe(polymerProject.splitHtml())
53-
// .pipe(gulpif(/\.js$/, new JSOptimizeStream(optimizeOptions.js)))
54-
// .pipe(gulpif(/\.css$/, new CSSOptimizeStream(optimizeOptions.css)))
55-
// .pipe(gulpif(/\.html$/, new HTMLOptimizeStream(optimizeOptions.html)))
53+
// .pipe(gulpif(/\.js$/, uglify()))
54+
// .pipe(gulpif(/\.css$/, cssSlam()))
55+
// .pipe(gulpif(/\.html$/, htmlMinifier()))
5656
.pipe(polymerProject.rejoinHtml());
5757

5858
// Okay, now lets merge them into a single build stream.

ep60-firebase-build/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
"version": "0.0.0",
44
"description": "A starting point for Polymer & Firebase apps",
55
"scripts": {
6-
"build": "node --harmony-async-await `which gulp`"
6+
"build": "gulp"
77
},
88
"license": "http://polymer.github.io/LICENSE.txt",
9-
"bugs": {
10-
"url": "https://github.com/PolymerElements/generator-polymer-init-firebase/issues"
11-
},
129
"engines": {
1310
"node": ">=4.0"
1411
},

0 commit comments

Comments
 (0)