From 7c43739e4bb5228f14451010b378c4ff50f12881 Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Thu, 7 Apr 2016 11:30:22 -0700 Subject: [PATCH] Rename references --- .travis.yml | 6 +++--- .vscode/tasks.json | 2 +- cmds/cmds.ts | 6 +++--- package.json | 12 ++++++------ sim/libmbit.ts | 28 ++++++++++++++-------------- sim/public/simulator.html | 2 +- sim/simsvg.ts | 6 +++--- sim/state.ts | 6 +++--- 8 files changed, 34 insertions(+), 34 deletions(-) diff --git a/.travis.yml b/.travis.yml index ba9e934d..b25a9455 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,9 @@ language: node_js node_js: - "5.7.0" script: - - "node node_modules/kindscript/built/kind.js travis" - - "(cd libs/lang-test0; node ../../node_modules/kindscript/built/kind.js run)" - - "node node_modules/kindscript/built/kind.js uploaddoc" + - "node node_modules/pxt-core/built/pxt.js travis" + - "(cd libs/lang-test0; node ../../node_modules/pxt-core/built/pxt.js run)" + - "node node_modules/pxt-core/built/pxt.js uploaddoc" sudo: false notifications: email: diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 0ed9a5be..c3601922 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,7 +1,7 @@ { "version": "0.1.0", // Task runner is jake - "command": "kind", + "command": "pxt", // Need to be executed in shell / cmd "isShellCommand": true, "showOutput": "always", diff --git a/cmds/cmds.ts b/cmds/cmds.ts index 7094ab23..bb6e4b76 100644 --- a/cmds/cmds.ts +++ b/cmds/cmds.ts @@ -1,4 +1,4 @@ -/// +/// import * as fs from 'fs'; import * as path from 'path'; @@ -7,7 +7,7 @@ import * as child_process from 'child_process'; let writeFileAsync: any = Promise.promisify(fs.writeFile) let execAsync: (cmd: string, options?: { cwd?: string }) => Promise = Promise.promisify(child_process.exec) -export function deployCoreAsync(res: ts.ks.CompileResult) { +export function deployCoreAsync(res: ts.pxt.CompileResult) { return getBitDrivesAsync() .then(drives => { if (drives.length == 0) { @@ -40,4 +40,4 @@ function getBitDrivesAsync(): Promise { } else { return Promise.resolve([]) } -} \ No newline at end of file +} diff --git a/package.json b/package.json index ee5ee933..23c6bb50 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "kindscript-microbit", + "name": "pxt-microbit", "version": "0.2.41", - "description": "BBC micro:bit target for KindScript", + "description": "BBC micro:bit target for PXT", "keywords": [ "JavaScript", "education", @@ -9,14 +9,14 @@ ], "repository": { "type": "git", - "url": "git+https://github.com/Microsoft/kindscript-microbit.git" + "url": "git+https://github.com/Microsoft/pxt-microbit.git" }, "author": "", "license": "MIT", - "homepage": "https://github.com/Microsoft/kindscript-microbit#readme", + "homepage": "https://github.com/Microsoft/pxt-microbit#readme", "files": [ "README.md", - "kindtarget.json", + "pxtarget.json", "built/*.js", "built/*.json", "built/*.d.ts", @@ -29,6 +29,6 @@ "typescript": "^1.8.7" }, "dependencies": { - "kindscript": "0.2.42" + "pxt-core": "0.2.42" } } diff --git a/sim/libmbit.ts b/sim/libmbit.ts index bf5bdf88..5bcfe312 100644 --- a/sim/libmbit.ts +++ b/sim/libmbit.ts @@ -1,9 +1,9 @@ -/// -/// +/// +/// /// -namespace ks.rt { - ks.rt.initCurrentRuntime = () => { +namespace pxt.rt { + pxt.rt.initCurrentRuntime = () => { U.assert(!runtime.board) runtime.board = new Board() } @@ -143,7 +143,7 @@ namespace ks.rt { } -namespace ks.rt.basic { +namespace pxt.rt.basic { export var pause = thread.pause; export var forever = thread.forever; @@ -205,7 +205,7 @@ namespace ks.rt.basic { } } -namespace ks.rt.control { +namespace pxt.rt.control { export var inBackground = thread.runInBackground; export function reset() { @@ -222,13 +222,13 @@ namespace ks.rt.control { } } -namespace ks.rt.kindscript { +namespace pxt.rt.kindscript { export function registerWithDal(id: number, evid: number, handler: RefAction) { board().bus.listen(id, evid, handler); } } -namespace ks.rt.input { +namespace pxt.rt.input { export function onButtonPressed(button: number, handler: RefAction): void { let b = board(); if (button == DAL.MICROBIT_ID_BUTTON_AB && !board().usesButtonAB) { @@ -333,7 +333,7 @@ namespace ks.rt.input { } } -namespace ks.rt.led { +namespace pxt.rt.led { export function plot(x: number, y: number) { board().image.set(x, y, 255); runtime.queueDisplayUpdate() @@ -367,7 +367,7 @@ namespace ks.rt.led { } } -namespace ks.rt.serial { +namespace pxt.rt.serial { export function writeString(s: string) { board().writeSerial(s); } @@ -378,7 +378,7 @@ namespace ks.rt.serial { } -namespace ks.rt.radio { +namespace pxt.rt.radio { export function broadcastMessage(msg: number): void { board().radio.broadcast(msg); } @@ -416,7 +416,7 @@ namespace ks.rt.radio { } } -namespace ks.rt.pins { +namespace pxt.rt.pins { export function digitalReadPin(pinId: number): number { let pin = getPin(pinId); if (!pin) return; @@ -504,12 +504,12 @@ namespace ks.rt.pins { } -namespace ks.rt.images { +namespace pxt.rt.images { export function createImage(img: Image) { return img } export function createBigImage(img: Image) { return img } } -namespace ks.rt.ImageMethods { +namespace pxt.rt.ImageMethods { export function showImage(i: Image, offset: number) { // TODO offset? i.copyTo(0, 5, board().image, 0) diff --git a/sim/public/simulator.html b/sim/public/simulator.html index e0518cc9..310efee0 100644 --- a/sim/public/simulator.html +++ b/sim/public/simulator.html @@ -11,7 +11,7 @@ } - + diff --git a/sim/simsvg.ts b/sim/simsvg.ts index 7b308763..9e07e8be 100644 --- a/sim/simsvg.ts +++ b/sim/simsvg.ts @@ -1,5 +1,5 @@ -namespace ks.rt.micro_bit { - const Svg = ks.rt.Svg; +namespace pxt.rt.micro_bit { + const Svg = pxt.rt.Svg; export interface IBoardTheme { accent?: string; @@ -42,7 +42,7 @@ namespace ks.rt.micro_bit { } export interface IBoardProps { - runtime: ks.rt.Runtime; + runtime: pxt.rt.Runtime; theme?: IBoardTheme; disableTilt?:boolean; } diff --git a/sim/state.ts b/sim/state.ts index 00939710..41977876 100644 --- a/sim/state.ts +++ b/sim/state.ts @@ -1,4 +1,4 @@ -namespace ks.rt { +namespace pxt.rt { export interface RuntimeOptions { theme: string; } @@ -555,11 +555,11 @@ namespace ks.rt { case 'yellow': theme = micro_bit.themes[1]; break; case 'green': theme = micro_bit.themes[2]; break; case 'red': theme = micro_bit.themes[3]; break; - default: theme = ks.rt.micro_bit.randomTheme(); + default: theme = pxt.rt.micro_bit.randomTheme(); } console.log('setting up microbit simulator') - let view = new ks.rt.micro_bit.MicrobitBoardSvg({ + let view = new pxt.rt.micro_bit.MicrobitBoardSvg({ theme: theme, runtime: runtime })