forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create default native init package (rescript-lang#24)
* replace the basic theme Reason project with the bsb-native example * note behavior to create a new project * add back bs-dependencies to basic template bsconfig; code review nits * add back code review nit; rebase off master
- Loading branch information
Showing
7 changed files
with
55 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,10 @@ | |
*.annot | ||
*.cmj | ||
*.bak | ||
lib/bs | ||
*.mlast | ||
*.mliast | ||
.vscode | ||
.merlin | ||
.merlin | ||
|
||
lib/bs | ||
node_modules |
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,16 +1,18 @@ | ||
bsb-native-example | ||
--- | ||
|
||
This is a quick demo project to showcase [bsb-native](https://github.com/bsansouci/bsb-native). | ||
|
||
# Build | ||
``` | ||
npm run build | ||
``` | ||
For publishing on opam see [opam_of_packagejson](https://github.com/bsansouci/opam_of_packagejson/) as a helper. | ||
|
||
# Watch | ||
|
||
``` | ||
npm run watch | ||
``` | ||
## Install | ||
`npm i` | ||
|
||
## Build bytecode | ||
`npm run build` | ||
|
||
# Editor | ||
If you use `vscode`, Press `Windows + Shift + B` it will build automatically | ||
To build other targets (like native or js) you can call bsb directly (or add a npm script) with the `-backend` flag, like `./node_nodules/.bin/bsb -backend native` or `./node_nodules/.bin/bsb -backend js`. | ||
|
||
## Run | ||
`./lib/bs/bytecode/index.byte` |
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,19 +1,16 @@ | ||
{ | ||
"name": "${bsb:name}", | ||
"version": "${bsb:proj-version}", | ||
"sources": { | ||
"dir" : "src", | ||
"subdirs" : true | ||
}, | ||
"package-specs": { | ||
"module": "commonjs", | ||
"in-source": true | ||
}, | ||
"suffix": ".bs.js", | ||
"sources": "src", | ||
"entries": [{ | ||
"backend": "bytecode", | ||
"main-module": "Index" | ||
},{ | ||
"backend": "native", | ||
"main-module": "Index" | ||
}], | ||
"bs-dependencies": [ | ||
// add your bs-dependencies here | ||
// add your bs-dependencies here | ||
], | ||
"warnings": { | ||
"error" : "+101" | ||
} | ||
} | ||
"refmt": 3 | ||
} |
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 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 @@ | ||
print_endline("Hello world"); |