generated from Richienb/node-module-boilerplate
-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Richie Bendall <richiebendall@gmail.com>
- Loading branch information
Showing
7 changed files
with
148 additions
and
152 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,7 +1,7 @@ | ||
const assert = require("assert") | ||
const assert = require('assert'); | ||
|
||
assert(true) | ||
assert(true); | ||
|
||
console.clear() | ||
console.clear(); | ||
|
||
module.exports = Buffer.from("Hello World").toString() | ||
module.exports = Buffer.from('Hello World').toString(); |
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,61 +1,59 @@ | ||
import { MergeExclusive } from "type-fest" | ||
import { Compiler } from "webpack" | ||
import {MergeExclusive} from 'type-fest'; | ||
import {Compiler} from 'webpack'; | ||
|
||
declare namespace NodePolyfillPlugin { | ||
export type Alias = | ||
| "Buffer" | ||
| "console" | ||
| "process" | ||
| "assert" | ||
| "buffer" | ||
| "console" | ||
| "constants" | ||
| "crypto" | ||
| "domain" | ||
| "events" | ||
| "http" | ||
| "https" | ||
| "os" | ||
| "path" | ||
| "punycode" | ||
| "process" | ||
| "querystring" | ||
| "stream" | ||
| "_stream_duplex" | ||
| "_stream_passthrough" | ||
| "_stream_readable" | ||
| "_stream_transform" | ||
| "_stream_writable" | ||
| "string_decoder" | ||
| "sys" | ||
| "timers" | ||
| "tty" | ||
| "url" | ||
| "util" | ||
| "vm" | ||
| "zlib" | ||
export type Alias = | ||
| 'Buffer' | ||
| 'console' | ||
| 'process' | ||
| 'assert' | ||
| 'buffer' | ||
| 'console' | ||
| 'constants' | ||
| 'crypto' | ||
| 'domain' | ||
| 'events' | ||
| 'http' | ||
| 'https' | ||
| 'os' | ||
| 'path' | ||
| 'punycode' | ||
| 'process' | ||
| 'querystring' | ||
| 'stream' | ||
| '_stream_duplex' | ||
| '_stream_passthrough' | ||
| '_stream_readable' | ||
| '_stream_transform' | ||
| '_stream_writable' | ||
| 'string_decoder' | ||
| 'sys' | ||
| 'timers' | ||
| 'tty' | ||
| 'url' | ||
| 'util' | ||
| 'vm' | ||
| 'zlib'; | ||
|
||
interface IncludeOptions { | ||
/** | ||
By default, the modules that were polyfilled in Webpack 4 are mirrored over. However, you can choose to only include certain aliases. For example, you can only have `console` polyfilled. | ||
*/ | ||
includeAliases?: readonly Alias[] | ||
} | ||
|
||
interface ExcludeOptions { | ||
/** | ||
By default, the modules that were polyfilled in Webpack 4 are mirrored over. However, if you don't want a module like `console` to be polyfilled you can specify alises to be skipped here. | ||
*/ | ||
excludeAliases?: readonly Alias[] | ||
} | ||
interface IncludeOptions { | ||
/** | ||
By default, the modules that were polyfilled in Webpack 4 are mirrored over. However, you can choose to only include certain aliases. For example, you can only have `console` polyfilled. | ||
*/ | ||
includeAliases?: readonly Alias[]; | ||
} | ||
|
||
export type Options = MergeExclusive<IncludeOptions, ExcludeOptions> | ||
interface ExcludeOptions { | ||
/** | ||
By default, the modules that were polyfilled in Webpack 4 are mirrored over. However, if you don't want a module like `console` to be polyfilled you can specify alises to be skipped here. | ||
*/ | ||
excludeAliases?: readonly Alias[]; | ||
} | ||
|
||
export type Options = MergeExclusive<IncludeOptions, ExcludeOptions>; | ||
|
||
declare class NodePolyfillPlugin { | ||
constructor(options?: NodePolyfillPlugin.Options) | ||
constructor(options?: Options); | ||
|
||
apply(compiler: InstanceType<typeof Compiler>): void | ||
apply(compiler: InstanceType<typeof Compiler>): void; | ||
} | ||
|
||
export = NodePolyfillPlugin | ||
export = NodePolyfillPlugin; |
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
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
Oops, something went wrong.