From 362aa677b404408a341dc0ddd2e1801c9d0fc200 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 14 May 2018 17:27:34 -0400 Subject: Support relative import. --- testdata/001_hello.js | 1 + testdata/001_hello.js.out | 1 + testdata/002_hello.ts | 1 + testdata/002_hello.ts.out | 1 + testdata/003_relative_import.ts | 3 +++ testdata/003_relative_import.ts.out | 1 + testdata/hello_world.js | 1 - testdata/hello_world.js.out | 1 - testdata/hello_world.ts | 1 - testdata/hello_world.ts.out | 1 - testdata/subdir/print_hello.ts | 3 +++ 11 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 testdata/001_hello.js create mode 100644 testdata/001_hello.js.out create mode 100644 testdata/002_hello.ts create mode 100644 testdata/002_hello.ts.out create mode 100644 testdata/003_relative_import.ts create mode 100644 testdata/003_relative_import.ts.out delete mode 100644 testdata/hello_world.js delete mode 100644 testdata/hello_world.js.out delete mode 100644 testdata/hello_world.ts delete mode 100644 testdata/hello_world.ts.out create mode 100644 testdata/subdir/print_hello.ts (limited to 'testdata') diff --git a/testdata/001_hello.js b/testdata/001_hello.js new file mode 100644 index 000000000..accefceba --- /dev/null +++ b/testdata/001_hello.js @@ -0,0 +1 @@ +console.log("Hello World"); diff --git a/testdata/001_hello.js.out b/testdata/001_hello.js.out new file mode 100644 index 000000000..557db03de --- /dev/null +++ b/testdata/001_hello.js.out @@ -0,0 +1 @@ +Hello World diff --git a/testdata/002_hello.ts b/testdata/002_hello.ts new file mode 100644 index 000000000..accefceba --- /dev/null +++ b/testdata/002_hello.ts @@ -0,0 +1 @@ +console.log("Hello World"); diff --git a/testdata/002_hello.ts.out b/testdata/002_hello.ts.out new file mode 100644 index 000000000..557db03de --- /dev/null +++ b/testdata/002_hello.ts.out @@ -0,0 +1 @@ +Hello World diff --git a/testdata/003_relative_import.ts b/testdata/003_relative_import.ts new file mode 100644 index 000000000..01d5d7faa --- /dev/null +++ b/testdata/003_relative_import.ts @@ -0,0 +1,3 @@ +import { printHello } from "./subdir/print_hello.ts"; + +printHello(); diff --git a/testdata/003_relative_import.ts.out b/testdata/003_relative_import.ts.out new file mode 100644 index 000000000..e965047ad --- /dev/null +++ b/testdata/003_relative_import.ts.out @@ -0,0 +1 @@ +Hello diff --git a/testdata/hello_world.js b/testdata/hello_world.js deleted file mode 100644 index accefceba..000000000 --- a/testdata/hello_world.js +++ /dev/null @@ -1 +0,0 @@ -console.log("Hello World"); diff --git a/testdata/hello_world.js.out b/testdata/hello_world.js.out deleted file mode 100644 index 557db03de..000000000 --- a/testdata/hello_world.js.out +++ /dev/null @@ -1 +0,0 @@ -Hello World diff --git a/testdata/hello_world.ts b/testdata/hello_world.ts deleted file mode 100644 index accefceba..000000000 --- a/testdata/hello_world.ts +++ /dev/null @@ -1 +0,0 @@ -console.log("Hello World"); diff --git a/testdata/hello_world.ts.out b/testdata/hello_world.ts.out deleted file mode 100644 index 557db03de..000000000 --- a/testdata/hello_world.ts.out +++ /dev/null @@ -1 +0,0 @@ -Hello World diff --git a/testdata/subdir/print_hello.ts b/testdata/subdir/print_hello.ts new file mode 100644 index 000000000..7ecce5040 --- /dev/null +++ b/testdata/subdir/print_hello.ts @@ -0,0 +1,3 @@ +export function printHello(): void { + console.log("Hello"); +} -- cgit v1.2.3