Skip to content

Commit 9f5d201

Browse files
Update command: spago bundle to spago bundle-app
1 parent 0f67cd8 commit 9f5d201

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

02-Build-Tools/05-Spago--Project-Workflow.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,18 @@ spago build --watch
6565
spago build
6666

6767
# Build a developer-level executable file
68-
spago bundle --main Module.Path.To.Main --to dist/index.js
68+
spago bundle-app --main Module.Path.To.Main --to dist/index.js
6969
node dist/index.js
7070

7171
# Build a production-level Node-backend file via Parcel
72-
spago bundle --main Module.Path.To.Main --to dist/bundle-output.js
72+
spago bundle-app --main Module.Path.To.Main --to dist/bundle-output.js
7373
parcel build dist/bundle-output.js --target "node" -o app.js
7474
```
7575

7676
To build a production-level browser-backend file...
7777
```bash
7878
# Build a production-level browser-backend file
79-
spago bundle --main Module.Path.To.Main --to dist/app.js
79+
spago bundle-app --main Module.Path.To.Main --to dist/app.js
8080
```
8181
Create an HTML file (dist/example.html) that references the 'app.js' file
8282
```html

21-Hello-World/03-Hello-World-and-Effects/Readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Second, one can compile the examples and view their resulting Javascript files.
2424

2525
| | Single Module | Entire Program |
2626
| - | - | - |
27-
| Command | `spago make-module --main [moduleName] --to dist/module.js` | `spago bundle --main [moduleName] --to dist/app.js`
27+
| Command | `spago make-module --main [moduleName] --to dist/module.js` | `spago bundle-app --main [moduleName] --to dist/app.js`
2828
| Javascript files' location | `dist/module.js` | `dist/app.js` |
2929

3030
To run each program in this directory, use these commands:

21-Hello-World/03-Hello-World-and-Effects/src/01-Native-Side-Effects-via-Effect.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ The whole idea of `Effect` is to use `unsafePerformEffect` as little as possible
6262
The entry point into each program written in Purescript is the `main` function. It's type signature must be: `main :: Effect Unit`.
6363

6464
The following explanation is not what happens in practice, but understanding it this way will help one understand the concepts it represents:
65-
> When one executes the command `spago bundle`, one could say that, conceptually, spago will compile `unsafePerformEffect main` into Javascript and the resulting Javascript is what gets run by the RunTime System (RTS) when the program is executed.
65+
> When one executes the command `spago bundle-app`, one could say that, conceptually, spago will compile `unsafePerformEffect main` into Javascript and the resulting Javascript is what gets run by the RunTime System (RTS) when the program is executed.
6666
6767
In other words, spago "creates" a function called `runProgram` and tells the RunTime System (RTS) to execute it
6868
```purescript

22-Projects/benchmark/ReadMe.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ Since we'll be benchmarking our projects here, I should also note that Nate has
1818
Commands to Run a Benchmark:
1919
```bash
2020
# Random Number Game
21-
spago bundle -p "benchmark/**/*.purs" -m Performance.RandomNumber.Benchmark -t dist/benchmarks/random-number.js
21+
spago bundle-app -p "benchmark/**/*.purs" -m Performance.RandomNumber.Benchmark -t dist/benchmarks/random-number.js
2222
node dist/benchmarks/random-number.js
2323
```

22-Projects/src/01-Libraries/Node-FS/ReadMe.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ spago run -m Learn.NodeFS.Syntax
1010

1111
spago run -m Learn.NodeFS.PrintAllFiles
1212
# To run the above with your own argument, use this instead:
13-
spago bundle -m Learn.NodeFS.PrintAllFiles -t dist/libraries/node-fs/printAllFiles.js
13+
spago bundle-app -m Learn.NodeFS.PrintAllFiles -t dist/libraries/node-fs/printAllFiles.js
1414
node dist/libraries/node-fs/printAllFiles.js --rootDir <your relative/absolute directory path argument here>
1515
```

