forked from external-repos/squoosh
other changes
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -5,3 +5,5 @@ node_modules
|
||||
*.css.d.ts
|
||||
*.o
|
||||
.parcel-cache
|
||||
.cache
|
||||
/public
|
||||
|
||||
22058
package-lock.json
generated
22058
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
51
package.json
51
package.json
@@ -15,82 +15,37 @@
|
||||
"pre-commit": "npm run lint"
|
||||
}
|
||||
},
|
||||
"browserslist": ">0.5%, not IE 11, not op_mini all",
|
||||
"postcss": {
|
||||
"modules": true,
|
||||
"plugins": {
|
||||
"postcss-modules": {
|
||||
"localsConvention": "camelCaseOnly",
|
||||
"generateScopedName": "[name]__[local]"
|
||||
}
|
||||
}
|
||||
"dependencies": {
|
||||
"codecs": "0.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||
"@babel/plugin-proposal-decorators": "^7.10.5",
|
||||
"@babel/plugin-transform-react-jsx": "^7.10.4",
|
||||
"@babel/preset-typescript": "^7.10.4",
|
||||
"@parcel/babel-preset-env": "^2.0.0-alpha.3",
|
||||
"@parcel/types": "^2.0.0-alpha.3",
|
||||
"@types/node": "10.14.15",
|
||||
"@types/pretty-bytes": "5.1.0",
|
||||
"@types/webassembly-js-api": "0.0.3",
|
||||
"@webcomponents/custom-elements": "1.2.4",
|
||||
"@webpack-cli/serve": "0.1.8",
|
||||
"assets-webpack-plugin": "3.9.10",
|
||||
"chalk": "2.4.2",
|
||||
"chokidar": "3.0.2",
|
||||
"classnames": "2.2.6",
|
||||
"clean-webpack-plugin": "1.0.1",
|
||||
"comlink": "3.1.1",
|
||||
"copy-webpack-plugin": "5.0.4",
|
||||
"critters-webpack-plugin": "2.4.0",
|
||||
"css-loader": "1.0.1",
|
||||
"ejs": "2.6.2",
|
||||
"escape-string-regexp": "2.0.0",
|
||||
"exports-loader": "0.7.0",
|
||||
"file-drop-element": "0.2.0",
|
||||
"file-loader": "4.2.0",
|
||||
"gzip-size": "5.1.1",
|
||||
"html-webpack-plugin": "3.2.0",
|
||||
"husky": "3.0.4",
|
||||
"idb-keyval": "3.2.0",
|
||||
"linkstate": "1.1.1",
|
||||
"loader-utils": "1.2.3",
|
||||
"mini-css-extract-plugin": "0.8.0",
|
||||
"minimatch": "3.0.4",
|
||||
"node-fetch": "2.6.0",
|
||||
"node-sass": "4.13.0",
|
||||
"normalize-path": "^3.0.0",
|
||||
"optimize-css-assets-webpack-plugin": "5.0.1",
|
||||
"parcel": "^2.0.0-beta.1",
|
||||
"pointer-tracker": "^2.4.0",
|
||||
"postcss-modules": "^3.2.0",
|
||||
"preact": "8.4.2",
|
||||
"prerender-loader": "1.3.0",
|
||||
"pretty-bytes": "5.3.0",
|
||||
"progress-bar-webpack-plugin": "1.12.1",
|
||||
"raw-loader": "3.1.0",
|
||||
"readdirp": "3.1.2",
|
||||
"sass": "^1.26.10",
|
||||
"sass-loader": "7.3.1",
|
||||
"script-ext-html-webpack-plugin": "2.1.4",
|
||||
"source-map-loader": "0.2.4",
|
||||
"style-loader": "1.0.0",
|
||||
"terser-webpack-plugin": "1.4.1",
|
||||
"travis-size-report": "1.1.0",
|
||||
"ts-loader": "6.0.3",
|
||||
"tslint": "5.19.0",
|
||||
"tslint-config-airbnb": "5.11.1",
|
||||
"tslint-config-semistandard": "8.0.1",
|
||||
"tslint-react": "4.0.0",
|
||||
"typed-css-modules": "0.4.2",
|
||||
"typescript": "3.5.3",
|
||||
"url-loader": "2.1.0",
|
||||
"webpack": "4.39.3",
|
||||
"webpack-bundle-analyzer": "3.4.1",
|
||||
"webpack-cli": "3.3.4",
|
||||
"webpack-dev-server": "3.8.0",
|
||||
"worker-plugin": "3.1.0"
|
||||
"typescript": "3.5.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,10 @@ import { linkRef, Fileish } from '../../lib/initial-util';
|
||||
import * as style from './style.module.scss';
|
||||
import { FileDropEvent } from 'file-drop-element';
|
||||
import 'file-drop-element';
|
||||
import SnackBarElement, { SnackOptions } from '../../lib/SnackBar';
|
||||
import '../../lib/SnackBar';
|
||||
import Intro from '../intro';
|
||||
import '../custom-els/LoadingSpinner';
|
||||
import SnackBarElement, { SnackOptions } from '../../lib/SnackBar/index';
|
||||
import '../../lib/SnackBar/index';
|
||||
import Intro from '../intro/index';
|
||||
import '../custom-els/LoadingSpinner/index';
|
||||
|
||||
const ROUTE_EDITOR = '/editor';
|
||||
|
||||
|
||||
@@ -12,6 +12,6 @@
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
</head>
|
||||
<body>
|
||||
<script src="./index.ts"></script>
|
||||
<script type="module" src="./index.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -10,7 +10,7 @@ if (!('customElements' in self)) {
|
||||
init();
|
||||
}
|
||||
|
||||
if (typeof process.env.PRERENDER === 'undefined') {
|
||||
if (typeof window !== 'undefined') {
|
||||
// Determine the current display mode.
|
||||
let displayMode = 'browser';
|
||||
const mqStandAlone = '(display-mode: standalone)';
|
||||
|
||||
@@ -60,11 +60,11 @@ export function getSharedImage(): Promise<File> {
|
||||
/** Set up the service worker and monitor changes */
|
||||
export async function offliner(showSnack: SnackBarElement['showSnackbar']) {
|
||||
// This needs to be a typeof because Webpack.
|
||||
if (process.env.PRERENDER) return;
|
||||
if (typeof window === 'undefined') return;
|
||||
|
||||
if (!navigator.serviceWorker) return;
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
if (process.env.NODE_ENV === 'production' && !module.hot) {
|
||||
navigator.serviceWorker.register('../sw');
|
||||
}
|
||||
|
||||
|
||||
5
src/missing-types.d.ts
vendored
5
src/missing-types.d.ts
vendored
@@ -45,6 +45,11 @@ declare module 'data-url:*' {
|
||||
export default value;
|
||||
}
|
||||
|
||||
declare module 'bundle:*' {
|
||||
const value: string;
|
||||
export default value;
|
||||
}
|
||||
|
||||
declare var VERSION: string;
|
||||
|
||||
declare var ga: {
|
||||
|
||||
@@ -12,10 +12,18 @@
|
||||
"jsx": "react",
|
||||
"jsxFactory": "h",
|
||||
"allowJs": false,
|
||||
"baseUrl": "."
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"codecs/*": [
|
||||
"codecs/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"src/sw/**/*",
|
||||
"src/codecs/processor-worker/**/*"
|
||||
"src/codecs/processor-worker/**/*",
|
||||
".cache",
|
||||
"public",
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user