Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration to lit #78

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
publish:
docker:
# specify the version you desire here
- image: circleci/node:12.2

working_directory: ~/repo

steps:
- checkout
- restore_cache:
key: cache-{{ checksum "package.json" }}
- run:
name: Install node modules
command: npm install
- save_cache:
key: cache-{{ checksum "package.json" }}
paths:
- node_modules
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
- checkout
- run:
name: Publish package
command: npm publish

workflows:
version: 2
release:
jobs:
- publish:
filters:
tags:
only: /(?<=^[Vv]|^)(?:(?<major>(?:0|[1-9](?:(?:0|[1-9])+)*))[.](?<minor>(?:0|[1-9](?:(?:0|[1-9])+)*))[.](?<patch>(?:0|[1-9](?:(?:0|[1-9])+)*))(?:-(?<prerelease>(?:(?:(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?|(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?)|(?:0|[1-9](?:(?:0|[1-9])+)*))(?:[.](?:(?:(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?|(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?)|(?:0|[1-9](?:(?:0|[1-9])+)*)))*))?(?:[+](?<build>(?:(?:(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?|(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?)|(?:(?:0|[1-9])+))(?:[.](?:(?:(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?|(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?)|(?:(?:0|[1-9])+)))*))?)$/
branches:
ignore: /.*/
3 changes: 1 addition & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.gitignore
demo/*
test/*
dist/*
node_modules/*
109 changes: 96 additions & 13 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,120 @@
{
"extends": ["eslint:recommended", "google"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./tsconfig.json"
},
"env": {
"browser": true
"browser": true,
"node": true,
"es6": true
},
"plugins": [
"html"
"@typescript-eslint",
"prettier"
],
"rules": {
"prettier/prettier": "error",
"linebreak-style": "off",
"padded-blocks": "off",
"brace-style": "off",
"new-cap": [
"error",
{
"capIsNewExceptions": ["Polymer"],
"capIsNewExceptionPattern": "^Etools.."
"capIsNewExceptions": [
"Polymer",
"GestureEventListeners"
],
"capIsNewExceptionPattern": "^Etools..|..Mixin$"
}
],
"no-var": "off",
"require-jsdoc": "off",
"valid-jsdoc": "off",
"comma-dangle": ["error", "never"],
"max-len": ["error", { "code": 120 }],
"camelcase": ["error", {"properties": "never"}],
"arrow-parens": [2, "as-needed", { "requireForBlockBody": true }]
"comma-dangle": [
"error",
"never"
],
"max-len": "off",
"camelcase": "off",
"arrow-parens": [
"error",
"as-needed",
{
"requireForBlockBody": true
}
],
"block-spacing": "error",
"space-in-parens": [
"error",
"never"
],
"prefer-promise-reject-errors": "off",
"no-dupe-class-members": "off",
"no-case-declarations": "off",
"no-invalid-this": "off",
"guard-for-in": "off",
"no-prototype-builtins": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
],
"@typescript-eslint/typedef": [
"error",
{
"variableDeclaration": true
}
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-use-before-define": [
"error",
{
"functions": false,
"classes": true,
"variables": true
}
],
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/member-ordering": [
"error"
],
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"args": "none"
}
]
},
"globals": {
"moment": true,
"Promise": true,
"Polymer": true,
"EtoolsLogsMixin": true
"EtoolsPmpApp": true,
"EtoolsRequestCacheDb": true,
"ShadyCSS": true,
"L": true
}
}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bower_components/
dist/
node_modules/
.idea/
npm-debug.log
npm-debug.log
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"trailingComma": "none",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"bracketSpacing": false,
"printWidth": 120,
"endOfLine": "auto"
}
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
# \<etools-app-selector\>

App selector menu

## Preview element locally
Install needed dependencies by running: `$ npm install`.
Make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) installed. Then run `$ polymer serve` to serve your element application locally.

Update demo interface: `$ polymer analyze demo/index.html > analysis.json`
Etools App selector menu

## Linting the code

Expand All @@ -17,8 +11,19 @@ Then just run the linting task
$ npm run lint
```

## Running Tests
TODO: improve and add more tests
```
$ polymer test
```
## Circle CI

Package will be automatically published after tag push (`git tag 1.2.3` , `git push --tags`). Tag name must correspond to SemVer (Semantic Versioning) rules.
Examples:

| Version match | Result |
| ------------------ | -------- |
| `1.2.3` | match |
| `1.2.3-pre` | match |
| `1.2.3+build` | match |
| `1.2.3-pre+build` | match |
| `v1.2.3-pre+build` | match |
| `1.2` | no match |

You can see more details [here](https://rgxdb.com/r/40OZ1HN5)

Loading