22-Projects/src/01-Libraries/OptParser/ReadMe.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This file overviews the syntax and API of `purescript-optparse`.
77
To run the examples, use
88
```bash
99
# Build the Syntax file
10-
spago bundle -m Learn.OptParse -t dist/libraries/optparse/learnOptParse.js
10+
spago bundle-app -m Learn.OptParse -t dist/libraries/optparse/learnOptParse.js
1111

1212
# Run the program without required arguments to see the help text
1313
node dist/libraries/optparse/learnOptParse.js
@@ -18,15 +18,15 @@ node dist/libraries/optparse/learnOptParse.js --long-name3 example --switch
1818

1919

2020
# Build the 'GetRootDirViaAbsolutePath' file
21-
spago bundle -m Learn.OptParse.GetRootDirViaAbsolutePath -t dist/libraries/optparse/getRootViaAbsPath.js
21+
spago bundle-app -m Learn.OptParse.GetRootDirViaAbsolutePath -t dist/libraries/optparse/getRootViaAbsPath.js
2222

2323
# Run the program
2424
node dist/libraries/optparse/getRootViaAbsPath.js --rootDir <your absolute root dir argument here>
2525

2626

2727

2828
# Build the 'GetRootDirViaEitherPath' file
29-
spago bundle -m Learn.OptParse.GetRootDirViaEitherPath -t dist/libraries/optparse/getRootViaEitherPath.js
29+
spago bundle-app -m Learn.OptParse.GetRootDirViaEitherPath -t dist/libraries/optparse/getRootViaEitherPath.js
3030

3131
# Run the program using an absolute path
3232
node dist/libraries/optparse/getRootViaEitherPath.js --rootDir <your absolute dir argument here>

22-Projects/src/11-Random-Number/ReadMe.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ spago run -m RandomNumber.Free.Standard.Main.Console
4747
spago run -m RandomNumber.Run.Standard.Main.Console
4848

4949
# == Browser-based implementation ==
50-
spago bundle --main RandomNumber.ReaderT.Standard.Main.Halogen --to dist/random-number/readerT--standard/app.js
50+
spago bundle-app --main RandomNumber.ReaderT.Standard.Main.Halogen --to dist/random-number/readerT--standard/app.js
5151
# Read the below as:
5252
# "Use 'example.html' to figure out the dependency tree, which will pick up
5353
# our 'app.js' bundle from Spago. Parcel will output a minified version
@@ -64,10 +64,10 @@ spago bundle --main RandomNumber.ReaderT.Standard.Main.Halogen --to dist/random-
6464
# will hotload the changes."
6565
parcel dist/random-number/readerT--standard/example.html --open -p 1111 -d dist/random-number/readerT--standard/ -o index.html
6666

67-
spago bundle --main RandomNumber.Free.Standard.Main.Halogen --to dist/random-number/free--standard/app.js
67+
spago bundle-app --main RandomNumber.Free.Standard.Main.Halogen --to dist/random-number/free--standard/app.js
6868
parcel build dist/random-number/free--standard/example.html --open -p 1112 -d dist/random-number/free--standard/ -o index.html
6969

70-
spago bundle --main RandomNumber.Run.Standard.Main.Halogen --to dist/random-number/run--standard/app.js
70+
spago bundle-app --main RandomNumber.Run.Standard.Main.Halogen --to dist/random-number/run--standard/app.js
7171
parcel build dist/random-number/run--standard/example.html --open -p 1113 -d dist/random-number/run--standard/ -o index.html
7272

7373
# == Test ==

22-Projects/src/12-Table-of-Contents/ReadMe.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ Currently, there are no benchmarks. Tests are a WIP.
2121

2222
```bash
2323
# Build the program using either the ReaderT or Run implementation
24-
spago bundle --main ToC.ReaderT.Main --to dist/table-of-contents/readert-ghtoc.js
24+
spago bundle-app --main ToC.ReaderT.Main --to dist/table-of-contents/readert-ghtoc.js
2525

26-
spago bundle --main ToC.Run.Main --to dist/table-of-contents/run-ghtoc.js
26+
spago bundle-app --main ToC.Run.Main --to dist/table-of-contents/run-ghtoc.js
2727

2828
# Change directory to be at the root directory
2929
cd ../

0 commit comments

Comments
 (0)