Skip to content

Commit e4b9322

Browse files
authored
Merge pull request #4187 from BuckleScript/fix_4185
fix #4185
2 parents 75d19e6 + 9186e03 commit e4b9322

File tree

17 files changed

+25
-392
lines changed

17 files changed

+25
-392
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ vendor/cppo
3232
vendor/rollup.js
3333
package/
3434
*.tgz
35+
darwin/bsc

jscomp/artifacts.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
".gitmodules",
55
"bsb",
66
"bsc",
7+
"bsrefmt",
78
"COPYING",
89
"LICENSE",
910
"4061.json",
@@ -45,7 +46,6 @@
4546
],
4647
"lib": [
4748
"bscc",
48-
"bsrefmt",
4949
"bstracing",
5050
"minisocket.js",
5151
"jsconfig.json",
@@ -1126,7 +1126,7 @@
11261126
"ninja.COPYING",
11271127
"bsb_helper.exe",
11281128
"bsb.exe",
1129-
"bsc.exe",
1129+
"bsc.exe",
11301130
"ninja.exe",
11311131
"refmt.exe"
11321132
]

jscomp/bsb/bsb_templates.ml

Lines changed: 4 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,6 @@ let root = OCamlRes.Res.([
66
"\n\
77
\n\
88
let () = Js.log \"Hello, BuckleScript\"")]) ;
9-
Dir (".vscode", [
10-
File ("tasks.json",
11-
"{\n\
12-
\ \"version\": \"${bsb:proj-version}\",\n\
13-
\ \"command\": \"npm\",\n\
14-
\ \"options\": {\n\
15-
\ \"cwd\": \"${workspaceRoot}\"\n\
16-
\ },\n\
17-
\ \"isShellCommand\": true,\n\
18-
\ \"args\": [\n\
19-
\ \"run\",\n\
20-
\ \"watch\"\n\
21-
\ ],\n\
22-
\ \"showOutput\": \"always\",\n\
23-
\ \"isBackground\": true,\n\
24-
\ \"problemMatcher\": {\n\
25-
\ \"fileLocation\": \"absolute\",\n\
26-
\ \"owner\": \"ocaml\",\n\
27-
\ \"watching\": {\n\
28-
\ \"activeOnStart\": false,\n\
29-
\ \"beginsPattern\": \">>>> Start compiling\",\n\
30-
\ \"endsPattern\": \">>>> Finish compiling\"\n\
31-
\ },\n\
32-
\ \"pattern\": [\n\
33-
\ {\n\
34-
\ \"regexp\": \"^File \\\"(.*)\\\", line (\\\\d+)(?:, characters (\\\\d+)-(\\\\d+))?:$\",\n\
35-
\ \"file\": 1,\n\
36-
\ \"line\": 2,\n\
37-
\ \"column\": 3,\n\
38-
\ \"endColumn\": 4\n\
39-
\ },\n\
40-
\ {\n\
41-
\ \"regexp\": \"^(?:(?:Parse\\\\s+)?(Warning|[Ee]rror)(?:\\\\s+\\\\d+)?:)?\\\\s+(.*)$\",\n\
42-
\ \"severity\": 1,\n\
43-
\ \"message\": 2,\n\
44-
\ \"loop\": true\n\
45-
\ }\n\
46-
\ ]\n\
47-
\ }\n\
48-
}")]) ;
499
File ("bsconfig.json",
5010
"{\n\
5111
\ \"name\": \"${bsb:name}\",\n\
@@ -126,62 +86,12 @@ let root = OCamlRes.Res.([
12686
npm run watch\n\
12787
```\n\
12888
\n\
129-
\n\
130-
# Editor\n\
131-
If you use `vscode`, Press `Windows + Shift + B` it will build automatically")]) ;
89+
")]) ;
13290
Dir ("basic-reason", [
13391
Dir ("src", [
13492
File ("Demo.re",
13593
"Js.log(\"Hello, BuckleScript and Reason!\");\n\
13694
")]) ;
137-
Dir (".vscode", [
138-
File ("tasks.json",
139-
"{\n\
140-
\ \"version\": \"${bsb:proj-version}\",\n\
141-
\ \"command\": \"npm\",\n\
142-
\ \"options\": {\n\
143-
\ \"cwd\": \"${workspaceRoot}\",\n\
144-
\ \"env\": {\n\
145-
\ \"BS_VSCODE\" : \"true\"\n\
146-
\ }\n\
147-
\ },\n\
148-
\ \"type\": \"shell\",\n\
149-
\ \"args\": [\"run\", \"start\"],\n\
150-
\ \"presentation\": {\n\
151-
\ \"echo\": true,\n\
152-
\ \"reveal\": \"always\",\n\
153-
\ \"focus\": false,\n\
154-
\ \"panel\": \"shared\"\n\
155-
\ },\n\
156-
\ \"isBackground\": true,\n\
157-
\ \"problemMatcher\": {\n\
158-
\ \"fileLocation\": \"absolute\",\n\
159-
\ \"owner\": \"ocaml\",\n\
160-
\ \"background\": {\n\
161-
\ \"activeOnStart\": false,\n\
162-
\ \"beginsPattern\": \">>>> Start compiling\",\n\
163-
\ \"endsPattern\": \">>>> Finish compiling\"\n\
164-
\ },\n\
165-
\ \"pattern\": [\n\
166-
\ {\n\
167-
\ \"regexp\":\n\
168-
\ \"^File \\\"(.*)\\\", line (\\\\d+)(?:, characters (\\\\d+)-(\\\\d+))?:$\",\n\
169-
\ \"file\": 1,\n\
170-
\ \"line\": 2,\n\
171-
\ \"column\": 3,\n\
172-
\ \"endColumn\": 4\n\
173-
\ },\n\
174-
\ {\n\
175-
\ \"regexp\":\n\
176-
\ \"^(?:(?:Parse\\\\s+)?(Warning|[Ee]rror)(?:\\\\s+\\\\d+)?:)?\\\\s+(.*)$\",\n\
177-
\ \"severity\": 1,\n\
178-
\ \"message\": 2,\n\
179-
\ \"loop\": true\n\
180-
\ }\n\
181-
\ ]\n\
182-
\ }\n\
183-
\ }\n\
184-
")]) ;
18595
File ("bsconfig.json",
18696
"{\n\
18797
\ \"name\": \"${bsb:name}\",\n\
@@ -251,15 +161,12 @@ let root = OCamlRes.Res.([
251161
\n\
252162
```bash\n\
253163
# for yarn\n\
254-
yarn\n\
164+
yarn start\n\
255165
\n\
256166
# for npm\n\
257167
npm run start\n\
258168
```\n\
259169
\n\
260-
# Editor\n\
261-
\n\
262-
If you're using VS Code, press <kbd>cmd</kbd> + <kbd>shift</kbd> + <kbd>B</kbd> or <kbd>Windows</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd> to build the project automatically.\n\
263170
")]) ;
264171
Dir ("generator", [
265172
Dir ("src", [
@@ -845,7 +752,7 @@ let root = OCamlRes.Res.([
845752
function setUpWebSocket() {\n\
846753
\ if (websocketReloader == null || websocketReloader.readyState !== 1) {\n\
847754
\ try {\n\
848-
\ websocketReloader = new WebSocket(`ws://localhost:${webSocketPort}`);\n\
755+
\ websocketReloader = new WebSocket(`ws://${window.location.hostname}:${webSocketPort}`);\n\
849756
\ websocketReloader.onmessage = (message) => {\n\
850757
\ var newData = JSON.parse(message.data).LAST_SUCCESS_BUILD_STAMP;\n\
851758
\ if (newData > LAST_SUCCESS_BUILD_STAMP) {\n\
@@ -1813,7 +1720,7 @@ let root = OCamlRes.Res.([
18131720
function setUpWebScoket() {\n\
18141721
\ if (wsReloader == null || wsReloader.readyState !== 1) {\n\
18151722
\ try {\n\
1816-
\ wsReloader = new WebSocket(`ws://localhost:${WS_PORT}`)\n\
1723+
\ wsReloader = new WebSocket(`ws://${window.location.hostname}:${WS_PORT}`)\n\
18171724
\ wsReloader.onmessage = (msg) => {\n\
18181725
\ var newData = JSON.parse(msg.data).LAST_SUCCESS_BUILD_STAMP\n\
18191726
\ if (newData > LAST_SUCCESS_BUILD_STAMP) {\n\

jscomp/bsb/templates/basic-reason/.vscode/tasks.json

Lines changed: 0 additions & 45 deletions
This file was deleted.

jscomp/bsb/templates/basic-reason/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,3 @@ yarn start
2222
npm run start
2323
```
2424

25-
# Editor
26-
27-
If you're using VS Code, press <kbd>cmd</kbd> + <kbd>shift</kbd> + <kbd>B</kbd> or <kbd>Windows</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd> to build the project automatically.

jscomp/bsb/templates/basic/.vscode/tasks.json

Lines changed: 0 additions & 38 deletions
This file was deleted.

jscomp/bsb/templates/basic/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,3 @@ npm run build
1111
npm run watch
1212
```
1313

14-
15-
# Editor
16-
If you use `vscode`, Press `Windows + Shift + B` it will build automatically

jscomp/common/bs_version.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* You should have received a copy of the GNU Lesser General Public License
2323
* along with this program; if not, write to the Free Software
2424
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
25-
let version = "7.2.0-dev.1"
25+
let version = "7.2.0-dev.4"
2626
let header =
2727
"// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE"
2828
let package_name = "bs-platform"

0 commit comments

Comments
 (0)