From 20fe186d315e97b8a4fe4e93a2b5cde605aa7e74 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Tue, 4 Apr 2017 17:23:53 +0200 Subject: [PATCH] Added package.json to 'build'. --- build/lib/typings/vinyl.d.ts | 112 +++++++++++++++++++++++++++++++++++ build/npm/postinstall.js | 4 +- build/package.json | 8 +++ package.json | 3 - 4 files changed, 123 insertions(+), 4 deletions(-) create mode 100644 build/lib/typings/vinyl.d.ts create mode 100644 build/package.json diff --git a/build/lib/typings/vinyl.d.ts b/build/lib/typings/vinyl.d.ts new file mode 100644 index 00000000000..a85632e172b --- /dev/null +++ b/build/lib/typings/vinyl.d.ts @@ -0,0 +1,112 @@ +// Type definitions for vinyl 0.4.3 +// Project: https://github.com/wearefractal/vinyl +// Definitions by: vvakame , jedmao +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module "vinyl" { + + import fs = require("fs"); + + /** + * A virtual file format. + */ + class File { + constructor(options?: { + /** + * Default: process.cwd() + */ + cwd?: string; + /** + * Used for relative pathing. Typically where a glob starts. + */ + base?: string; + /** + * Full path to the file. + */ + path?: string; + /** + * Path history. Has no effect if options.path is passed. + */ + history?: string[]; + /** + * The result of an fs.stat call. See fs.Stats for more information. + */ + stat?: fs.Stats; + /** + * File contents. + * Type: Buffer, Stream, or null + */ + contents?: Buffer | NodeJS.ReadWriteStream; + }); + + /** + * Default: process.cwd() + */ + public cwd: string; + /** + * Used for relative pathing. Typically where a glob starts. + */ + public base: string; + /** + * Full path to the file. + */ + public path: string; + public stat: fs.Stats; + /** + * Type: Buffer|Stream|null (Default: null) + */ + public contents: Buffer | NodeJS.ReadableStream; + /** + * Returns path.relative for the file base and file path. + * Example: + * var file = new File({ + * cwd: "/", + * base: "/test/", + * path: "/test/file.js" + * }); + * console.log(file.relative); // file.js + */ + public relative: string; + + public isBuffer(): boolean; + + public isStream(): boolean; + + public isNull(): boolean; + + public isDirectory(): boolean; + + /** + * Returns a new File object with all attributes cloned. Custom attributes are deep-cloned. + */ + public clone(opts?: { contents?: boolean }): File; + + /** + * If file.contents is a Buffer, it will write it to the stream. + * If file.contents is a Stream, it will pipe it to the stream. + * If file.contents is null, it will do nothing. + */ + public pipe( + stream: T, + opts?: { + /** + * If false, the destination stream will not be ended (same as node core). + */ + end?: boolean; + }): T; + + /** + * Returns a pretty String interpretation of the File. Useful for console.log. + */ + public inspect(): string; + } + + /** + * This is required as per: + * https://github.com/Microsoft/TypeScript/issues/5073 + */ + namespace File {} + + export = File; + +} \ No newline at end of file diff --git a/build/npm/postinstall.js b/build/npm/postinstall.js index 421f0e454fb..0c56fe95b44 100644 --- a/build/npm/postinstall.js +++ b/build/npm/postinstall.js @@ -35,4 +35,6 @@ const extensions = [ 'gulp' ]; -extensions.forEach(extension => npmInstall(`extensions/${extension}`)); \ No newline at end of file +extensions.forEach(extension => npmInstall(`extensions/${extension}`)); + +npmInstall('build'); // typings used in the build folder \ No newline at end of file diff --git a/build/package.json b/build/package.json new file mode 100644 index 00000000000..d2d38c788cf --- /dev/null +++ b/build/package.json @@ -0,0 +1,8 @@ +{ + "name": "build", + "version": "1.0.0", + "author": "Microsoft Corporation", + "devDependencies": { + "@types/xml2js": "^0.0.33" + } +} diff --git a/package.json b/package.json index fd917b149a1..879d947df5c 100644 --- a/package.json +++ b/package.json @@ -46,10 +46,7 @@ "@types/mocha": "^2.2.39", "@types/semver": "^5.3.30", "@types/sinon": "^1.16.34", - "@types/through": "^0.0.28", "@types/winreg": "^1.2.30", - "@types/vinyl": "^2.0.0", - "@types/xml2js": "^0.0.33", "azure-storage": "^0.3.1", "clean-css": "3.4.6", "coveralls": "^2.11.11",