Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/Update to Custom Elements API #170

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion app-router.html

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions app-router.js

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "app-router",
"version": "2.7.2",
"version": "3.0.0",
"authors": [
"Erik Ringsmuth <[email protected]>"
],
Expand All @@ -24,9 +24,8 @@
"package.json"
],
"devDependencies": {
"polymer": "~0.5.4",
"webcomponentsjs": "^0.7.22",
"core-elements": "Polymer/core-elements#~0.5.4",
"polymer": "Polymer/polymer#^2.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0",
"pushstate-anchor": "^0.4.0"
}
}
36 changes: 18 additions & 18 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
'use strict';
var path = require('path');
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var uglify = require('gulp-uglify');
var inline = require('gulp-inline');
var karma = require('karma');
const path = require('path');
const gulp = require('gulp');
const babel = require('gulp-babel');
const jshint = require('gulp-jshint');
const uglify = require('gulp-uglify');
const inline = require('gulp-inline');
const karma = require('karma');

var files = ['src/*.js', 'tests/spec/*.js'];
const files = ['src/*.js', 'tests/spec/*.js'];

gulp.task('lint', function() {
return gulp.src(files)
Expand All @@ -16,18 +17,17 @@ gulp.task('lint', function() {
});

gulp.task('build', function() {
return gulp.src('src/app-router.js')
.pipe(uglify({
preserveComments: 'some'
}))
.pipe(gulp.dest('.'));
});

gulp.task('minify', function() {
return gulp.src('src/app-router.html')
.pipe(inline({
base: 'src',
js: uglify()
js: function() {
return babel({
comments: false,
minified: true,
plugins: ['transform-custom-element-classes'],
presets: ['babel-preset-env']
});
}
}))
.pipe(gulp.dest('.'));
});
Expand All @@ -41,14 +41,14 @@ gulp.task('test', function(done) {

// watch
gulp.task('watch', function() {
gulp.watch(files, ['lint', 'build', 'minify', 'test'])
gulp.watch(files, ['lint', 'build', 'test'])
.on('change', function(event) {
console.log('File ' + event.path + ' was ' + event.type + ', running tasks...');
});
});

// default
gulp.task('default', ['lint', 'build', 'minify', 'test']);
gulp.task('default', ['lint', 'build', 'test']);

// Travis CI
gulp.task('ci', ['default']);
Loading