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: node_js:
- "5.7.0" - "5.7.0"
script: script:
- "node node_modules/kindscript/built/kind.js travis" - "node node_modules/pxt-core/built/pxt.js travis"
- "(cd libs/lang-test0; node ../../node_modules/kindscript/built/kind.js run)" - "(cd libs/lang-test0; node ../../node_modules/pxt-core/built/pxt.js run)"
- "node node_modules/kindscript/built/kind.js uploaddoc" - "node node_modules/pxt-core/built/pxt.js uploaddoc"
sudo: false sudo: false
notifications: notifications:
email: email:

2
.vscode/tasks.json vendored
View File

@ -1,7 +1,7 @@
{ {
"version": "0.1.0", "version": "0.1.0",
// Task runner is jake // Task runner is jake
"command": "kind", "command": "pxt",
// Need to be executed in shell / cmd // Need to be executed in shell / cmd
"isShellCommand": true, "isShellCommand": true,
"showOutput": "always", "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 fs from 'fs';
import * as path from 'path'; import * as path from 'path';
@ -7,7 +7,7 @@ import * as child_process from 'child_process';
let writeFileAsync: any = Promise.promisify(fs.writeFile) let writeFileAsync: any = Promise.promisify(fs.writeFile)
let execAsync: (cmd: string, options?: { cwd?: string }) => Promise<Buffer> = Promise.promisify(child_process.exec) 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() return getBitDrivesAsync()
.then(drives => { .then(drives => {
if (drives.length == 0) { if (drives.length == 0) {

View File

@ -1,7 +1,7 @@
{ {
"name": "kindscript-microbit", "name": "pxt-microbit",
"version": "0.2.41", "version": "0.2.41",
"description": "BBC micro:bit target for KindScript", "description": "BBC micro:bit target for PXT",
"keywords": [ "keywords": [
"JavaScript", "JavaScript",
"education", "education",
@ -9,14 +9,14 @@
], ],
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/Microsoft/kindscript-microbit.git" "url": "git+https://github.com/Microsoft/pxt-microbit.git"
}, },
"author": "", "author": "",
"license": "MIT", "license": "MIT",
"homepage": "https://github.com/Microsoft/kindscript-microbit#readme", "homepage": "https://github.com/Microsoft/pxt-microbit#readme",
"files": [ "files": [
"README.md", "README.md",
"kindtarget.json", "pxtarget.json",
"built/*.js", "built/*.js",
"built/*.json", "built/*.json",
"built/*.d.ts", "built/*.d.ts",
@ -29,6 +29,6 @@
"typescript": "^1.8.7" "typescript": "^1.8.7"
}, },
"dependencies": { "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/pxt-core/typings/bluebird/bluebird.d.ts"/>
/// <reference path="../node_modules/kindscript/built/kindsim.d.ts"/> /// <reference path="../node_modules/pxt-core/built/pxtsim.d.ts"/>
/// <reference path="../libs/microbit/dal.d.ts"/> /// <reference path="../libs/microbit/dal.d.ts"/>
namespace ks.rt { namespace pxt.rt {
ks.rt.initCurrentRuntime = () => { pxt.rt.initCurrentRuntime = () => {
U.assert(!runtime.board) U.assert(!runtime.board)
runtime.board = new 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 pause = thread.pause;
export var forever = thread.forever; 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 var inBackground = thread.runInBackground;
export function reset() { 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) { export function registerWithDal(id: number, evid: number, handler: RefAction) {
board().bus.listen(id, evid, handler); board().bus.listen(id, evid, handler);
} }
} }
namespace ks.rt.input { namespace pxt.rt.input {
export function onButtonPressed(button: number, handler: RefAction): void { export function onButtonPressed(button: number, handler: RefAction): void {
let b = board(); let b = board();
if (button == DAL.MICROBIT_ID_BUTTON_AB && !board().usesButtonAB) { 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) { export function plot(x: number, y: number) {
board().image.set(x, y, 255); board().image.set(x, y, 255);
runtime.queueDisplayUpdate() runtime.queueDisplayUpdate()
@ -367,7 +367,7 @@ namespace ks.rt.led {
} }
} }
namespace ks.rt.serial { namespace pxt.rt.serial {
export function writeString(s: string) { export function writeString(s: string) {
board().writeSerial(s); 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 { export function broadcastMessage(msg: number): void {
board().radio.broadcast(msg); 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 { export function digitalReadPin(pinId: number): number {
let pin = getPin(pinId); let pin = getPin(pinId);
if (!pin) return; 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 createImage(img: Image) { return img }
export function createBigImage(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) { export function showImage(i: Image, offset: number) {
// TODO offset? // TODO offset?
i.copyTo(0, 5, board().image, 0) i.copyTo(0, 5, board().image, 0)

View File

@ -11,7 +11,7 @@
} }
</style> </style>
<script src="/cdn/bluebird.min.js"></script> <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> <script src="/sim/sim.js"></script>
</head> </head>

View File

@ -1,5 +1,5 @@
namespace ks.rt.micro_bit { namespace pxt.rt.micro_bit {
const Svg = ks.rt.Svg; const Svg = pxt.rt.Svg;
export interface IBoardTheme { export interface IBoardTheme {
accent?: string; accent?: string;
@ -42,7 +42,7 @@ namespace ks.rt.micro_bit {
} }
export interface IBoardProps { export interface IBoardProps {
runtime: ks.rt.Runtime; runtime: pxt.rt.Runtime;
theme?: IBoardTheme; theme?: IBoardTheme;
disableTilt?:boolean; disableTilt?:boolean;
} }

View File

@ -1,4 +1,4 @@
namespace ks.rt { namespace pxt.rt {
export interface RuntimeOptions { export interface RuntimeOptions {
theme: string; theme: string;
} }
@ -555,11 +555,11 @@ namespace ks.rt {
case 'yellow': theme = micro_bit.themes[1]; break; case 'yellow': theme = micro_bit.themes[1]; break;
case 'green': theme = micro_bit.themes[2]; break; case 'green': theme = micro_bit.themes[2]; break;
case 'red': theme = micro_bit.themes[3]; 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') console.log('setting up microbit simulator')
let view = new ks.rt.micro_bit.MicrobitBoardSvg({ let view = new pxt.rt.micro_bit.MicrobitBoardSvg({
theme: theme, theme: theme,
runtime: runtime runtime: runtime
}) })