diff --git a/exorcist/exorcist-tests.ts b/exorcist/exorcist-tests.ts new file mode 100644 index 0000000000..26a1be0e07 --- /dev/null +++ b/exorcist/exorcist-tests.ts @@ -0,0 +1,15 @@ +/// + +import exorcist = require("exorcist"); + +module ExorcistTest { + + function pullSourceMaps(srcPath: string, projRoot: string) { + exorcist(srcPath, undefined, projRoot); + exorcist(srcPath, null, projRoot, null, true); + exorcist(srcPath, null, projRoot, "./"); + } + +} + +export = ExorcistTest; \ No newline at end of file diff --git a/exorcist/exorcist.d.ts b/exorcist/exorcist.d.ts new file mode 100644 index 0000000000..c9c576ac12 --- /dev/null +++ b/exorcist/exorcist.d.ts @@ -0,0 +1,21 @@ +// Type definitions for exorcist v3.7.x +// Project: https://github.com/substack/watchify +// Definitions by: TeamworkGuy2 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module 'exorcist' { + import through = require("through"); + + /** Externalizes the source map found inside a stream to an external .map file. + * Works with both JavaScript and CSS input streams + * @param file full path to the map file to which to write the extracted source map + * @param [url] full URL to the map file, set as sourceMappingURL in the streaming output (default: file) + * @param [root] root URL for loading relative source paths, set as sourceRoot in the source map (default: "") + * @param [base] base path for calculating relative source paths (default: use absolute paths) + * @param [errorOnMissing] when truthy, causes 'error' to be emitted instead of 'missing-map' if no map was found in the stream (default: falsey) + */ + function exorcist(file: string, url?: string, root?: string, base?: string, errorOnMissing?: boolean): through.ThroughStream; + export = exorcist; +} \ No newline at end of file