Skip to content

Commit

Permalink
refactor(project): general cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jwpradm committed Nov 17, 2021
1 parent a83a459 commit a9653c8
Show file tree
Hide file tree
Showing 10 changed files with 555 additions and 141 deletions.
14 changes: 9 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
.snowpack
build
# project or build
node_modules
build
.snowpack
coverage
output
src/i18n/locales/**/*_old.json
yarn-error.log

# os or editor
.idea
.DS_Store
/coverage
src/i18n/locales/**/*_old.json
/output
/.vscode/settings.json
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 150
"printWidth": 160
}
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,18 @@ The allowed scopes are:
- home
- playlist
- videodetail
- player
- series
- search
- user
- watchhistory
- favorites
- analytics
- pwa
- seo
- auth
- menu
- payment

### Subject

Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
"lint": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"",
"lint:styles": "stylelint \"src/**/*.scss\"",
"create-base": "node scripts/blueprint/index.js",
"commit-msg": "commitlint --edit $1",
"pre-commit": "lint-staged && TZ=UTC yarn test --coverage --watchAll=false --ci --bail=1",
"codecept:mobile": "codeceptjs -c codecept.mobile.js run --steps",
Expand Down Expand Up @@ -112,5 +111,8 @@
"browserslist": [
"defaults",
"not IE 11"
]
],
"optionalDependencies": {
"lighthouse": "^8.6.0"
}
}
43 changes: 22 additions & 21 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,29 @@
<link rel="manifest" href="manifest.json" />
</head>
<body>
<div id="root"></div>
<noscript>You need to enable JavaScript to run this app.</noscript>
<script>
var urlSearchParams = new URLSearchParams(window.location.search);
var configId =
urlSearchParams.get('c') ||
window.localStorage.getItem('jwshowcase.config');

if (configId) {
window.localStorage.setItem('jwshowcase.config', configId);

if (configId.includes('test--')) {
window.configLocation = 'https://jw-ott-webapp.s3.eu-central-1.amazonaws.com/' + configId + '.json';
<div id="root"></div>
<noscript>You need to enable JavaScript to run this app.</noscript>
<script>
// TODO: move this to /src/ and only for dev builds
var urlSearchParams = new URLSearchParams(window.location.search);
var configId =
urlSearchParams.get('c') ||
window.localStorage.getItem('jwshowcase.config');

if (configId) {
window.localStorage.setItem('jwshowcase.config', configId);

if (configId.includes('test--')) {
window.configLocation = 'https://jw-ott-webapp.s3.eu-central-1.amazonaws.com/' + configId + '.json';
} else {
window.configLocation =
'https://' + configId + '.jwpapp.com/config.json';
}
window.configId = configId;
} else {
window.configLocation =
'https://' + configId + '.jwpapp.com/config.json';
window.configLocation = './config.json';
}
window.configId = configId;
} else {
window.configLocation = './config.json';
}
</script>
<script type="module" src="/dist/index.js"></script>
</script>
<script type="module" src="/dist/index.js"></script>
</body>
</html>
2 changes: 0 additions & 2 deletions scripts/blueprint/base/Base.module.scss

This file was deleted.

12 changes: 0 additions & 12 deletions scripts/blueprint/base/Base.test.tsx

This file was deleted.

17 changes: 0 additions & 17 deletions scripts/blueprint/base/Base.tsx

This file was deleted.

67 changes: 0 additions & 67 deletions scripts/blueprint/index.js

This file was deleted.

Loading

0 comments on commit a9653c8

Please sign in to comment.