Skip to content

Commit

Permalink
Merge pull request #4 from adamjosefus/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
adamjosefus authored Apr 24, 2022
2 parents 0109e74 + 6435722 commit dddef38
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 30 deletions.
25 changes: 14 additions & 11 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"--allow-run",
"./bin/bundle.ts"
],
"group": "build",
"group": "build"
},
{
"label": "Compile to Native Executable File",
Expand All @@ -21,7 +21,7 @@
"--allow-run",
"./bin/compile.ts"
],
"group": "build",
"group": "build"
},
{
"label": "Install ESBuilder",
Expand All @@ -32,28 +32,28 @@
"--allow-run",
"./bin/install.ts"
],
"group": "build",
"group": "build"
},
{
"label": "Uninstall ESBuilder",
"command": "deno",
"args": [
"uninstall",
"esbuilder",
"esbuilder"
],
"group": "build",
"group": "build"
},
{
"label": "Reinstall ESBuilder",
"dependsOrder": "sequence",
"dependsOn":[
"Uninstall Builder",
"Install Builder"
"Uninstall ESBuilder",
"Install ESBuilder"
],
"group": "build",
},
{
"label": "Run Demo",
"label": "🏖 — Run Demo",
"options": {
"cwd": "./demo"
},
Expand All @@ -64,9 +64,12 @@
"--allow-write",
"--allow-env",
"--allow-run",
"--allow-net",
"--no-prompt",
"../builder.ts",
"--c=./config.json",
]
},
"--c=./config.json"
],
"group": "build"
}
]
}
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ deno install \
## Install in **Terminal** from Repository
- Clone this repository
- Run the following command:

-
```sh
deno install \
--allow-read \
--allow-write \
--allow-env \
--allow-run \
--allow-net \
--no-prompt \
--name esbuilder \
./builder.ts
```
Expand Down
4 changes: 2 additions & 2 deletions bin/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* @author Adam Josefus
*/

import { join, dirname, fromFileUrl, normalize, relative } from 'https://deno.land/std@0.132.0/path/mod.ts';
import { gray, bold } from 'https://deno.land/std@0.132.0/fmt/colors.ts';
import { join, dirname, fromFileUrl, normalize, relative } from 'https://deno.land/std@0.136.0/path/mod.ts';
import { gray, bold } from 'https://deno.land/std@0.136.0/fmt/colors.ts';


const __dirname = dirname(fromFileUrl(import.meta.url));
Expand Down
10 changes: 8 additions & 2 deletions bin/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*/


import { join, dirname, fromFileUrl, normalize, relative } from 'https://deno.land/std@0.132.0/path/mod.ts';
import { gray, bold } from "https://deno.land/std@0.132.0/fmt/colors.ts";
import { join, dirname, fromFileUrl, normalize, relative } from 'https://deno.land/std@0.136.0/path/mod.ts';
import { gray, bold } from "https://deno.land/std@0.136.0/fmt/colors.ts";


const __dirname = dirname(fromFileUrl(import.meta.url));
Expand All @@ -27,6 +27,12 @@ const outputFile = relative(Deno.cwd(), normalize(join(root, outputName)));
const cmd = [
`deno`,
`compile`,
'--allow-read',
'--allow-write',
'--allow-env',
'--allow-run',
'--allow-net',
'--no-prompt',
`--output=${outputFile}`,
`${builderFile}`
];
Expand Down
6 changes: 4 additions & 2 deletions bin/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*/


import { join, dirname, fromFileUrl, normalize, relative } from 'https://deno.land/std@0.132.0/path/mod.ts';
import { gray, bold } from "https://deno.land/std@0.132.0/fmt/colors.ts";
import { join, dirname, fromFileUrl, normalize, relative } from 'https://deno.land/std@0.136.0/path/mod.ts';
import { gray, bold } from "https://deno.land/std@0.136.0/fmt/colors.ts";


const __dirname = dirname(fromFileUrl(import.meta.url));
Expand All @@ -23,6 +23,8 @@ const cmd = [
'--allow-write',
'--allow-env',
'--allow-run',
'--allow-net',
'--no-prompt',
'--name',
`${packageName}`,
`${builderFile}`
Expand Down
14 changes: 8 additions & 6 deletions src/BuilderCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* @author Adam Josefus
*/

import { join } from "https://deno.land/std@0.132.0/path/mod.ts";
import { join } from "https://deno.land/std@0.136.0/path/mod.ts";
import * as esbuild from 'https://deno.land/x/esbuild@v0.14.27/mod.js';
import { type ConfigType } from "./parseConfig.ts";
import { brightRed as red, yellow, green, gray } from 'https://deno.land/std@0.132.0/fmt/colors.ts';
import { brightRed as red, yellow, green, gray } from 'https://deno.land/std@0.136.0/fmt/colors.ts';
import * as print from "./stylePrint.ts";
import { pipe } from "./pipe.ts";

Expand Down Expand Up @@ -282,10 +282,12 @@ export class BuilderCore {
if (!this.#config.options.watch) {
this.stop();
} else {
Deno.addSignalListener('SIGINT', () => {
this.#programInterruptToggle = true;
this.stop();
});
if (Deno.build.os !== "windows") {
Deno.addSignalListener('SIGINT', () => {
this.#programInterruptToggle = true;
this.stop();
});
}
}
}

Expand Down
7 changes: 5 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @author Adam Josefus
*/

import { join, isAbsolute, dirname } from "https://deno.land/std@0.132.0/path/mod.ts";
import { join, isAbsolute, dirname } from "https://deno.land/std@0.136.0/path/mod.ts";
import { Arguments, HelpInterruption, ValueException } from "https://deno.land/x/allo_arguments@v5.0.2/mod.ts";
import { BuilderManager } from "./BuilderManager.ts";
import { makeAbsolute } from "./makeAbsolute.ts";
Expand Down Expand Up @@ -84,7 +84,10 @@ function getArguments() {

async function watchConfigFile(path: string, manager: BuilderManager) {
const watcher = Deno.watchFs(path);
Deno.addSignalListener("SIGINT", () => watcher.close());

if (Deno.build.os !== "windows") {
Deno.addSignalListener("SIGINT", () => watcher.close());
}

let timeouter: number | null = null;

Expand Down
2 changes: 1 addition & 1 deletion src/makeAbsolute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @author Adam Josefus
*/

import { join, isAbsolute } from "https://deno.land/std@0.132.0/path/mod.ts";
import { join, isAbsolute } from "https://deno.land/std@0.136.0/path/mod.ts";


export function makeAbsolute(root: string, path: string): string {
Expand Down
2 changes: 1 addition & 1 deletion src/parseConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @author Adam Josefus
*/

import { join } from "https://deno.land/std@0.132.0/path/mod.ts";
import { join } from "https://deno.land/std@0.136.0/path/mod.ts";
import { ValueException } from "https://deno.land/x/allo_arguments@v5.0.2/mod.ts";
import { makeAbsolute } from "./makeAbsolute.ts";
import { currentVersion, lastSupportedVersion, renderVerion } from "./version.ts";
Expand Down
2 changes: 1 addition & 1 deletion src/stylePrint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @author Adam Josefus
*/

import { bold, italic, gray } from 'https://deno.land/std@0.132.0/fmt/colors.ts';
import { bold, italic, gray } from 'https://deno.land/std@0.136.0/fmt/colors.ts';


export function text(template: TemplateStringsArray, ...masks: unknown[]) {
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const currentVersion = "1.0.1";
export const currentVersion = "1.0.2";
export const lastSupportedVersion = "1.0";


Expand Down

0 comments on commit dddef38

Please sign in to comment.