Skip to content

Commit

Permalink
Merge pull request #17 from centrica-engineering/feature/inital-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jholt1 authored Dec 1, 2021
2 parents 73e730b + 52669c8 commit 213c19a
Show file tree
Hide file tree
Showing 75 changed files with 33,438 additions and 4,074 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ node_modules/*
docs/*
**/build/*
**/dist/*
**/__snapshots__/*
**/coverage/*
muon.config.json
rollup.config.js
8 changes: 4 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
},
extends: 'eslint:recommended',
parserOptions: {
ecmaVersion: 2017,
ecmaVersion: 2020,
sourceType: 'module'
},
rules: {
Expand Down Expand Up @@ -37,7 +37,7 @@ module.exports = {
'no-unused-expressions': 'warn',
'no-useless-call': 'warn',
'no-useless-concat': 'warn',
'object-curly-spacing': ["error", "always"],
'object-curly-spacing': ['error', 'always'],
'vars-on-top': 'warn',
'no-use-before-define': ['warn', {
functions: false
Expand Down Expand Up @@ -73,7 +73,7 @@ module.exports = {
maxEOF: 1
}],
'no-plusplus': ['warn', {
'allowForLoopAfterthoughts': true
allowForLoopAfterthoughts: true
}],
'func-call-spacing': 'error',
'no-trailing-spaces': 'warn',
Expand Down Expand Up @@ -101,7 +101,7 @@ module.exports = {
'no-var': 'warn',
'prefer-const': 'warn',
'space-before-function-paren': ['warn', {
named: 'never'
named: 'never'
}]
}
};
21 changes: 21 additions & 0 deletions .github/workflows/publish-experimental.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish NPM experimental

on:
push:
branches:
- main

jobs:
publish-experimental:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm version prerelease --git-tag-version=false --preid=experimental-"$(git show -s --format=%h)" --workspace=@muon/library
- run: npm publish --workspace=@muon/library --access public --tag experimental
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
49 changes: 49 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Tests

on: [pull_request]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: npm
- run: npm ci
- run: npm run lint

browserstack:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: npm
- run: npm ci
- run: npm run test:browserstack
env:
BROWSER_STACK_USERNAME: ${{ secrets.BROWSER_STACK_USERNAME }}
BROWSER_STACK_ACCESS_KEY: ${{ secrets.BROWSER_STACK_ACCESS_KEY }}

testing:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: npm
- run: npm ci
- run: npx playwright install-deps
- run: npm run test
- uses: actions/upload-artifact@v2
with:
name: code-coverage
path: packages/library/coverage/lcov-report/*
if-no-files-found: warn
3 changes: 2 additions & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"examples/**",
"dist/**",
"**/dist/**",
"**/build/**"
"**/build/**",
"**/coverage/**"
]
}
2 changes: 1 addition & 1 deletion examples/starter-tokens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node ../../packages/library/scripts/serve.mjs"
"start": "muon-serve"
},
"keywords": [],
"author": "",
Expand Down
2 changes: 1 addition & 1 deletion examples/starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node ../../packages/library/scripts/serve.mjs"
"start": "muon-serve"
},
"keywords": [],
"author": "",
Expand Down
Loading

0 comments on commit 213c19a

Please sign in to comment.