-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
set up files and folder structure; InjectManifest throwing error - no…
…t sure what's going on
- Loading branch information
1 parent
5a629c2
commit ca75dbb
Showing
22 changed files
with
8,777 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
production=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"env": { | ||
"browser": true | ||
}, | ||
"rules": { | ||
// Override our default settings just for this directory | ||
"eqeqeq": "warn", | ||
"strict": "off", | ||
"import/no-extraneous-dependencies": "off", | ||
"import/prefer-default-export": "off", | ||
"no-underscore-dangle": "off", | ||
"no-restricted-globals": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# next.js build output | ||
.next | ||
|
||
# lock files | ||
package-lock.json | ||
yarn.lock | ||
|
||
.DS_Store | ||
.vscode | ||
*.xslx |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>ETH</title> | ||
|
||
<link rel="stylesheet" | ||
href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.52.2/codemirror.min.css"> | ||
</link> | ||
<script type="text/javascript" | ||
src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.52.2/codemirror.min.js"> | ||
</script> | ||
<script type="text/javascript" | ||
src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.52.2/mode/javascript/javascript.min.js"> | ||
</script> | ||
<link rel="stylesheet" | ||
href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.52.2/theme/monokai.min.css"> | ||
</link> | ||
</head> | ||
<body> | ||
<nav id="navbar"> | ||
<div class="nav-btn"> | ||
<a class="btn btn-sm btn-dark" id="buttonInstall" role="button">Install!</a> | ||
</div> | ||
<h1> Enter Text Here</h1> | ||
|
||
<div class="navbar-brand" | ||
><img src="./assets/icons/icon_96x96.png" | ||
/></div> | ||
</nav> | ||
|
||
<main id="main"> | ||
<div class="loading-container"> | ||
<div class="loading-spinner"></div> | ||
</div> | ||
</main> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "JATE", | ||
"scripts": { | ||
"dev": "webpack-dev-server", | ||
"build": "webpack --mode production", | ||
"start": "webpack --watch" | ||
}, | ||
"author": "2U", | ||
"license": "UNLICENSED", | ||
"devDependencies": { | ||
"@babel/core": "^7.15.0", | ||
"@babel/plugin-transform-runtime": "^7.15.0", | ||
"@babel/preset-env": "^7.15.0", | ||
"@babel/runtime": "^7.15.3", | ||
"babel-loader": "^8.2.2", | ||
"css-loader": "^6.2.0", | ||
"html-webpack-plugin": "^5.3.2", | ||
"http-server": "^0.11.1", | ||
"style-loader": "^3.2.1", | ||
"webpack": "^5.51.1", | ||
"webpack-cli": "^4.8.0", | ||
"webpack-dev-server": "^4.0.0", | ||
"webpack-pwa-manifest": "^4.3.0", | ||
"workbox-webpack-plugin": "^6.2.4" | ||
}, | ||
"dependencies": { | ||
"code-mirror-themes": "^1.0.0", | ||
"idb": "^6.1.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
const { offlineFallback, warmStrategyCache } = require('workbox-recipes'); | ||
const { CacheFirst } = require('workbox-strategies'); | ||
const { StaleWhileRevalidate } = require('workbox-strategies'); | ||
const { registerRoute } = require('workbox-routing'); | ||
const { CacheableResponsePlugin } = require('workbox-cacheable-response'); | ||
const { ExpirationPlugin } = require('workbox-expiration'); | ||
const { precacheAndRoute } = require('workbox-precaching/precacheAndRoute'); | ||
|
||
precacheAndRoute(self.__WB_MANIFEST); | ||
|
||
const pageCache = new CacheFirst({ | ||
cacheName: 'page-cache', | ||
plugins: [ | ||
new CacheableResponsePlugin({ | ||
statuses: [0, 200], | ||
}), | ||
new ExpirationPlugin({ | ||
maxAgeSeconds: 30 * 24 * 60 * 60, | ||
}), | ||
], | ||
}); | ||
|
||
warmStrategyCache({ | ||
urls: ['/index.html', '/'], | ||
strategy: pageCache, | ||
}); | ||
|
||
registerRoute(({ request }) => request.mode === 'navigate', pageCache); | ||
|
||
// TODO: Implement asset caching | ||
// Here we define the callback function that will filter the requests we want to cache (in this case, JS and CSS files) | ||
registerRoute(({request}) => ['style', 'script', 'worker'].includes(request.destination), | ||
new StaleWhileRevalidate({ | ||
// Name of the cache storage. | ||
cacheName: 'asset-cache', | ||
plugins: [ | ||
// This plugin will cache responses with these headers to a maximum-age of 30 days | ||
new CacheableResponsePlugin({ | ||
statuses: [0, 200], | ||
}), | ||
], | ||
}) | ||
); |
Oops, something went wrong.