Skip to content

Commit

Permalink
refactor!: convert to Polymer 3 (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan authored Feb 9, 2021
1 parent f7c5b85 commit 699a480
Show file tree
Hide file tree
Showing 75 changed files with 1,595 additions and 2,651 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

30 changes: 13 additions & 17 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
{
"extends": ["vaadin", "eslint:recommended"],
"env": {
"browser": true,
"node": true,
"es6":true
},
"plugins": [
"html"
],
"globals": {
"Vaadin": false,
"Polymer": false,
"CustomElements": false
},
"rules": {
"no-console": ["error",{"allow": ["warn", "error"] }]
}
"extends": [
"eslint:recommended",
"plugin:prettier/recommended"
],
"plugins": ["prettier"],
"env": {
"browser": true,
"es6": true
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2020
}
}
28 changes: 28 additions & 0 deletions .github/workflows/sauce.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: sauce

on:
push:
branches:
- '**'
tags-ignore:
- '*.*'

jobs:
unit-tests:
runs-on: ubuntu-latest
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12

- name: Install dependencies
run: npm install

- name: SauceLabs tests
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
run: npm run test:sauce
40 changes: 40 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: tests

on: [pull_request]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12

- name: Install dependencies
run: npm install

- name: Check version
run: npm run check-version

- name: Lint JavaScript
run: npm run lint:js

- name: Lint CSS
run: npm run lint:css

unit-tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12

- name: Install dependencies
run: npm install

- name: Unit tests
run: npm test
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
.idea/
bower_components/
node_modules/
travis.log
bower_components
node_modules
package-lock.json
yarn.lock
coverage
analysis.json
dist
analysis.json
10 changes: 0 additions & 10 deletions .npmignore

This file was deleted.

6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"printWidth": 120,
"trailingComma": "none",
"htmlWhitespaceSensitivity": "strict"
}
7 changes: 5 additions & 2 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"extends": "stylelint-config-vaadin"
}
"extends": [
"stylelint-config-vaadin",
"stylelint-config-prettier"
]
}
43 changes: 0 additions & 43 deletions .travis.yml

This file was deleted.

67 changes: 18 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
[![npm version](https://badgen.net/npm/v/@vaadin/vaadin-board)](https://www.npmjs.com/package/@vaadin/vaadin-board)
[![Bower version](https://badgen.net/github/release/vaadin/vaadin-board)](https://github.com/vaadin/vaadin-board/releases)
[![Build Status](https://travis-ci.org/vaadin/vaadin-board.svg?branch=master)](https://travis-ci.org/vaadin/vaadin-board)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vaadin/web-components?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/vaadinvaadin-board)
[![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/star/vaadinvaadin-board.svg)](https://vaadin.com/directory/component/vaadinvaadin-board)


# \<vaadin-board\>
# &lt;vaadin-board&gt;

[Live Demo ↗](https://vaadin.com/components/vaadin-board/html-examples)
|
[API documentation ↗](https://vaadin.com/components/vaadin-board/html-api)


[&lt;vaadin-board&gt;](https://vaadin.com/components/vaadin-board) is a Web component to create flexible responsive layouts and build nice looking dashboard.
Vaadin Board key feature is how it effectively reorders the widgets on different screen sizes, maximizing the use of space and looking stunning.

[![npm version](https://badgen.net/npm/v/@vaadin/vaadin-board)](https://www.npmjs.com/package/@vaadin/vaadin-board)
[![Build Status](https://travis-ci.org/vaadin/vaadin-board.svg?branch=master)](https://travis-ci.org/vaadin/vaadin-board)
[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/vaadinvaadin-board)
[![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/star/vaadinvaadin-board.svg)](https://vaadin.com/directory/component/vaadinvaadin-board)
[![Discord](https://img.shields.io/discord/732335336448852018?label=discord)](https://discord.gg/PHmkCKC)

```html
<vaadin-board>
<vaadin-board-row>
Expand Down Expand Up @@ -44,29 +40,6 @@ Vaadin Board key feature is how it effectively reorders the widgets on different

### Installation

The Vaadin components are distributed as Bower and npm packages.
Please note that the version range is the same, as the API has not changed.
You should not mix Bower and npm versions in the same application, though.

Unlike the official Polymer Elements, the converted Polymer 3 compatible Vaadin components
are only published on npm, not pushed to GitHub repositories.

### Polymer 2 and HTML Imports compatible version

Install `vaadin-board`:

```sh
$ bower i vaadin/vaadin-board --save
```

Once installed, import it in your application:

```html
<link rel="import" href="bower_components/vaadin-board/vaadin-board.html">
```

### Polymer 3 and ES Modules compatible version

Install `vaadin-board`:

```sh
Expand All @@ -79,33 +52,29 @@ Once installed, import it in your application:
import '@vaadin/vaadin-board/vaadin-board.js';
```

## Running demos and tests in browser

1. Clone the repository
`git clone https://github.com/vaadin/vaadin-board.git`

1. Make sure you have [npm](https://www.npmjs.com/) installed.
## Running API docs in a browser

1. When in the `vaadin-element` directory, run `npm install` and then `bower install` to install dependencies.
1. Fork the `vaadin-board` repository and clone it locally.

1. Make sure you have [polymer-cli](https://www.npmjs.com/package/polymer-cli) installed globally: `npm i -g polymer-cli`.
1. Make sure you have [node.js](https://nodejs.org/) 12.x installed.

1. Run `polymer serve --open`, browser will automatically open the component API documentation.

1. You can also open demo or in-browser tests by adding **demo** or **test** to the URL, for example:
1. Make sure you have [npm](https://www.npmjs.com/) installed.

- http://127.0.0.1:8080/components/vaadin-board/demo
- http://127.0.0.1:8080/components/vaadin-board/test
1. When in the `vaadin-board` directory, run `npm install` to install dependencies.

1. Run `npm start`, browser will automatically open the component API documentation.

## Running tests from the command line

1. When in the `vaadin-board` directory, run `polymer test`
1. When in the `vaadin-board` directory, run `npm test`

## Debugging tests in the browser

1. Run `npm run debug`, then choose manual mode (M) and open the link in browser.

## Following the coding style

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.
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.


## Contributing
Expand Down
37 changes: 0 additions & 37 deletions bower.json

This file was deleted.

10 changes: 0 additions & 10 deletions demo/.eslintrc.json

This file was deleted.

Loading

0 comments on commit 699a480

Please sign in to comment.