diff --git a/.eslintrc.json b/.eslintrc.json index 9954ffbaba..45fe93f1fd 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,12 +1,12 @@ { "extends": "./.eslintrc-hound.json", "plugins": [ - "html", "react" ], "env": { "browser": true }, + "parser": "babel-eslint", "rules": { "import/no-unresolved": 2, "linebreak-style": 0 diff --git a/.travis.yml b/.travis.yml index 9f62314db4..03eee93e5a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,24 +3,23 @@ language: node_js cache: yarn: true directories: - - bower_components -install: - - yarn install - - ./node_modules/.bin/bower install + - bower_components +install: yarn install script: - npm run build - npm run test - - xvfb-run wct - - if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct --plugin sauce; fi + # - xvfb-run wct --module-resolution=node --npm + # - 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct --module-resolution=node --npm --plugin sauce; fi' services: - docker before_deploy: - - docker pull lokalise/lokalise-cli@sha256:2198814ebddfda56ee041a4b427521757dd57f75415ea9693696a64c550cef21 + - 'docker pull lokalise/lokalise-cli@sha256:2198814ebddfda56ee041a4b427521757dd57f75415ea9693696a64c550cef21' deploy: provider: script script: script/travis_deploy - on: + 'on': branch: master dist: trusty addons: sauce_connect: true + diff --git a/gulp/tasks/auth.js b/gulp/tasks/auth.js index 4fd417ee0e..6fa32e4289 100644 --- a/gulp/tasks/auth.js +++ b/gulp/tasks/auth.js @@ -1,4 +1,5 @@ const gulp = require('gulp'); +const path = require('path'); const replace = require('gulp-batch-replace'); const rename = require('gulp-rename'); @@ -11,8 +12,12 @@ const { const es5Extra = ""; async function buildAuth(es6) { - let stream = await bundledStreamFromHTML('src/authorize.html'); - stream = stream.pipe(replace([['', es6 ? '' : es5Extra]])); + const frontendPath = es6 ? 'hass_frontend_latest' : 'hass_frontend_es5'; + const stream = gulp.src(path.resolve(config.polymer_dir, 'src/authorize.html')) + .pipe(replace([ + ['', es6 ? '' : es5Extra], + ['/home-assistant-polymer/build/webpack/ha-authorize.js', `/${frontendPath}/authorize.js`], + ])); return minifyStream(stream, /* es6= */ es6) .pipe(rename('authorize.html')) diff --git a/gulp/tasks/build.js b/gulp/tasks/build.js index cbd546755c..a2a27754ca 100644 --- a/gulp/tasks/build.js +++ b/gulp/tasks/build.js @@ -31,6 +31,7 @@ function renamePanel(path) { } function build(es6) { + return; const strategy = composeStrategies([ generateShellMergeStrategy(polymerConfig.shell), stripImportsStrategy([ diff --git a/gulp/tasks/gen-index-html.js b/gulp/tasks/gen-index-html.js index 4b91a9ac8f..c1e019a89c 100644 --- a/gulp/tasks/gen-index-html.js +++ b/gulp/tasks/gen-index-html.js @@ -8,8 +8,7 @@ const { minifyStream } = require('../common/transform'); const buildReplaces = { '/home-assistant-polymer/build/core.js': 'core.js', - '/home-assistant-polymer/src/home-assistant.html': 'frontend.html', - '/home-assistant-polymer/src/resources/ha-chart-scripts.html': 'ha-chart-scripts.html', + '/home-assistant-polymer/build/webpack/app.js': 'app.js', }; function generateIndex(es6) { diff --git a/gulp/tasks/gen-service-worker.js b/gulp/tasks/gen-service-worker.js index 241637e10f..2d3c3ba850 100755 --- a/gulp/tasks/gen-service-worker.js +++ b/gulp/tasks/gen-service-worker.js @@ -29,22 +29,13 @@ const staticFingerprinted = [ const staticFingerprintedEs6 = [ 'core.js', - 'frontend.html', - 'ha-chart-scripts.html', + 'app.js', ]; const staticFingerprintedEs5 = [ 'compatibility.js', 'core.js', - 'frontend.html', - 'ha-chart-scripts.html', -]; - -// These panels will always be registered inside HA and thus can -// be safely assumed to be able to preload. -const panelsFingerprinted = [ - 'dev-event', 'dev-info', 'dev-service', 'dev-state', 'dev-template', - 'dev-mqtt', 'kiosk', + 'app.js', ]; function processStatic(fn, rootDir, urlDir) { diff --git a/gulp/tasks/translations.js b/gulp/tasks/translations.js index 5c09e80f7a..8399cacb71 100755 --- a/gulp/tasks/translations.js +++ b/gulp/tasks/translations.js @@ -248,8 +248,7 @@ gulp.task(taskName, ['build-translation-fingerprints'], function () { fragments: TRANSLATION_FRAGMENTS, translations: data, }))) - .pipe(insert.wrap('')) - .pipe(rename('translationMetadata.html')) + .pipe(rename('translationMetadata.json')) .pipe(gulp.dest(workDir)); }); tasks.push(taskName); diff --git a/hassio/addon-store/hassio-addon-repository.html b/hassio/addon-store/hassio-addon-repository.js similarity index 52% rename from hassio/addon-store/hassio-addon-repository.html rename to hassio/addon-store/hassio-addon-repository.js index 36b9c87c3c..8e868735ad 100644 --- a/hassio/addon-store/hassio-addon-repository.html +++ b/hassio/addon-store/hassio-addon-repository.js @@ -1,13 +1,14 @@ - - +import '@polymer/paper-card/paper-card.js'; +import { html } from '@polymer/polymer/lib/utils/html-tag.js'; +import { PolymerElement } from '@polymer/polymer/polymer-element.js'; - +import '../../src/components/hassio-card-content.js'; +import '../../src/resources/hassio-style.js'; +import '../../src/util/hass-mixins.js'; - - - - -