This repository has been archived by the owner on Aug 1, 2024. It is now read-only.
-
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.
Merge pull request #5 from Tsukina-7mochi/refactor
Refactored and re-implemented all scripts
- Loading branch information
Showing
143 changed files
with
4,873 additions
and
2,725 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
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
export * as esbuild from 'https://deno.land/x/[email protected]/mod.js'; | ||
export { posix } from 'https://deno.land/[email protected]/path/mod.ts'; | ||
export * as fs from 'https://deno.land/[email protected]/fs/mod.ts'; | ||
export { crypto } from 'https://deno.land/[email protected]/crypto/mod.ts'; | ||
export * as asserts from 'https://deno.land/[email protected]/testing/asserts.ts'; | ||
export * as path from 'https://deno.land/[email protected]/path/mod.ts'; | ||
export * as fs from 'https://deno.land/[email protected]/fs/mod.ts'; | ||
export { crypto } from 'https://deno.land/[email protected]/crypto/mod.ts'; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
/bundle.js |
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,22 @@ | ||
import { esbuild } from '../../deps.ts'; | ||
import esbuildCachePlugin from '../../mod.ts'; | ||
|
||
const lockMap = JSON.parse(Deno.readTextFileSync('./deno.lock')); | ||
|
||
const denoPath = await esbuildCachePlugin.util.getDenoDir(); | ||
await esbuild.build({ | ||
entryPoints: ['./index.ts'], | ||
bundle: true, | ||
outfile: './bundle.js', | ||
plugins: [ | ||
esbuildCachePlugin({ | ||
denoCacheDirectory: denoPath, | ||
lockMap, | ||
loaderRules: [ | ||
{ test: /^node:/, loader: 'empty' }, | ||
], | ||
}), | ||
], | ||
}); | ||
|
||
await esbuild.stop(); |
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,9 @@ | ||
{ | ||
"tasks": { | ||
"build": "deno run -A build.ts", | ||
"cache": "rm deno.lock && deno cache **/*.ts", | ||
"clean": "rm -f bundle.js", | ||
"run:bundle": "deno run bundle.js", | ||
"run:raw": "deno run index.ts" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,4 @@ | ||
import 'node:fs'; | ||
import 'node:util'; | ||
|
||
console.log('/index.ts'); |
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,15 @@ | ||
# Example: Ignoring Modules | ||
|
||
You can ignore specific module import with `loaderRules` option by mapping | ||
`empty` loader to `node:` modules: | ||
|
||
```javascript | ||
esbuildCachePlugin({ | ||
loaderRules: [ | ||
// ignore node core modules | ||
{ test: /^node:/, loader: 'empty' }, | ||
], | ||
}); | ||
``` | ||
|
||
You can also map other patterns to loaders such as `.css$` to `css` loader. |
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 @@ | ||
/bundle.js |
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,21 @@ | ||
import { esbuild } from '../../deps.ts'; | ||
import esbuildCachePlugin from '../../mod.ts'; | ||
|
||
const importMap = JSON.parse(Deno.readTextFileSync('./import_map.json')); | ||
const lockMap = JSON.parse(Deno.readTextFileSync('./deno.lock')); | ||
|
||
const denoPath = await esbuildCachePlugin.util.getDenoDir(); | ||
await esbuild.build({ | ||
entryPoints: ['./src/index.ts'], | ||
bundle: true, | ||
outfile: './bundle.js', | ||
plugins: [ | ||
esbuildCachePlugin({ | ||
denoCacheDirectory: denoPath, | ||
lockMap, | ||
importMap, | ||
}), | ||
], | ||
}); | ||
|
||
await esbuild.stop(); |
Oops, something went wrong.