Rename references

This commit is contained in:
Michal Moskal 2016-04-07 11:30:22 -07:00
parent 92d8adfdbd
commit 7c43739e4b
8 changed files with 34 additions and 34 deletions

View File

@ -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:

2
.vscode/tasks.json vendored
View File

@ -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",

View File

@ -1,4 +1,4 @@
/// <reference path="../node_modules/kindscript/built/kind.d.ts"/>
/// <reference path="../node_modules/pxt-core/built/pxt.d.ts"/>
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<Buffer> = 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<string[]> {
} else {
return Promise.resolve([])
}
}
}

View File

@ -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"
}
}

View File

@ -1,9 +1,9 @@
/// <reference path="../node_modules/kindscript/typings/bluebird/bluebird.d.ts"/>
/// <reference path="../node_modules/kindscript/built/kindsim.d.ts"/>
/// <reference path="../node_modules/pxt-core/typings/bluebird/bluebird.d.ts"/>
/// <reference path="../node_modules/pxt-core/built/pxtsim.d.ts"/>
/// <reference path="../libs/microbit/dal.d.ts"/>
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)

View File

@ -11,7 +11,7 @@
}
</style>
<script src="/cdn/bluebird.min.js"></script>
<script src="/cdn/kindsim.js"></script>
<script src="/cdn/pxtsim.js"></script>
<script src="/sim/sim.js"></script>
</head>

View File

@ -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;
}

View File

@ -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
})