Skip to content

Commit

Permalink
Merge pull request #937 from GrabarzUndPartner/feature/remove-global
Browse files Browse the repository at this point in the history
fix(main): remove global variable
  • Loading branch information
ThornWalli authored Jan 27, 2024
2 parents 99d32a2 + 909bad4 commit 534f2cd
Show file tree
Hide file tree
Showing 202 changed files with 16,798 additions and 32,027 deletions.
22 changes: 11 additions & 11 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,23 @@
},
"extends": [
"@nuxtjs",
"plugin:security/recommended",
"plugin:security/recommended-legacy",
"plugin:sonarjs/recommended",
"plugin:no-unsanitized/DOM"
"plugin:no-unsanitized/DOM",
"prettier"
],
"plugins": [
"no-secrets",
"xss"
"xss",
"prettier"
],
"rules": {
"no-secrets/no-secrets": [
"error"
],
"xss/no-location-href-assign": 2,
"xss/no-mixed-html": 0,
"semi": [
2,
"always"
],
"prettier/prettier": "error",
"xss/no-location-href-assign": 2,
"xss/no-mixed-html": 0,
"vue/no-v-html": "off",
"vue/component-definition-name-casing": [
"error",
Expand All @@ -39,6 +38,7 @@
}
],
"sonarjs/no-duplicate-string": 0,
"vue/multi-word-component-names": "off"
"vue/multi-word-component-names": "off",
"@typescript-eslint/no-unused-vars": "off"
}
}
}
172 changes: 5 additions & 167 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
node: [19]

steps:
- uses: actions/setup-node@v3
Expand All @@ -33,44 +33,20 @@ jobs:
- name: Install Dependencies (Playground)
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Install Playwright
run: npx playwright install --with-deps
- name: Test
run: npm run test

installDocs:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: Install (Docs)
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [18]

steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Checkout Repo
uses: actions/checkout@v3
- name: cache node_modules (Docs)
uses: actions/cache@v3
id: cache
with:
path: docs/node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/docs/package-lock.json')) }}
- name: Install Dependencies (Docs)
if: steps.cache.outputs.cache-hit != 'true'
run: cd docs && npm ci

semantic-version:
name: Semantic Release
needs: [installPlayground, installDocs]
needs: [installPlayground]
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [18]
node: [20]

steps:
- uses: actions/setup-node@v3
Expand All @@ -94,141 +70,3 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npx -p pinst -p semantic-release -p @semantic-release/git -p @semantic-release/changelog -p @semantic-release/exec -p @semantic-release/github semantic-release --provider=github --debug=true
build-playground:
name: Build (Playground)
needs: semantic-version
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [18]

steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Checkout Repo
uses: actions/checkout@v3
- name: cache node_modules
uses: actions/cache@v3
id: cache
with:
path: |
node_modules
~/.cache/ms-playwright/
~\AppData\Local\ms-playwright\
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
- name: Build
run: |
npm run generate --build-analyze --base=/playground/ --website-host=https://nuxt-speedkit.grabarzundpartner.dev
mkdir dist/reports dist/reports/webpack
cp -R .reports/webpack/* dist/reports/webpack
touch dist/.nojekyll
env:
DIST_PATH: dist
- name: Archive Production Artifact
uses: actions/upload-artifact@master
with:
name: playgroundArtifact
path: dist

build-docs:
name: Build (Docs)
needs: semantic-version
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [18]

steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Checkout Repo
uses: actions/checkout@v3
- name: cache docs/node_modules
uses: actions/cache@v3
id: cache
with:
path: docs/node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/docs/package-lock.json')) }}
- name: Build
run: |
cd ./docs
npm run generate
touch .output/public/.nojekyll
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive Production Artifact
uses: actions/upload-artifact@master
with:
name: docsArtifact
path: docs/.output/public

sitespeed:
runs-on: ${{ matrix.os }}
name: Running sitespeed.io

strategy:
matrix:
os: [ubuntu-latest]
node: [18]

steps:
- name: docker pull
run: |
docker pull sitespeedio/sitespeed.io:20.0.0
- name: Checkout Repo
uses: actions/checkout@v3
- name: Start throttle 3g
run: |
npm install @sitespeed.io/throttle -g
throttle 3g
- name: Running sitespeed.io container with arguments and optional Docker options
run: |
docker run -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:20.0.0 https://nuxt-speedkit.grabarzundpartner.dev/playground/ --budget.configPath .github/budgets/sitespeed.json -n 3 -b chrome --mobile --summary-detail --outputFolder sitespeed-report/nuxt-speedkit
docker run -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:20.0.0 https://grabarzundpartner.de/ --budget.configPath .github/budgets/sitespeed.json -n 3 -b chrome --mobile --summary-detail --outputFolder sitespeed-report/grabarzundpartner
docker run -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:20.0.0 https://grabarz-group.de/ --budget.configPath .github/budgets/sitespeed.json -n 3 -b chrome --mobile --summary-detail --outputFolder sitespeed-report/grabarz-group
- name: Stop throttle 3g
run: |
npm install @sitespeed.io/throttle -g
throttle stop
- name: Archive Sitespeed Report
uses: actions/upload-artifact@master
with:
name: sitespeedReportArtifact
path: sitespeed-report

deploy-ghpages:
name: Deploy (GH-Pages)
needs: [build-playground, build-docs, sitespeed]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
steps:
- name: Download Artifact (Docs)
uses: actions/download-artifact@master
with:
name: docsArtifact
path: public/docs
- name: Download Artifact (Playground)
uses: actions/download-artifact@master
with:
name: playgroundArtifact
path: public/docs/playground
- name: Download Artifact (Sitespeed)
uses: actions/download-artifact@master
with:
name: sitespeedReportArtifact
path: public/docs/reports/sitespeed
- name: Deploy to GH-Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: public
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
os: [ubuntu-latest]
#os: [ubuntu-latest, macos-latest, windows-latest]
node: [16]
node: [19]

steps:
- uses: actions/setup-node@v3
Expand All @@ -36,5 +36,8 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci

- name: Install Playwright
run: npx playwright install --with-deps

- name: Test
run: npm run test
9 changes: 2 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,5 @@ dist
test/.*
eslint-report.json
video
playground/static/stream
playground/assets/proxy
stream/A
stream/B
stream/C
stream/source
src/supportedBrowserDetector.mjs
.env
src/supportedBrowserDetector.mjs
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.5.0
19
9 changes: 9 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default {
"arrowParens": "avoid",
"bracketSameLine": true,
"trailingComma": "none",
"singleQuote": true,
"semi": true,
"printWidth": 80,
"bracketSameLine": false
};
1 change: 0 additions & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"./**/*.js"
],
"rules": {
"max-line-length": null,
"no-descending-specificity": null,
"value-keyword-case": [
"lower",
Expand Down
4 changes: 1 addition & 3 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module.exports = {
extends: [
'@commitlint/config-conventional'
]
extends: ['@commitlint/config-conventional']
};
3 changes: 0 additions & 3 deletions docs/.env.example

This file was deleted.

12 changes: 0 additions & 12 deletions docs/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions docs/.npmrc

This file was deleted.

1 change: 0 additions & 1 deletion docs/.nvmrc

This file was deleted.

57 changes: 0 additions & 57 deletions docs/README.md

This file was deleted.

Loading

0 comments on commit 534f2cd

Please sign in to comment.