Skip to content

Commit

Permalink
Merge pull request #2 from nyaruka/main
Browse files Browse the repository at this point in the history
Update from base repo
  • Loading branch information
ihor-palii authored Feb 10, 2022
2 parents 7e9648d + d31e533 commit 0ee3741
Show file tree
Hide file tree
Showing 374 changed files with 178,227 additions and 12,941 deletions.
29 changes: 29 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true


[*]

# Change these settings to your own preference
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.json]
indent_size = 2

[*.{html,js,md}]
block_comment_start = /**
block_comment = *
block_comment_end = */
23 changes: 23 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'import', 'html'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/errors',
'plugin:import/warnings',
],
rules: {
// disable the rule for all files
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: '_' }],
'import/named': 'off',
'import/no-unresolved': 'off',
'import/extensions': ['error', 'never', { test: 'always' }],
},
};
32 changes: 8 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,8 @@ name: Build
on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12
- name: Build and Test
run: |
yarn install
yarn test
env:
CI: true
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
file: coverage/lcov.info

screenshots:
bulid:
runs-on: macos-latest
needs: build
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
Expand All @@ -35,11 +14,16 @@ jobs:
- name: Screenshot Tests
run: |
yarn install
yarn screenshots
yarn test
env:
CI: true
- uses: actions/upload-artifact@v2
if: failure()
with:
name: screenshots
path: target/
path: screenshots/
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
file: coverage/lcov.info
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish to NPM
on:
push:
tags:
- "*"
- '*'

jobs:
build:
Expand All @@ -14,7 +14,7 @@ jobs:
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
version: 12.x
node-version: 12
- name: Build and Test
run: |
yarn install
Expand Down
27 changes: 22 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
node_modules/
build/
coverage/
target/screenshots
target/diff
## editors
/.idea
/.vscode

## system files
.DS_Store

## npm
/node_modules/
/npm-debug.log

## testing
/coverage/
/screenshots/test

## temp folders
/.tmp/

# build
/_site/
/dist/
/out-tsc/
14 changes: 14 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
stories: ['../stories/**/*.stories.{js,md,mdx}'],
addons: [
'storybook-prebuilt/addon-knobs/register.js',
'storybook-prebuilt/addon-docs/register.js',
'storybook-prebuilt/addon-viewport/register.js',
],
esDevServer: {
// custom es-dev-server options
nodeResolve: true,
watch: true,
open: true,
},
};
1 change: 1 addition & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link type="text/css" rel="stylesheet" href="https://textit.com/sitestatic/css/temba-components.css"/>
17 changes: 17 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { addParameters, setCustomElements } from '@open-wc/demoing-storybook';

addParameters({
docs: {
iframeHeight: '200px',
},
});

async function run() {
const customElements = await (
await fetch(new URL('../custom-elements.json', import.meta.url))
).json();

setCustomElements(customElements);
}

run();
Loading

0 comments on commit 0ee3741

Please sign in to comment.