pxt-calliope/cmds/pxtrequire.ts
2018-04-21 10:25:43 -07:00

7 lines
316 B
TypeScript

/// <reference path="../node_modules/pxt-core/built/pxtlib.d.ts" />
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"), "..", "..");