Skip to content

Commit

Permalink
Merge pull request #7 from tvnova-ogs/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
adamjosefus authored Dec 11, 2021
2 parents 77a8f28 + 220636e commit 007b77d
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pkg.macos
pkg.exe
pkg.linux
pkg.bundled.js
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,17 @@ deno run -A ./bin/compile.ts
Compile to /some/path/pkg/pkg.macos
> deno --unstable compile --output=pkg.macos --allow-all ./main.ts
> Succeed
```



## Bundle to jednoho javavascript souboru

```bash
deno run -A ./bin/bundle.ts.ts
```
```bash
Bundle to /some/path/pkg/pkg.bundled.js
> deno bundle ./main.ts ./pkg.bundled.js
> Succeed
```
29 changes: 29 additions & 0 deletions bin/bundle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { join } from "https://deno.land/[email protected]/path/mod.ts";


const name = 'pkg.bundled.js';
const path = join(Deno.cwd(), name);

const cmd = [
`deno`,
`bundle`,
`./main.ts`,
`./${name}`
];

console.log("\n");
console.log(`Bundle to %c${path}`, "font-weight: bold;");
console.log(`%c> ${cmd.join(' ')}`, "color: grey");

const process = await Deno.run({
cmd: cmd,
stdout: 'piped',
stderr: 'piped',
})

const { success } = await process.status();

if (success) console.log(`%c> Succeed`, "color: grey");
else console.log(`%c> Failed`, "color: grey");

console.log("\n");

0 comments on commit 007b77d

Please sign in to comment.