-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
208 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
|
||
import * as coffee from './coffee.js' | ||
import * as ts from 'ts-node/esm' | ||
import * as coffee from "./coffee.js"; | ||
import * as ts from "ts-node/esm"; | ||
|
||
const coffeeRegex = /\.coffee$|\.litcoffee$|\.coffee\.md$/; | ||
const tsRegex = /\.ts$/; | ||
|
||
export function load(url, context, next) { | ||
if (coffeeRegex.test(url)) { | ||
return coffee.load.apply(this, arguments) | ||
return coffee.load.apply(this, arguments); | ||
} | ||
if (tsRegex.test(url)) { | ||
return ts.load.apply(this, arguments) | ||
return ts.load.apply(this, arguments); | ||
} | ||
return next(url, context, next); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,36 @@ | ||
|
||
import * as coffee from './coffee.js' | ||
import * as ts from 'ts-node/esm' | ||
import * as coffee from "./coffee.js"; | ||
import * as ts from "ts-node/esm"; | ||
|
||
const coffeeRegex = /\.coffee$|\.litcoffee$|\.coffee\.md$/; | ||
const tsRegex = /\.ts$/; | ||
|
||
export function resolve(specifier, context, defaultResolve) { | ||
export function resolve(specifier) { | ||
if (coffeeRegex.test(specifier)) { | ||
return coffee.resolve.apply(this, arguments) | ||
return coffee.resolve.apply(this, arguments); | ||
} | ||
if (tsRegex.test(specifier)) { | ||
return ts.resolve.apply(this, arguments) | ||
return ts.resolve.apply(this, arguments); | ||
} | ||
return ts.resolve.apply(this, arguments); | ||
} | ||
|
||
export function getFormat(url, context, defaultGetFormat) { | ||
export function getFormat(url) { | ||
if (coffeeRegex.test(url)) { | ||
return coffee.getFormat.apply(this, arguments) | ||
return coffee.getFormat.apply(this, arguments); | ||
} | ||
if (tsRegex.test(url)) { | ||
return ts.getFormat.apply(this, arguments) | ||
return ts.getFormat.apply(this, arguments); | ||
} | ||
return ts.getFormat.apply(this, arguments); | ||
} | ||
|
||
export function transformSource(source, context, defaultTransformSource) { | ||
export function transformSource(source, context) { | ||
const { url } = context; | ||
if (coffeeRegex.test(url)) { | ||
return coffee.transformSource.apply(this, arguments) | ||
return coffee.transformSource.apply(this, arguments); | ||
} | ||
if (tsRegex.test(url)) { | ||
return ts.transformSource.apply(this, arguments) | ||
return ts.transformSource.apply(this, arguments); | ||
} | ||
return ts.transformSource.apply(this, arguments); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
|
||
import * as coffee from './coffee.js' | ||
import * as ts from 'ts-node/esm' | ||
import * as coffee from "./coffee.js"; | ||
import * as ts from "ts-node/esm"; | ||
|
||
const coffeeRegex = /\.coffee$|\.litcoffee$|\.coffee\.md$/; | ||
const tsRegex = /\.ts$/; | ||
|
||
export function load(url, context, next) { | ||
if (coffeeRegex.test(url)) { | ||
return coffee.load.apply(this, arguments) | ||
return coffee.load.apply(this, arguments); | ||
} | ||
if (tsRegex.test(url)) { | ||
return ts.load.apply(this, arguments) | ||
return ts.load.apply(this, arguments); | ||
} | ||
return next(url, context, next); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,36 @@ | ||
|
||
import * as coffee from './coffee.js' | ||
import * as ts from 'ts-node/esm' | ||
import * as coffee from "./coffee.js"; | ||
import * as ts from "ts-node/esm"; | ||
|
||
const coffeeRegex = /\.coffee$|\.litcoffee$|\.coffee\.md$/; | ||
const tsRegex = /\.ts$/; | ||
|
||
export function resolve(specifier, context, defaultResolve) { | ||
export function resolve(specifier) { | ||
if (coffeeRegex.test(specifier)) { | ||
return coffee.resolve.apply(this, arguments) | ||
return coffee.resolve.apply(this, arguments); | ||
} | ||
if (tsRegex.test(specifier)) { | ||
return ts.resolve.apply(this, arguments) | ||
return ts.resolve.apply(this, arguments); | ||
} | ||
return ts.resolve.apply(this, arguments); | ||
} | ||
|
||
export function getFormat(url, context, defaultGetFormat) { | ||
export function getFormat(url) { | ||
if (coffeeRegex.test(url)) { | ||
return coffee.getFormat.apply(this, arguments) | ||
return coffee.getFormat.apply(this, arguments); | ||
} | ||
if (tsRegex.test(url)) { | ||
return ts.getFormat.apply(this, arguments) | ||
return ts.getFormat.apply(this, arguments); | ||
} | ||
return ts.getFormat.apply(this, arguments); | ||
} | ||
|
||
export function transformSource(source, context, defaultTransformSource) { | ||
export function transformSource(source, context) { | ||
const { url } = context; | ||
if (coffeeRegex.test(url)) { | ||
return coffee.transformSource.apply(this, arguments) | ||
return coffee.transformSource.apply(this, arguments); | ||
} | ||
if (tsRegex.test(url)) { | ||
return ts.transformSource.apply(this, arguments) | ||
return ts.transformSource.apply(this, arguments); | ||
} | ||
return ts.transformSource.apply(this, arguments); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
|
||
import * as coffee from './coffee.js' | ||
import * as ts from 'ts-node/esm' | ||
import * as coffee from "./coffee.js"; | ||
import * as ts from "ts-node/esm"; | ||
|
||
const coffeeRegex = /\.coffee$|\.litcoffee$|\.coffee\.md$/; | ||
const tsRegex = /\.ts$/; | ||
|
||
export function load(url, context, next) { | ||
if (coffeeRegex.test(url)) { | ||
return coffee.load.apply(this, arguments) | ||
return coffee.load.apply(this, arguments); | ||
} | ||
if (tsRegex.test(url)) { | ||
return ts.load.apply(this, arguments) | ||
return ts.load.apply(this, arguments); | ||
} | ||
return next(url, context, next); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,36 @@ | ||
|
||
import * as coffee from './coffee.js' | ||
import * as ts from 'ts-node/esm' | ||
import * as coffee from "./coffee.js"; | ||
import * as ts from "ts-node/esm"; | ||
|
||
const coffeeRegex = /\.coffee$|\.litcoffee$|\.coffee\.md$/; | ||
const tsRegex = /\.ts$/; | ||
|
||
export function resolve(specifier, context, defaultResolve) { | ||
export function resolve(specifier) { | ||
if (coffeeRegex.test(specifier)) { | ||
return coffee.resolve.apply(this, arguments) | ||
return coffee.resolve.apply(this, arguments); | ||
} | ||
if (tsRegex.test(specifier)) { | ||
return ts.resolve.apply(this, arguments) | ||
return ts.resolve.apply(this, arguments); | ||
} | ||
return ts.resolve.apply(this, arguments); | ||
} | ||
|
||
export function getFormat(url, context, defaultGetFormat) { | ||
export function getFormat(url) { | ||
if (coffeeRegex.test(url)) { | ||
return coffee.getFormat.apply(this, arguments) | ||
return coffee.getFormat.apply(this, arguments); | ||
} | ||
if (tsRegex.test(url)) { | ||
return ts.getFormat.apply(this, arguments) | ||
return ts.getFormat.apply(this, arguments); | ||
} | ||
return ts.getFormat.apply(this, arguments); | ||
} | ||
|
||
export function transformSource(source, context, defaultTransformSource) { | ||
export function transformSource(source, context) { | ||
const { url } = context; | ||
if (coffeeRegex.test(url)) { | ||
return coffee.transformSource.apply(this, arguments) | ||
return coffee.transformSource.apply(this, arguments); | ||
} | ||
if (tsRegex.test(url)) { | ||
return ts.transformSource.apply(this, arguments) | ||
return ts.transformSource.apply(this, arguments); | ||
} | ||
return ts.transformSource.apply(this, arguments); | ||
} |
Oops, something went wrong.