├── .gitignore ├── .npmrc ├── LICENSE ├── README.md ├── README.v2.md ├── package.json ├── pnpm-lock.yaml ├── rr-scripts.ts ├── src ├── load.interfaces.ts ├── main.ts ├── modules │ ├── comment-parser │ │ ├── get-ts-import-comment-config.ts │ │ └── index.ts │ ├── compiler │ │ ├── compile.ts │ │ ├── index.ts │ │ └── transpile.ts │ └── cross-platform │ │ ├── get-js-after-cache-path.ts │ │ └── index.ts ├── providers │ ├── compile │ │ ├── get-cache-dir.ts │ │ ├── get-config.ts │ │ ├── index.ts │ │ └── load.ts │ ├── providers.ts │ └── transpile │ │ ├── get-cache-dir.ts │ │ ├── get-config.ts │ │ ├── index.ts │ │ └── load.ts └── utils │ ├── check-if-file-exists.ts │ ├── index.ts │ └── is-file-newer.ts ├── tests ├── allow-configuration-with-comments.ts ├── assets │ ├── allow-configuration-with-comments │ │ ├── allow-configuration-with-comments-compile.ts │ │ ├── allow-configuration-with-comments-transpile.ts │ │ └── get-other-variable.ts │ ├── import-in-import │ │ └── import-in-import.ts │ ├── library-using │ │ └── library-using.ts │ └── process-cwd-collision │ │ ├── example0.ts │ │ ├── example1.ts │ │ ├── example2.ts │ │ ├── example3.ts │ │ ├── example4.ts │ │ └── example5.ts ├── import-in-import.ts ├── import-without-cache.ts ├── library-using.ts └── nonexistent-typescript-file.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/.gitignore -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | # Settings. 2 | recursive-install=false 3 | 4 | save-prefix= 5 | use-node-version=18.15.0 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/README.md -------------------------------------------------------------------------------- /README.v2.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/README.v2.md -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/package.json -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/pnpm-lock.yaml -------------------------------------------------------------------------------- /rr-scripts.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/rr-scripts.ts -------------------------------------------------------------------------------- /src/load.interfaces.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/load.interfaces.ts -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/main.ts -------------------------------------------------------------------------------- /src/modules/comment-parser/get-ts-import-comment-config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/modules/comment-parser/get-ts-import-comment-config.ts -------------------------------------------------------------------------------- /src/modules/comment-parser/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/modules/comment-parser/index.ts -------------------------------------------------------------------------------- /src/modules/compiler/compile.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/modules/compiler/compile.ts -------------------------------------------------------------------------------- /src/modules/compiler/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/modules/compiler/index.ts -------------------------------------------------------------------------------- /src/modules/compiler/transpile.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/modules/compiler/transpile.ts -------------------------------------------------------------------------------- /src/modules/cross-platform/get-js-after-cache-path.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/modules/cross-platform/get-js-after-cache-path.ts -------------------------------------------------------------------------------- /src/modules/cross-platform/index.ts: -------------------------------------------------------------------------------- 1 | export * from './get-js-after-cache-path.js'; 2 | -------------------------------------------------------------------------------- /src/providers/compile/get-cache-dir.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/providers/compile/get-cache-dir.ts -------------------------------------------------------------------------------- /src/providers/compile/get-config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/providers/compile/get-config.ts -------------------------------------------------------------------------------- /src/providers/compile/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/providers/compile/index.ts -------------------------------------------------------------------------------- /src/providers/compile/load.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/providers/compile/load.ts -------------------------------------------------------------------------------- /src/providers/providers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/providers/providers.ts -------------------------------------------------------------------------------- /src/providers/transpile/get-cache-dir.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/providers/transpile/get-cache-dir.ts -------------------------------------------------------------------------------- /src/providers/transpile/get-config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/providers/transpile/get-config.ts -------------------------------------------------------------------------------- /src/providers/transpile/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/providers/transpile/index.ts -------------------------------------------------------------------------------- /src/providers/transpile/load.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/providers/transpile/load.ts -------------------------------------------------------------------------------- /src/utils/check-if-file-exists.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/utils/check-if-file-exists.ts -------------------------------------------------------------------------------- /src/utils/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/utils/index.ts -------------------------------------------------------------------------------- /src/utils/is-file-newer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/src/utils/is-file-newer.ts -------------------------------------------------------------------------------- /tests/allow-configuration-with-comments.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/tests/allow-configuration-with-comments.ts -------------------------------------------------------------------------------- /tests/assets/allow-configuration-with-comments/allow-configuration-with-comments-compile.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/tests/assets/allow-configuration-with-comments/allow-configuration-with-comments-compile.ts -------------------------------------------------------------------------------- /tests/assets/allow-configuration-with-comments/allow-configuration-with-comments-transpile.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/tests/assets/allow-configuration-with-comments/allow-configuration-with-comments-transpile.ts -------------------------------------------------------------------------------- /tests/assets/allow-configuration-with-comments/get-other-variable.ts: -------------------------------------------------------------------------------- 1 | export const getOtherVariable = () => { 2 | return true; 3 | }; 4 | -------------------------------------------------------------------------------- /tests/assets/import-in-import/import-in-import.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/tests/assets/import-in-import/import-in-import.ts -------------------------------------------------------------------------------- /tests/assets/library-using/library-using.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/tests/assets/library-using/library-using.ts -------------------------------------------------------------------------------- /tests/assets/process-cwd-collision/example0.ts: -------------------------------------------------------------------------------- 1 | console.log(process.cwd()); 2 | 3 | export const example0 = `test0`; 4 | -------------------------------------------------------------------------------- /tests/assets/process-cwd-collision/example1.ts: -------------------------------------------------------------------------------- 1 | console.log(process.cwd()); 2 | 3 | export const example1 = `test1`; 4 | -------------------------------------------------------------------------------- /tests/assets/process-cwd-collision/example2.ts: -------------------------------------------------------------------------------- 1 | console.log(process.cwd()); 2 | 3 | export const example2 = `test2`; 4 | -------------------------------------------------------------------------------- /tests/assets/process-cwd-collision/example3.ts: -------------------------------------------------------------------------------- 1 | console.log(process.cwd()); 2 | 3 | export const example3 = `test3`; 4 | -------------------------------------------------------------------------------- /tests/assets/process-cwd-collision/example4.ts: -------------------------------------------------------------------------------- 1 | console.log(process.cwd()); 2 | 3 | export const example4 = `test4`; 4 | -------------------------------------------------------------------------------- /tests/assets/process-cwd-collision/example5.ts: -------------------------------------------------------------------------------- 1 | console.log(process.cwd()); 2 | 3 | export const example5 = `test5`; 4 | -------------------------------------------------------------------------------- /tests/import-in-import.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/tests/import-in-import.ts -------------------------------------------------------------------------------- /tests/import-without-cache.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/tests/import-without-cache.ts -------------------------------------------------------------------------------- /tests/library-using.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/tests/library-using.ts -------------------------------------------------------------------------------- /tests/nonexistent-typescript-file.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/tests/nonexistent-typescript-file.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radarsu/ts-import/HEAD/tsconfig.json --------------------------------------------------------------------------------