From 6c6b0dc845060d89453f34063036e7a7968e785f Mon Sep 17 00:00:00 2001 From: Sille Kamoen Date: Tue, 15 Aug 2017 15:35:11 +0200 Subject: [PATCH] Polymer 2.0 Upgrade (#35) * Initial upgrade attempt * Remove old dependencies * Fix a bunch of linter errors and imports * Dynamic column creation for vaadin grid * Partially fix dynamic column creation * Fix columnrenderer, apply material design and add sorting * Add sorting icon and selection column * Fix webcomponents javascript and consumption dropdown * Fix build * Update build.sh for new build process * Clean dependencies and structured root directory * Add last style fixes and hide empty table --- Dockerfile | 4 +- bower.json | 42 +- build.sh => docker/dockerbuild.sh | 2 +- nginx_server.conf => docker/nginx_server.conf | 0 gulp-tasks/clean.js | 22 - gulp-tasks/project.js | 142 - gulp/ensure-lazy-fragments.js | 31 + polymer.json => gulp/polymer.json | 7 +- gulp/project.js | 139 + gulp/sw-precache-config.js | 14 + gulp/sw-precache-config.json | 14 + gulpfile.js | 91 +- index.html | 2 +- package.json | 17 +- src/lancie-admin-content.html | 15 +- .../lancie-admin-page-layout.html | 8 +- .../lancie-admin-teams.html | 6 +- .../lancie-admin-tickets.html | 7 +- .../lancie-admin-types.html | 6 +- .../lancie-admin-information-item.html | 4 + .../lancie-admin-statistics-tickets.html | 92 +- .../lancie-admin-layout.html | 44 +- .../lancie-admin-rfid-alcohol.html | 1 + .../lancie-admin-rfid-assign.html | 1 + .../lancie-admin-rfid-consumption.html | 5 +- .../lancie-admin-table.html | 145 +- sw-precache-config.json | 10 - .../lancie-admin-app_test.html | 2 +- yarn.lock | 3276 ++++++++++++----- 29 files changed, 2786 insertions(+), 1363 deletions(-) rename build.sh => docker/dockerbuild.sh (93%) rename nginx_server.conf => docker/nginx_server.conf (100%) delete mode 100644 gulp-tasks/clean.js delete mode 100644 gulp-tasks/project.js create mode 100644 gulp/ensure-lazy-fragments.js rename polymer.json => gulp/polymer.json (89%) create mode 100644 gulp/project.js create mode 100644 gulp/sw-precache-config.js create mode 100644 gulp/sw-precache-config.json delete mode 100644 sw-precache-config.json diff --git a/Dockerfile b/Dockerfile index 4f91cd5..f797810 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,6 @@ FROM nginx:alpine WORKDIR /tmp/app ADD . ./ -COPY nginx_server.conf /etc/nginx/conf.d/default.conf +COPY ./docker/nginx_server.conf /etc/nginx/conf.d/default.conf -RUN sh ./build.sh +RUN sh ./docker/dockerbuild.sh diff --git a/bower.json b/bower.json index 6fd8f8f..9308c2e 100644 --- a/bower.json +++ b/bower.json @@ -3,30 +3,30 @@ "description": "Admin panel for the LANcie API", "main": "index.html", "dependencies": { - "iron-elements": "PolymerElements/iron-elements#^1.0.10", - "paper-elements": "PolymerElements/paper-elements#^1.0.7", - "gold-elements": "PolymerElements/gold-elements#^1.0.1", - "neon-elements": "PolymerElements/neon-elements#^1.0.0", - "polymer": "polymer/polymer#^1.7.0", - "wisvch-footer": "wisvch/wisvch-footer#^1.0.1", - "app-layout": "PolymerElements/app-layout#^0.10.4", - "app-route": "polymerelements/app-route#^0.9.2", + "polymer": "polymer/polymer#^2.0.0", + "app-layout": "PolymerElements/app-layout#^2.0.1", + "app-route": "polymerelements/app-route#^2.0.1", + "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0", + "web-animations-js": "web-animations/web-animations-js#^2.2.2", + "iron-lazy-pages": "TimvdLippe/iron-lazy-pages#2.0-preview", - "lancie-login-card": "AreaFiftyLAN/lancie-login-card#1.0.0", - "lancie-ajax": "AreaFiftyLAN/lancie-ajax#1.0.1", - "vaadin-grid": "^1.2.1" + "lancie-login-card": "AreaFiftyLAN/lancie-login-card#^2.0.0", + "lancie-ajax": "AreaFiftyLAN/lancie-ajax#^2.0.0", + + "paper-listbox": "PolymerElements/paper-listbox#^2.0.0", + "paper-item": "PolymerElements/paper-item#^2.0.0", + "paper-toast": "PolymerElements/paper-toast#^2.0.0", + "paper-checkbox": "PolymerElements/paper-checkbox#^2.0.0", + "paper-dropdown-menu": "PolymerElements/paper-dropdown-menu#^2.0.0", + + "iron-icon": "PolymerElements/iron-icon#^2.0.0", + "iron-input": "PolymerElements/iron-input#^2.0.0", + "iron-icons": "PolymerElements/iron-icons#^2.0.0", + + "vaadin-grid": "vaadin/vaadin-grid#^3.0.0" }, "devDependencies": { "web-component-tester": "*", - "test-fixture": "PolymerElements/test-fixture#^1.0.0" - }, - "resolutions": { - "polymer": "^1.7.0", - "iron-selector": "^2.0.0", - "iron-resizable-behavior": "^1.0.0", - "neon-animation": "^1.0.0", - "webcomponentsjs": "^0.7.20", - "iron-meta": "^1.0.0", - "test-fixture": "^3.0.0-rc.1" + "test-fixture": "PolymerElements/test-fixture#^3.0.0" } } diff --git a/build.sh b/docker/dockerbuild.sh similarity index 93% rename from build.sh rename to docker/dockerbuild.sh index 892c289..738f3a3 100644 --- a/build.sh +++ b/docker/dockerbuild.sh @@ -12,7 +12,7 @@ bower --allow-root install # Compress images and build yarn run build optimize-images yarn run build -cp -r ./build/bundled/. /srv/www +cp -r ./build/. /srv/www # Uninstall installed build dependencies and remove cache yarn cache clean diff --git a/nginx_server.conf b/docker/nginx_server.conf similarity index 100% rename from nginx_server.conf rename to docker/nginx_server.conf diff --git a/gulp-tasks/clean.js b/gulp-tasks/clean.js deleted file mode 100644 index 4466804..0000000 --- a/gulp-tasks/clean.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @license - * Copyright (c) 2016 The Polymer Project Authors. All rights reserved. - * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt - * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt - * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt - * Code distributed by Google as part of the polymer project is also - * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt - */ - -'use strict'; - -const del = require('del'); - -// Returns a function that returns a Promise to delete directories -function clean(directories) { - return function clean() { - return del(directories); - }; -} - -module.exports = clean; diff --git a/gulp-tasks/project.js b/gulp-tasks/project.js deleted file mode 100644 index d792c06..0000000 --- a/gulp-tasks/project.js +++ /dev/null @@ -1,142 +0,0 @@ -/** - * @license - * Copyright (c) 2016 The Polymer Project Authors. All rights reserved. - * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt - * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt - * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt - * Code distributed by Google as part of the polymer project is also - * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt - */ - -'use strict'; - -const path = require('path'); -const gulp = require('gulp'); -const gulpif = require('gulp-if'); -const gulpreplace = require('gulp-replace'); -const mergeStream = require('merge-stream'); -const polymer = require('polymer-build'); - -const polymerJSON = require(global.config.polymerJsonPath); -const project = new polymer.PolymerProject(polymerJSON); -const bundledPath = path.join(global.config.build.rootDirectory, global.config.build.bundledDirectory); -const unbundledPath = path.join(global.config.build.rootDirectory, global.config.build.unbundledDirectory); - -// This is the heart of polymer-build, and exposes much of the -// work that Polymer CLI usually does for you -// There are tasks to split the source files and dependency files into -// streams, and tasks to rejoin them and output service workers -// You should not need to modify anything in this file -// If you find that you can't accomplish something because of the way -// this module is structured please file an issue -// https://github.com/PolymerElements/generator-polymer-init-custom-build/issues - -// Returns a ReadableStream of all the source files -// Source files are those in src/** as well as anything -// added to the sourceGlobs property of polymer.json -function splitSource() { - return project.sources().pipe(project.splitHtml()); -} - -// Returns a ReadableStream of all the dependency files -// Dependency files are those in bower_components/** -function splitDependencies() { - return project.dependencies().pipe(project.splitHtml()); -} - -// Returns a WriteableStream to rejoin all split files -function rejoin() { - return project.rejoinHtml(); -} - -// Returns a function which accepts refernces to functions that generate -// ReadableStreams. These ReadableStreams will then be merged, and used to -// generate the bundled and unbundled versions of the site. -// Takes an argument for the user to specify the kind of output they want -// either bundled or unbundled. If this argument is omitted it will output both -function merge(source, dependencies) { - return function output() { - const mergedFiles = mergeStream(source(), dependencies()); - const bundleType = global.config.build.bundleType; - let outputs = []; - - if (bundleType === 'both' || bundleType === 'bundled') { - outputs.push(writeBundledOutput(polymer.forkStream(mergedFiles))); - } - if (bundleType === 'both' || bundleType === 'unbundled') { - outputs.push(writeUnbundledOutput(polymer.forkStream(mergedFiles))); - } - - return Promise.all(outputs); - }; -} - -// Run the files through a bundling step which will vulcanize/shard them -// then output to the dest dir -function writeBundledOutput(stream) { - return new Promise(resolve => { - stream.pipe(project.bundler) - .pipe(gulpif(/\.html$/, gulpreplace('/api/v1', 'https://api.areafiftylan.nl/api/v1'))) - .pipe(gulp.dest(bundledPath)) - .on('end', resolve); - }); -} - -// Just output files to the dest dir without bundling. This is for projects that -// use HTTP/2 server push -function writeUnbundledOutput(stream) { - return new Promise(resolve => { - stream - .pipe(gulpif(/\.html$/, gulpreplace('/api/v1', 'https://api.areafiftylan.nl/api/v1'))) - .pipe(gulp.dest(unbundledPath)) - .on('end', resolve); - }); -} - -// Returns a function which takes an argument for the user to specify the kind -// of bundle they're outputting (either bundled or unbundled) and generates a -// service worker for that bundle. -// If this argument is omitted it will create service workers for both bundled -// and unbundled output -function serviceWorker() { - const bundleType = global.config.build.bundleType; - let workers = []; - - if (bundleType === 'both' || bundleType === 'bundled') { - workers.push(writeBundledServiceWorker()); - } - if (bundleType === 'both' || bundleType === 'unbundled') { - workers.push(writeUnbundledServiceWorker()); - } - - return Promise.all(workers); -} - -// Returns a Promise to generate a service worker for bundled output -function writeBundledServiceWorker() { - return polymer.addServiceWorker({ - project: project, - buildRoot: bundledPath, - swPrecacheConfig: global.config.swPrecacheConfig, - path: global.config.serviceWorkerPath, - bundled: true - }); -} - -// Returns a Promise to generate a service worker for unbundled output -function writeUnbundledServiceWorker() { - return polymer.addServiceWorker({ - project: project, - buildRoot: unbundledPath, - swPrecacheConfig: global.config.swPrecacheConfig, - path: global.config.serviceWorkerPath - }); -} - -module.exports = { - splitSource: splitSource, - splitDependencies: splitDependencies, - rejoin: rejoin, - merge: merge, - serviceWorker: serviceWorker -}; diff --git a/gulp/ensure-lazy-fragments.js b/gulp/ensure-lazy-fragments.js new file mode 100644 index 0000000..24642dd --- /dev/null +++ b/gulp/ensure-lazy-fragments.js @@ -0,0 +1,31 @@ +'use strict'; + +const Analyzer = require('polymer-analyzer').Analyzer; +const FSUrlLoader = require('polymer-analyzer/lib/url-loader/fs-url-loader').FSUrlLoader; +const PackageUrlResolver = require('polymer-analyzer/lib/url-loader/package-url-resolver').PackageUrlResolver; +const HtmlCustomElementReferenceScanner = require('polymer-analyzer/lib/html/html-element-reference-scanner').HtmlCustomElementReferenceScanner; +const dom5 = require('dom5'); +const fragments = require('./polymer.json').fragments; + +const analyzer = new Analyzer({ + urlLoader: new FSUrlLoader('./'), + urlResolver: new PackageUrlResolver(), + scanners: new Map([['html', [new HtmlCustomElementReferenceScanner()]]]) +}); + +module.exports = () => new Promise((resolve, reject) => { + analyzer.analyze('src/lancie-content.html') + .then((document) => { + for (const element of document.getByKind('element-reference')) { + const astNode = element.astNode; + if (astNode.parentNode.tagName === 'iron-lazy-pages') { + const childLocation = dom5.getAttribute(astNode, 'data-path'); + if (!fragments.find(e => e === `src/${childLocation}`)) { + reject(`Could not find fragment "src/${childLocation}" in polymer.json!`); + return; + } + } + } + resolve(); + }); +}); diff --git a/polymer.json b/gulp/polymer.json similarity index 89% rename from polymer.json rename to gulp/polymer.json index 4d65f03..6b69751 100644 --- a/polymer.json +++ b/gulp/polymer.json @@ -21,6 +21,9 @@ "manifest.json", "favicon.ico", "robots.txt", - "bower_components/webcomponentsjs/webcomponents-lite.min.js" - ] + "bower_components/webcomponentsjs/webcomponents-loader.js" + ], + "lint": { + "rules": ["polymer-2"] + } } diff --git a/gulp/project.js b/gulp/project.js new file mode 100644 index 0000000..0035923 --- /dev/null +++ b/gulp/project.js @@ -0,0 +1,139 @@ +/** + * @license + * Copyright (c) 2016 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + */ + +'use strict'; + +const del = require('del'); +const gulp = require('gulp'); +const gulpif = require('gulp-if'); +const mergeStream = require('merge-stream'); +const polymerBuild = require('polymer-build'); +const gulpreplace = require('gulp-replace'); +const uglify = require('gulp-babili'); +const cssSlam = require('css-slam').gulp; +const htmlMinifier = require('gulp-html-minifier'); + +const swPrecacheConfig = require('./sw-precache-config.js'); +const polymerJson = require('./polymer.json'); +const polymerProject = new polymerBuild.PolymerProject(polymerJson); +const buildDirectory = './build'; + +function minify() { + return htmlMinifier({ + collapseWhitespace : true, + removeComments : true, + removeAttributeQuotes : true, + removeRedundantAttributes : true, + useShortDoctype : true, + removeEmptyAttributes : true, + removeScriptTypeAttributes : true, + removeStyleLinkTypeAttributes : true, + removeOptionalTags : true + }); +} + +/** + * Waits for the given ReadableStream + */ +function waitFor(stream) { + return new Promise((resolve, reject) => { + stream.on('end', resolve); + stream.on('error', reject); + }); +} + +function build() { + return new Promise((resolve, reject) => { // eslint-disable-line no-unused-vars + + // Lets create some inline code splitters in case you need them later in your build. + let sourcesStreamSplitter = new polymerBuild.HtmlSplitter(); + let dependenciesStreamSplitter = new polymerBuild.HtmlSplitter(); + + // Okay, so first thing we do is clear the build directory + console.log(`Deleting ${buildDirectory} directory...`); + del([buildDirectory]) + .then(() => { + + // Let's start by getting your source files. These are all the files + // in your `src/` directory, or those that match your polymer.json + // "sources" property if you provided one. + let sourcesStream = polymerProject.sources() + + // The `sourcesStreamSplitter` created above can be added here to + // pull any inline styles and scripts out of their HTML files and + // into seperate CSS and JS files in the build stream. Just be sure + // to rejoin those files with the `.rejoin()` method when you're done. + .pipe(sourcesStreamSplitter.split()) + + // Uncomment these lines to add a few more example optimizations to your + // source files, but these are not included by default. For installation, see + // the require statements at the beginning. + .pipe(gulpif(/\.js$/, uglify())) + .pipe(gulpif(/\.css$/, cssSlam())) + .pipe(gulpif(/\.html$/, cssSlam())) + .pipe(gulpif(/\.html$/, minify())) + + // Remember, you need to rejoin any split inline code when you're done. + .pipe(sourcesStreamSplitter.rejoin()); + + + // Similarly, you can get your dependencies seperately and perform + // any dependency-only optimizations here as well. + let dependenciesStream = polymerProject.dependencies() + .pipe(dependenciesStreamSplitter.split()) + // Add any dependency optimizations here. + .pipe(gulpif(/\.js$/, uglify())) + .pipe(gulpif(/\.css$/, cssSlam())) + .pipe(gulpif(/\.html$/, cssSlam())) + .pipe(gulpif(/\.html$/, minify())) + .pipe(dependenciesStreamSplitter.rejoin()); + + + // Okay, now let's merge your sources & dependencies together into a single build stream. + let buildStream = mergeStream(sourcesStream, dependenciesStream) + .once('data', () => { + console.log('Analyzing build dependencies...'); + }); + + // If you want bundling, pass the stream to polymerProject.bundler. + // This will bundle dependencies into your fragments so you can lazy + // load them. + buildStream = buildStream.pipe(polymerProject.bundler()); + + // Now let's generate the HTTP/2 Push Manifest + buildStream = buildStream.pipe(polymerProject.addPushManifest()); + + buildStream = buildStream.pipe(gulpif(/\.html$/, gulpreplace('/api/v1', 'https://api.areafiftylan.nl/api/v1'))); + + // Okay, time to pipe to the build directory + buildStream = buildStream.pipe(gulp.dest(buildDirectory)); + + // waitFor the buildStream to complete + return waitFor(buildStream); + }) + .then(() => { + // Okay, now let's generate the Service Worker + console.log('Generating the Service Worker...'); + return polymerBuild.addServiceWorker({ + project: polymerProject, + buildRoot: buildDirectory, + bundled: true, + swPrecacheConfig: swPrecacheConfig + }); + }) + .then(() => { + // You did it! + console.log('Build complete!'); + resolve(); + }); + }); +} + +module.exports = build; diff --git a/gulp/sw-precache-config.js b/gulp/sw-precache-config.js new file mode 100644 index 0000000..81f202c --- /dev/null +++ b/gulp/sw-precache-config.js @@ -0,0 +1,14 @@ +module.exports = { + staticFileGlobs: [ + '/index.html', + '/manifest.json', + '/images-optimized/**', + '/src/**', + '/bower_components/webcomponentsjs/webcomponents-loader.js' + ], + navigateFallback: '/index.html', + runtimeCaching: [{ + urlPattern: '/https:\\/\\/fonts\\.googleapis\\.com\\//', + handler: 'cacheFirst' + }] +}; diff --git a/gulp/sw-precache-config.json b/gulp/sw-precache-config.json new file mode 100644 index 0000000..08e410e --- /dev/null +++ b/gulp/sw-precache-config.json @@ -0,0 +1,14 @@ +{ + "staticFileGlobs": [ + "/index.html", + "/manifest.json", + "/images-optimized/**", + "/src/**", + "/bower_components/webcomponentsjs/webcomponents-loader.js" + ], + "navigateFallback": "/index.html", + "runtimeCaching": [{ + "urlPattern": "/https:\\/\\/fonts\\.googleapis\\.com\\//", + "handler": "cacheFirst" + }] +} diff --git a/gulpfile.js b/gulpfile.js index 0667edf..4997c48 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -13,10 +13,6 @@ http://polymer.github.io/PATENTS.txt const path = require('path'); const gulp = require('gulp'); -const gulpif = require('gulp-if'); -const uglify = require('gulp-uglify'); -const cssSlam = require('css-slam').gulp; -const htmlMinifier = require('gulp-html-minifier'); const jshint = require('gulp-jshint'); const superagent = require('superagent'); const fs = require('fs-extra'); @@ -26,82 +22,13 @@ const glob = require('glob'); // const logging = require('plylog'); // logging.setVerbose(); -// !!! IMPORTANT !!! // -// Keep the global.config above any of the gulp-tasks that depend on it -global.config = { - polymerJsonPath : path.join(process.cwd(), 'polymer.json'), - build : { - rootDirectory : 'build', - bundledDirectory : 'bundled', - unbundledDirectory : 'unbundled', - // Accepts either 'bundled', 'unbundled', or 'both' - // A bundled version will be vulcanized and sharded. An unbundled version - // will not have its files combined (this is for projects using HTTP/2 - // server push). Using the 'both' option will create two output projects, - // one for bundled and one for unbundled - bundleType : 'both' - }, - // Path to your service worker, relative to the build root directory - serviceWorkerPath : 'service-worker.js', - // Service Worker precache options based on - // https://github.com/GoogleChrome/sw-precache#options-parameter - swPrecacheConfig : require('./sw-precache-config.json') -}; - -// Add your own custom gulp tasks to the gulp-tasks directory -// A few sample tasks are provided for you -// A task should return either a WriteableStream or a Promise -const clean = require('./gulp-tasks/clean.js'); -const project = require('./gulp-tasks/project.js'); - -function minify() { - return htmlMinifier({ - collapseWhitespace : true, - removeComments : true, - removeAttributeQuotes : true, - removeRedundantAttributes : true, - useShortDoctype : true, - removeEmptyAttributes : true, - removeScriptTypeAttributes : true, - removeStyleLinkTypeAttributes : true, - removeOptionalTags : true - }); -} - -// The source task will split all of your source files into one -// big ReadableStream. Source files are those in src/** as well as anything -// added to the sourceGlobs property of polymer.json. -// Because most HTML Imports contain inline CSS and JS, those inline resources -// will be split out into temporary files. You can use gulpif to filter files -// out of the stream and run them through specific tasks. An example is provided -// which filters all images and runs them through imagemin -function source() { - return project.splitSource() - // Add your own build tasks here! - .pipe(gulpif(/\.js$/, uglify())) - .pipe(gulpif(/\.css$/, cssSlam())) - .pipe(gulpif(/\.html$/, cssSlam())) - .pipe(gulpif(/\.html$/, minify())) - .pipe(project.rejoin()); -} - -// The dependencies task will split all of your bower_components files into one -// big ReadableStream -// You probably don't need to do anything to your dependencies but it's here in -// case you need it :) -function dependencies() { - return project.splitDependencies() - .pipe(gulpif(/\.js$/, uglify())) - .pipe(gulpif(/\.css$/, cssSlam())) - .pipe(gulpif(/\.html$/, cssSlam())) - .pipe(gulpif(/\.html$/, minify())) - .pipe(project.rejoin()); -} +const project = require('./gulp/project.js'); +const ensureLazyFragments = require('./gulp/ensure-lazy-fragments.js'); const root = path.resolve(process.cwd(), 'images'); const optimizedImagesRoot = path.resolve(process.cwd(), 'images-optimized'); const imageOptions = { - logos: '250,scale-down' + logos: '250,scale-down', }; // Optimize images with ImageOptim @@ -137,18 +64,18 @@ gulp.task('ensure-images-optimized', () => }) ); +gulp.task('ensure-lazy-fragments', ensureLazyFragments); + function linter() { - return gulp.src([ 'scripts/**/*.js', - 'src/**/*.html' ]) + return gulp.src('src/**/*.html') .pipe(jshint.extract()) // Extract JS from .html files .pipe(jshint()) .pipe(jshint.reporter('jshint-stylish')); } // Clean the build directory, split all source and dependency files into streams -// and process them, and output bundled and unbundled versions of the project -// with their own service workers +// and process them, and output the complete project gulp.task('default', gulp.series([ - clean([ global.config.build.rootDirectory ]), linter, - project.merge(source, dependencies), project.serviceWorker + linter, + project ])); diff --git a/index.html b/index.html index 5f130bf..80e1393 100644 --- a/index.html +++ b/index.html @@ -91,7 +91,7 @@ if (!webComponentsSupported) { var script = document.createElement('script'); script.async = true; - script.src = 'bower_components/webcomponentsjs/webcomponents-lite.min.js'; + script.src = 'bower_components/webcomponentsjs/webcomponents-loader.js'; script.onload = onload; document.head.appendChild(script); } else { diff --git a/package.json b/package.json index a91370d..6429be8 100644 --- a/package.json +++ b/package.json @@ -2,23 +2,24 @@ "private": true, "devDependencies": { "css-slam": "^1.1.0", - "del": "^2.2.1", - "fs-extra": "^1.0.0", + "del": "^3.0.0", + "fs-extra": "^4.0.1", "glob": "^7.1.1", "gulp": "gulpjs/gulp#4.0", "gulp-html-minifier": "^0.1.8", "gulp-if": "^2.0.1", "gulp-jshint": "^2.0.2", - "gulp-replace": "^0.5.4", + "gulp-replace": "^0.6.1", "gulp-style-modules": "^0.1.0", - "gulp-uglify": "^2.0.0", "jshint": "^2.9.1", "jshint-stylish": "^2.0.0", "merge-stream": "^1.0.0", - "plylog": "^0.4.0", - "polymer-build": "^0.6.0", - "polyserve": "0.16.0-prerelease.9", - "superagent": "^3.2.1" + "plylog": "^0.5.0", + "polymer-build": "^2.0.0", + "polyserve": "^0.20.0", + "superagent": "^3.2.1", + "gulp-babili": "^0.1.4", + "gulp-imagemin": "^3.3.0" }, "scripts": { "build": "node ./node_modules/gulp/bin/gulp.js", diff --git a/src/lancie-admin-content.html b/src/lancie-admin-content.html index 4a42c19..17a8f4f 100644 --- a/src/lancie-admin-content.html +++ b/src/lancie-admin-content.html @@ -3,6 +3,19 @@ + + + + + + + + + + + + +