Skip to content

Commit f66fb5b

Browse files
authored
refactor!: convert to Polymer 3, drop Firefox workarounds
vaadin/vaadin-control-state-mixin#68
1 parent b364750 commit f66fb5b

22 files changed

+596
-773
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"extends": "vaadin",
2+
"extends": [
3+
"eslint:recommended",
4+
"plugin:prettier/recommended"
5+
],
6+
"plugins": ["prettier"],
37
"env": {
48
"browser": true,
5-
"node": true,
69
"es6": true
710
},
8-
"plugins": [
9-
"html"
10-
],
11-
"globals": {
12-
"Polymer": false,
13-
"Vaadin": false
11+
"parserOptions": {
12+
"sourceType": "module",
13+
"ecmaVersion": 2020
1414
}
1515
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: sauce
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
tags-ignore:
8+
- '*.*'
9+
10+
jobs:
11+
unit-tests:
12+
runs-on: ubuntu-latest
13+
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-node@v1
18+
with:
19+
node-version: 12
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: SauceLabs tests
25+
env:
26+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
27+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
28+
run: npm run test:sauce
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: tests
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
unit-tests:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-node@v1
12+
with:
13+
node-version: 12
14+
15+
- name: Install dependencies
16+
run: npm install
17+
18+
- name: Lint JavaScript
19+
run: npm run lint
20+
21+
- name: Unit tests
22+
run: npm test
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
bower_components
22
node_modules
33
package-lock.json
4+
coverage

packages/vaadin-control-state-mixin/.npmignore

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"singleQuote": true,
3+
"printWidth": 120,
4+
"trailingComma": "none",
5+
"htmlWhitespaceSensitivity": "strict"
6+
}

packages/vaadin-control-state-mixin/.stylelintrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/vaadin-control-state-mixin/.travis.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

packages/vaadin-control-state-mixin/README.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,30 @@
1-
[![npm version](https://badgen.net/npm/v/@vaadin/vaadin-control-state-mixin)](https://www.npmjs.com/package/@vaadin/vaadin-control-state-mixin)
2-
[![Bower version](https://badgen.net/github/release/vaadin/vaadin-control-state-mixin)](https://github.com/vaadin/vaadin-control-state-mixin/releases)
3-
[![Build Status](https://travis-ci.org/vaadin/vaadin-control-state-mixin.svg?branch=master)](https://travis-ci.org/vaadin/vaadin-control-state-mixin)
4-
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vaadin/web-components?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
5-
61
# vaadin-control-state-mixin
2+
73
A mixin which adds `focused` and `focus-ring` states to an element.
84

5+
[![npm version](https://badgen.net/npm/v/@vaadin/vaadin-control-state-mixin)](https://www.npmjs.com/package/@vaadin/vaadin-control-state-mixin)
6+
[![Build Status](https://travis-ci.org/vaadin/vaadin-control-state-mixin.svg?branch=master)](https://travis-ci.org/vaadin/vaadin-control-state-mixin)
7+
[![Discord](https://img.shields.io/discord/732335336448852018?label=discord)](https://discord.gg/PHmkCKC)
8+
99
## Running tests in browser
1010

1111
1. Fork the `vaadin-control-state-mixin` repository and clone it locally.
1212

13-
1. Make sure you have [npm](https://www.npmjs.com/) and [Bower](https://bower.io) installed.
14-
15-
1. When in the `vaadin-control-state-mixin` directory, run `npm install` and then `bower install` to install dependencies.
16-
17-
1. Make sure you have [polymer-cli](https://www.npmjs.com/package/polymer-cli) installed globally: `npm i -g polymer-cli`.
18-
19-
1. Run `npm start`.
13+
1. Make sure you have [npm](https://www.npmjs.com/).
2014

21-
1. Navigate to http://127.0.0.1:3000/components/vaadin-control-state-mixin/test/index.html
15+
1. When in the `vaadin-control-state-mixin` directory, run `npm install` to install dependencies.
2216

17+
1. Run `npm test` to start the tests in Chrome.
2318

24-
## Running tests from the command line
2519

26-
1. Install [web-component-tester](https://www.npmjs.com/package/web-component-tester): `npm install -g web-component-tester`
20+
## Debugging tests in browser
2721

28-
1. When in the `vaadin-control-state-mixin` directory, run `wct` or `npm test`
22+
1. Run `npm run debug`, then choose manual mode (M) and open the link in browser.
2923

3024

3125
## Following the coding style
3226

33-
We are using [ESLint](http://eslint.org/) for linting JavaScript code. You can check if your code is following our standards by running `npm run lint`, which will automatically lint all `.js` files as well as JavaScript snippets inside `.html` files.
27+
We are using [ESLint](http://eslint.org/) for linting JavaScript code. You can check if your code is following our standards by running `npm run lint`, which will automatically lint all `.js` files.
3428

3529

3630
## Creating a pull request

packages/vaadin-control-state-mixin/bower.json

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)