-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Refactor the non-packages portion of the monorepo into ESM - Move internal packages to self-contained @internals/* packages, reference via pnpm monorepo support - Refactor package bundling to leverage verdaccio for a saner approach to package managemenet during tests - Expose local servers via tunnelmole to avoid issues with browserstack-local - Support index.min.js UMD exports for all models - Expose Upscaler CLI for managing monorepo scripts: - build:upscaler - build:models - build:core - scaffold:upscaler - scaffold:models - 5 test commands
- Loading branch information
1 parent
2b5d019
commit 1b9d632
Showing
439 changed files
with
647,738 additions
and
20,371 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 |
---|---|---|
|
@@ -21,6 +21,7 @@ yarn-error.log | |
.yarnrc | ||
.parcel-cache | ||
*.tsbuildinfo | ||
.npmrc | ||
.yarn | ||
.pnpm-debug.log | ||
umd-tmp | ||
|
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,11 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>UpscalerJS Development: Basic ESM</title> | ||
<link rel="stylesheet" href="../../global.css" /> | ||
</head> | ||
<body> | ||
<script type="module" src="./index.ts"></script> | ||
</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,2 @@ | ||
import Upscaler from 'upscaler'; | ||
const upscaler = new Upscaler(); |
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,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<link rel="stylesheet" href="../global.css" /> | ||
</head> | ||
<body> | ||
<ul> | ||
<li><a href="esm/">ESM</a></li> | ||
<li><a href="umd/">UMD</a></li> | ||
</ul> | ||
</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,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>UpscalerJS Development: Basic UMD</title> | ||
<link rel="stylesheet" href="../../global.css" /> | ||
</head> | ||
<body> | ||
<script type="module" src="./index.ts"></script> | ||
<script src="/node_modules/upscaler/node_modules/@upscalerjs/default-model/dist/umd/index.min.js"></script> | ||
<script src="/node_modules/upscaler/dist/browser/umd/upscaler.min.js"></script> | ||
</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,3 @@ | ||
const upscaler = new window['Upscaler']({ | ||
model: window['DefaultUpscalerJSModel'], | ||
}); |
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
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 @@ | ||
.storage |
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,33 @@ | ||
{ | ||
"name": "@internals/bundlers", | ||
"private": true, | ||
"type": "module", | ||
"version": "0.1.0", | ||
"description": "Test servers for testing UpscalerJS against", | ||
"exports": { | ||
".": "./src/index.ts", | ||
"./webpack": "./src/bundlers/webpack/src/index.ts", | ||
"./esbuild": "./src/bundlers/esbuild/src/index.ts", | ||
"./node": "./src/bundlers/node/src/index.ts", | ||
"./umd": "./src/bundlers/umd/src/index.ts" | ||
}, | ||
"author": "Kevin Scott", | ||
"license": "MIT", | ||
"dependencies": { | ||
"fs-extra": "latest", | ||
"@internals/common": "workspace:*", | ||
"@internals/http-server": "workspace:*", | ||
"@internals/registry": "workspace:*" | ||
}, | ||
"scripts": { | ||
"test": "vitest" | ||
}, | ||
"engines": { | ||
"node": ">=16.0.0" | ||
}, | ||
"devDependencies": { | ||
"vitest": "^0.34.2", | ||
"@types/ejs": "^3.1.2", | ||
"@types/js-yaml": "^4.0.5" | ||
} | ||
} |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
test/lib/esm-esbuild/src/index.html → ...undlers/esbuild/_templates/index.html.ejs
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
13 changes: 13 additions & 0 deletions
13
internals/bundlers/src/bundlers/esbuild/_templates/index.js.ejs
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,13 @@ | ||
import * as tf from '@tensorflow/tfjs'; | ||
import Upscaler from 'upscaler'; | ||
|
||
/*** Auto-generated dependencies ***/ | ||
<% dependencies.forEach(function(dependency){ %> | ||
import <%- dependency.hashedName %> from '<%- dependency.name %>'; | ||
window['<%- dependency.name %>'] = <%- dependency.hashedName %>; | ||
<% }); %> | ||
|
||
window.tf = tf; | ||
window.Upscaler = Upscaler; | ||
document.title = [document.title, 'Loaded'].join(' | '); | ||
document.body.querySelector('#output').innerHTML = document.title; |
Oops, something went wrong.