Migrate to Polymer 2 (#370)

* Update bower.json to point at Polymer 2

* No longer use babel to run node scripts

* Refer to CSS from static dir

* Fix some panel bugs
This commit is contained in:
Paulus Schoutsen
2017-08-03 23:40:16 -07:00
committed by GitHub
parent 17519cce30
commit 572f92fd1e
14 changed files with 50 additions and 100 deletions
+20 -15
View File
@@ -1,26 +1,31 @@
import buble from 'gulp-buble';
import uglify from 'gulp-uglify';
import { gulp as cssSlam } from 'css-slam';
import gulp from 'gulp';
import filter from 'gulp-filter';
import htmlMinifier from 'gulp-html-minifier';
import gulpif from 'gulp-if';
import { PolymerProject, HtmlSplitter } from 'polymer-build';
import {
const babel = require('gulp-babel');
const uglify = require('gulp-uglify');
const { gulp: cssSlam } = require('css-slam');
const gulp = require('gulp');
const filter = require('gulp-filter');
const htmlMinifier = require('gulp-html-minifier');
const gulpif = require('gulp-if');
const { PolymerProject, HtmlSplitter } = require('polymer-build');
const {
composeStrategies,
generateShellMergeStrategy,
} from 'polymer-bundler';
import mergeStream from 'merge-stream';
import rename from 'gulp-rename';
} = require('polymer-bundler');
const mergeStream = require('merge-stream');
const rename = require('gulp-rename');
import polymerConfig from '../../polymer';
const polymerConfig = require('../../polymer');
function minifyStream(stream) {
const sourcesHtmlSplitter = new HtmlSplitter();
return stream
.pipe(sourcesHtmlSplitter.split())
.pipe(gulpif(/\.js$/, buble()))
.pipe(gulpif(/\.js$/, uglify({ sourceMap : false })))
.pipe(gulpif(/[^app]\.js$/, babel({
sourceType: 'script',
presets: [
['es2015', { modules: false }]
]
})))
.pipe(gulpif(/\.js$/, uglify({ sourceMap: false })))
.pipe(gulpif(/\.css$/, cssSlam()))
.pipe(gulpif(/\.html$/, cssSlam()))
.pipe(gulpif(/\.html$/, htmlMinifier({
+2 -2
View File
@@ -1,5 +1,5 @@
import del from 'del';
import gulp from 'gulp';
const del = require('del');
const gulp = require('gulp');
gulp.task('clean', () => {
return del(['build', 'build-temp']);
+3 -3
View File
@@ -1,9 +1,9 @@
import gulp from 'gulp';
import runSequence from 'run-sequence';
const gulp = require('gulp');
const runSequence = require('run-sequence');
gulp.task('default', () => {
return runSequence.use(gulp)(
'clean',
'build',
'build'
);
});
+3 -3
View File
@@ -1,6 +1,6 @@
import gulp from 'gulp';
import rollupEach from 'gulp-rollup-each';
import rollupConfig from '../../rollup.config';
const gulp = require('gulp');
const rollupEach = require('gulp-rollup-each');
const rollupConfig = require('../../rollup.config');
gulp.task('run_rollup', () => {
return gulp.src([