Skip to content

Commit

Permalink
Add environment flag to use node map resolving (TypeStrong#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed Apr 13, 2016
1 parent 6c6c73d commit 94f264e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"ntypescript": "^1.201507091536.1",
"proxyquire": "^1.7.2",
"tslint": "^3.2.1",
"typescript": "^1.8.7",
"typescript": "^1.8.10",
"typings": "^0.7.7"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/ts-node.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { join, normalize } from 'path'
import proxyquire = require('proxyquire')
import { register, VERSION } from './ts-node'

const cwd = join(__dirname, '../src')
const cwd = join(__dirname, '../tests')
const EXEC_PATH = join(__dirname, '../dist/bin/ts-node')
const BIN_EXEC = `node ${EXEC_PATH} --project "${cwd}"`

Expand Down
5 changes: 3 additions & 2 deletions src/ts-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,13 @@ export function register (opts?: Options) {

// Install source map support and read from cache.
sourceMapSupport.install({
retrieveFile (fileName) {
environment: 'node',
retrieveFile (fileName: string) {
if (project.files[fileName]) {
return getOutput(fileName)
}
}
})
} as any)

function incrementAndAddFile (fileName: string) {
// Add files to the hash before compilation.
Expand Down

0 comments on commit 94f264e

Please sign in to comment.