Comparing version 0.34.4 to 0.34.5
@@ -123,5 +123,6 @@ "use strict"; | ||
const url = `http://127.0.0.1:${port}`; | ||
const forceLocal = !!opts.forceLocal; | ||
msg(`simulator at ${url}`); | ||
msg(`Jacdac+simulator at https://microsoft.github.io/jacdac-docs/clients/javascript/devtools#${url}`); | ||
(0, simserver_1.startSimServer)(prj.editor, port); | ||
(0, simserver_1.startSimServer)(prj.editor, port, forceLocal); | ||
}); | ||
@@ -767,2 +768,3 @@ } | ||
.option("-c, --config-path <file>", 'set configuration file path (default: "mkc.json")') | ||
.option("--force-local", "force using all local files") | ||
.action(serveCommand); | ||
@@ -769,0 +771,0 @@ createCommand("download") |
import mkc = require("./mkc"); | ||
export declare function startSimServer(ed: mkc.DownloadedEditor, port?: number): void; | ||
export declare function startSimServer(ed: mkc.DownloadedEditor, port?: number, forceLocal?: boolean): void; |
@@ -21,3 +21,3 @@ "use strict"; | ||
}; | ||
function startSimServer(ed, port = 7001) { | ||
function startSimServer(ed, port = 7001, forceLocal = false) { | ||
http.createServer((request, response) => __awaiter(this, void 0, void 0, function* () { | ||
@@ -37,3 +37,3 @@ let path = request.url; | ||
else if (simloaderfiles_1.simloaderFiles.hasOwnProperty(path)) { | ||
if (path != 'loader.js') | ||
if (forceLocal || path != "loader.js") | ||
try { | ||
@@ -40,0 +40,0 @@ buf = fs.readFileSync("assets/" + path); |
{ | ||
"name": "makecode", | ||
"version": "0.34.4", | ||
"version": "0.34.5", | ||
"description": "MakeCode (PXT) - web-cached build tool", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -13,11 +13,13 @@ # MKC - command line tool for MakeCode editors | ||
To install mkc globally, run | ||
To install `mkc` globally, run | ||
``` | ||
```bash | ||
npm install -g makecode | ||
``` | ||
**Do not install the npm `mkc` package, it is another package.** | ||
To update mkc, | ||
``` | ||
```bash | ||
npm install -u -g makecode | ||
@@ -34,3 +36,3 @@ ``` | ||
``` | ||
```bash | ||
mkc init microbit | ||
@@ -43,3 +45,3 @@ ``` | ||
``` | ||
```bash | ||
mkc init microbit jacdac jacdac-button jacdac-led | ||
@@ -55,3 +57,3 @@ ``` | ||
``` | ||
```bash | ||
mkc install | ||
@@ -64,3 +66,3 @@ ``` | ||
``` | ||
```bash | ||
mkc build | ||
@@ -71,3 +73,3 @@ ``` | ||
``` | ||
```bash | ||
mkc | ||
@@ -81,3 +83,3 @@ ``` | ||
``` | ||
```bash | ||
mkc -d | ||
@@ -89,3 +91,3 @@ ``` | ||
``` | ||
```bash | ||
mkc --update | ||
@@ -98,3 +100,3 @@ ``` | ||
``` | ||
```bash | ||
mkc -w | ||
@@ -107,3 +109,3 @@ ``` | ||
``` | ||
```bash | ||
mkc -f size # generate .csv file with function sizes | ||
@@ -132,6 +134,18 @@ mkc -f asmdebug # generate more comments in assembly listing | ||
``` | ||
```bash | ||
mkc serve | ||
``` | ||
You can change the port using `port`. | ||
```bash | ||
mkc serve --port 7002 | ||
``` | ||
By default, the simulator ignores `loader.js`. If you have modifications in that file, use ``--force-local`` to use your `loader.js`. | ||
```bash | ||
mkc serve --force-local | ||
``` | ||
### mkc clean | ||
@@ -141,3 +155,3 @@ | ||
``` | ||
```bash | ||
mkc clean | ||
@@ -150,3 +164,3 @@ ``` | ||
``` | ||
```bash | ||
mkc search jacdac | ||
@@ -161,3 +175,3 @@ ``` | ||
``` | ||
```bash | ||
mkc add https://github.com/microsoft/pxt-jacdac/button | ||
@@ -168,3 +182,3 @@ ``` | ||
``` | ||
```bash | ||
mkc add jacdac-button | ||
@@ -178,3 +192,3 @@ ``` | ||
``` | ||
```bash | ||
mkc bump | ||
@@ -185,3 +199,3 @@ ``` | ||
``` | ||
```bash | ||
mkc bump --patch | ||
@@ -192,3 +206,3 @@ ``` | ||
``` | ||
```bash | ||
mkc bump --version-file version.ts | ||
@@ -199,3 +213,3 @@ ``` | ||
``` | ||
```bash | ||
mkc bump --stage | ||
@@ -208,3 +222,3 @@ ``` | ||
``` | ||
```bash | ||
mkc download https://..... | ||
@@ -244,3 +258,3 @@ ``` | ||
``` | ||
```bash | ||
mkc -c mkc-arcade.json | ||
@@ -247,0 +261,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
215480
3263
283