File tree Expand file tree Collapse file tree 3 files changed +18
-24
lines changed Expand file tree Collapse file tree 3 files changed +18
-24
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ deno install --allow-net --allow-read --allow-write --allow-env https://deno.lan
61
61
Run:
62
62
63
63
``` sh
64
- buckets < entry_path> > my-bundle.js
64
+ buckets < entry_path> [out_file]
65
65
```
66
66
67
67
### API
Original file line number Diff line number Diff line change
1
+ import { bundle } from "./mod.ts" ;
2
+
3
+ const helpText = `USAGE:
4
+ buckets <source_file> [out_file]` ;
5
+
6
+ const [ target , destination ] = Deno . args ;
7
+
8
+ if ( ! target ) {
9
+ console . log ( "Error: missing <source_file> param\n\n" ) ;
10
+ console . log ( helpText ) ;
11
+ Deno . exit ( 1 ) ;
12
+ }
13
+
14
+ const content = await bundle ( target ) ;
15
+
16
+ if ( destination ) Deno . writeTextFileSync ( destination , content ) ;
17
+ else await Deno . stdout . write ( new TextEncoder ( ) . encode ( content ) ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments