Skip to content

Commit

Permalink
--wip--
Browse files Browse the repository at this point in the history
  • Loading branch information
platosha committed Mar 27, 2018
1 parent def2b01 commit 41f9d9a
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 28 deletions.
11 changes: 11 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
bower_components
test
.eslintrc.json
.stylelintrc
.travis.yml
wct.conf.js
analysis.json
bower.json
gulpfile.js
index.html
screenshot.png
35 changes: 24 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,34 @@ cache:

addons:
firefox: latest
google-chrome: latest

install:
- npm install
- polymer install
chrome: stable

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
14 changes: 7 additions & 7 deletions demo/index.html
Original file line number Diff line number Diff line change
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">

<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>
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -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 @@ -39,7 +39,6 @@
"polymer-cli": "^1.6.0",
"stylelint": "^8.0.0",
"stylelint-config-vaadin": "latest",
"web-component-tester": "^6.1.5",
"yargs": "^8.0.0"
"web-component-tester": "^6.1.5"
}
}
23 changes: 16 additions & 7 deletions wct.conf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var argv = require('yargs').argv;
var envIndex = process.argv.indexOf('--env') + 1;
var env = envIndex ? process.argv[envIndex] : undefined;

module.exports = {
registerHooks: function(context) {
Expand All @@ -8,18 +9,26 @@ module.exports = {
'Windows 10/microsoftedge@15',
'Windows 10/internet explorer@11',
'macOS 10.12/safari@11.0',
'macOS 9.3.2/iphone@9.3'
'Windows 10/chrome@65'
];

var saucelabsPlatformsP3 = [
'macOS 10.12/iphone@11.2',
'macOS 10.12/ipad@11.2',
'Windows 10/chrome@65',
'macOS 10.12/safari@11.0'
];

var cronPlatforms = [
'Windows 10/chrome@59',
'Windows 10/firefox@54'
'Windows 10/chrome@65',
'Windows 10/firefox@59'
];

if (argv.env === 'saucelabs') {
if (env === 'saucelabs') {
context.options.plugins.sauce.browsers = saucelabsPlatforms;

} else if (argv.env === 'saucelabs-cron') {
} else if (env === 'saucelabs-p3') {
context.options.plugins.sauce.browsers = saucelabsPlatformsP3;
} else if (env === 'saucelabs-cron') {
context.options.plugins.sauce.browsers = cronPlatforms;
}
}
Expand Down

0 comments on commit 41f9d9a

Please sign in to comment.