pxt-calliope/cmds/pxtrequire.ts

8 lines
397 B
TypeScript
Raw Normal View History

2017-01-03 04:02:05 +01:00
/// <reference path="../node_modules/pxt-core/typings/globals/node/index.d.ts"/>
2016-12-09 06:11:50 +01:00
/// <reference path="../node_modules/pxt-core/built/pxtlib.d.ts" />
2016-11-10 23:15:55 +01:00
import * as path from "path";
export let pxtCore = require("pxt-core");
// require.resolve() gives path to [pxt dir]/built/pxt.js, so move up twice to get pxt root dir
export let pxtCoreDir = path.resolve(require.resolve("pxt-core"), "..", "..");