fix browser-pack

This commit is contained in:
Paul van Brenk
2016-08-19 17:22:51 -07:00
parent 90395bc958
commit 693c2b2785
3 changed files with 28 additions and 13 deletions
+2 -4
View File
@@ -1,11 +1,9 @@
/// <reference path="browser-pack.d.ts" />
import browserPack = require("browser-pack");
module BrowserPackTest {
export function packIt(opts?: BrowserPack.Options) {
var packOpts: BrowserPack.Options = {
export function packIt(opts?: browserPack.Options) {
var packOpts: browserPack.Options = {
basedir: opts.basedir || "./",
externalRequireName: opts.externalRequireName || "require",
hasExports: opts.hasExports || false,
+7 -9
View File
@@ -3,11 +3,11 @@
// Definitions by: TeamworkGuy2 <https://github.com/TeamworkGuy2>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
/// <reference types="node" />
/** pack node-style source files from a json stream into a browser bundle
*/
declare module BrowserPack {
declare namespace browserPack {
export interface Options {
/** Whether the bundle should include require= (or the opts.externalRequireName) so that
@@ -50,12 +50,10 @@ declare module BrowserPack {
*/
sourceMapPrefix?: string;
}
}
declare module "browser-pack" {
/** pack node-style source files from a json stream into a browser bundle
*/
function browserPack(opts?: BrowserPack.Options): NodeJS.ReadWriteStream;
export = browserPack;
}
/** pack node-style source files from a json stream into a browser bundle
*/
declare function browserPack(opts?: browserPack.Options): NodeJS.ReadWriteStream;
export = browserPack;
export as namespace browserPack;
+19
View File
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"browser-pack-tests.ts"
]
}