Skip to content

Commit

Permalink
Prepare for P3
Browse files Browse the repository at this point in the history
Fixes #74
  • Loading branch information
platosha committed Mar 27, 2018
1 parent 2b33331 commit bd3dbf3
Show file tree
Hide file tree
Showing 10 changed files with 370 additions and 344 deletions.
11 changes: 11 additions & 0 deletions .npmignore
@@ -0,0 +1,11 @@
bower_components
demo
.eslintrc.json
.stylelintrc
.travis.yml
wct.conf.js
analysis.json
bower.json
gulpfile.js
index.html
screenshot.png
33 changes: 23 additions & 10 deletions .travis.yml
Expand Up @@ -11,19 +11,32 @@ addons:
firefox: latest
chrome: stable

install:
- npm install
- polymer install

before_script:
- gulp lint version:check
- polymer lint --rules polymer-2 --input ./src/*.html ./theme/**/*.html
- xvfb-run -s '-screen 0 1024x768x24' wct
- npm install bower polymer-cli@next -g
- bower install

env:
- POLYMER=2
- POLYMER=3

script:
- if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" && "$TRAVIS_BRANCH" != quick/* ]]; then
wct --env saucelabs;
if [[ "$POLYMER" = "2" ]]; then
npm install;
gulp lint;
polymer lint --rules polymer-2 --input *.html;
polymer test --env saucelabs;
fi;
if [[ "$POLYMER" = "3" ]]; then
npm install -g yarn magi-cli;
(cd .. && git clone --depth 1 -b vaadin-components git://github.com/web-padawan/polymer-modulizer.git && cd polymer-modulizer && npm link);
rm -rf node_modules;
magi p3-convert --out .;
yarn install --flat;
polymer test --module-resolution=node --npm --env saucelabs-p3;
fi;
fi
- if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
wct --env saucelabs-cron;
- if [[ "$TRAVIS_EVENT_TYPE" = "cron" ]]; then
npm install;
polymer test --env saucelabs-cron;
fi
10 changes: 5 additions & 5 deletions bower.json
Expand Up @@ -29,13 +29,13 @@
"iron-test-helpers": "^2.0.0",
"webcomponentsjs": "^1.0.0",
"web-component-tester": "^6.1.5",
"vaadin-demo-helpers": "^1.0.0"
"vaadin-demo-helpers": "vaadin/vaadin-demo-helpers#p3-preview"
},
"dependencies": {
"polymer": "^2.0.0",
"vaadin-control-state-mixin": "vaadin/vaadin-control-state-mixin#^2.0.0",
"vaadin-themable-mixin": "^1.1.0",
"vaadin-lumo-styles": "vaadin/vaadin-lumo-styles#^1.0.0",
"vaadin-element-mixin": "vaadin/vaadin-element-mixin#^1.0.1"
"vaadin-control-state-mixin": "vaadin/vaadin-control-state-mixin#p3-preview",
"vaadin-themable-mixin": "vaadin/vaadin-themable-mixin#p3-preview",
"vaadin-lumo-styles": "vaadin/vaadin-lumo-styles#p3-preview",
"vaadin-element-mixin": "vaadin/vaadin-element-mixin#p3-preview"
}
}
17 changes: 0 additions & 17 deletions demo/button-demo.html

This file was deleted.

12 changes: 12 additions & 0 deletions demo/button-demo.js
@@ -0,0 +1,12 @@
window.ButtonDemo = superClass => {
return class extends superClass {
static get properties() {
return {
};
}
};
};

window.addEventListener('WebComponentsReady', () => {
document.body.removeAttribute('unresolved');
});
16 changes: 8 additions & 8 deletions demo/index.html
Expand Up @@ -6,23 +6,23 @@
<title>Vaadin Button Examples</title>
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>

<custom-style>
<style include="vaadin-component-demo-shared-styles"></style>
</custom-style>
</head>

<body>
<link rel="import" href="../../polymer/polymer.html">
<link rel="import" href="../../vaadin-demo-helpers/vaadin-component-demo.html">
<link rel="import" href="../../vaadin-demo-helpers/vaadin-demo-snippet.html">
<link rel="import" href="../../vaadin-demo-helpers/vaadin-demo-ready-event-emitter.html">
<script src="../../vaadin-demo-helpers/vaadin-demo-ready-event-emitter.js"></script>

<link rel="import" href="button-demo.html">
<script src="./button-demo.js"></script>

<link rel="import" href="../vaadin-button.html">
<link rel="import" href="../../iron-icon/iron-icon.html">
<link rel="import" href="../../vaadin-lumo-styles/icons.html">

<custom-style>
<style include="vaadin-component-demo-shared-styles"></style>
</custom-style>
</head>

<body>
<vaadin-component-demo config-src="demos.json"></vaadin-component-demo>
</body>
</html>
6 changes: 2 additions & 4 deletions package.json
@@ -1,5 +1,5 @@
{
"name": "vaadin-button",
"name": "@vaadin/vaadin-button",
"version": "2.0.0-beta3",
"description": "vaadin-button",
"main": "vaadin-button.html",
Expand Down Expand Up @@ -36,10 +36,8 @@
"gulp-html-extract": "^0.3.0",
"gulp-replace": "^0.6.1",
"gulp-stylelint": "^7.0.0",
"polymer-cli": "^1.6.0",
"stylelint": "^9.0.0",
"stylelint-config-vaadin": "latest",
"web-component-tester": "^6.1.5",
"yargs": "^8.0.0"
"web-component-tester": "^6.1.5"
}
}

0 comments on commit bd3dbf3

Please sign in to comment.