pxt-calliope/cmds/pxtrequire.ts
2016-11-10 14:15:55 -08:00

5 lines
247 B
TypeScript

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"), "..", "..");