Skip to content

Commit 868d3b2

Browse files
Mohsen Azimisokra
authored andcommitted
Add infrastructure
1 parent 0e88e8a commit 868d3b2

File tree

4 files changed

+93
-1
lines changed

4 files changed

+93
-1
lines changed

declarations.d.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
declare module '*.json';
2+
declare module 'webpack-cli';
3+
4+
// Globals
5+
declare const $hash$;
6+
declare const $requestTimeout$;
7+
declare const installedModules;
8+
declare const $require$;
9+
declare const hotDownloadManifest;
10+
declare const hotDownloadUpdateChunk;
11+
declare const hotDisposeChunk;
12+
declare const modules;
13+
declare const installedChunks
14+
declare const hotAddUpdateChunk
15+
declare const parentHotUpdateCallback
16+
// declare const XMLHttpRequest
17+
declare const $hotChunkFilename$
18+
declare const $hotMainFilename$
19+
declare const $WebAssembly

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
"webpack-sources": "^1.0.1"
2727
},
2828
"devDependencies": {
29+
"@types/tapable": "^1.0.0",
30+
"@types/node": "^9.6.0",
2931
"benchmark": "^2.1.1",
3032
"bundle-loader": "~0.5.0",
3133
"codacy-coverage": "^2.0.1",
@@ -95,7 +97,7 @@
9597
"test:unit": "mocha test/*.unittest.js --max-old-space-size=4096 --harmony --trace-deprecation",
9698
"travis:integration": "yarn cover:init && yarn cover:integration && yarn cover:report-min",
9799
"travis:unit": "yarn cover:init && yarn cover:unit && yarn cover:report-min",
98-
"travis:lint": "yarn lint",
100+
"travis:lint": "yarn lint && yarn tsc",
99101
"travis:benchmark": "yarn benchmark",
100102
"appveyor:integration": "yarn cover:init && yarn cover:integration && yarn cover:report-min",
101103
"appveyor:unit": "yarn cover:init && yarn cover:unit && yarn cover:report-min",
@@ -107,6 +109,7 @@
107109
"prelint": "yarn setup",
108110
"lint": "yarn code-lint && yarn schema-lint",
109111
"code-lint": "eslint setup lib bin hot buildin \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\"",
112+
"tsc": "tsc --pretty",
110113
"fix": "yarn code-lint --fix",
111114
"pretty": "prettier \"setup/**/*.js\" \"lib/**/*.js\" \"bin/*.js\" \"hot/*.js\" \"buildin/*.js\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\" --write",
112115
"schema-lint": "mocha test/*.lint.js --opts test/lint-mocha.opts",

tsconfig.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"compilerOptions": {
3+
/* Basic Options */
4+
"target": "ES2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
5+
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
6+
"lib": ["es2017"], /* Specify library files to be included in the compilation. */
7+
"allowJs": true, /* Allow javascript files to be compiled. */
8+
"checkJs": true, /* Report errors in .js files. */
9+
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
10+
// "declaration": true, /* Generates corresponding '.d.ts' file. */
11+
// "sourceMap": true, /* Generates corresponding '.map' file. */
12+
// "outFile": "./", /* Concatenate and emit output to single file. */
13+
// "outDir": "./", /* Redirect output structure to the directory. */
14+
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
15+
// "removeComments": true, /* Do not emit comments to output. */
16+
"noEmit": true, /* Do not emit outputs. */
17+
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
18+
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
19+
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
20+
21+
/* Strict Type-Checking Options */
22+
"strict": false, /* Enable all strict type-checking options. */
23+
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
24+
// "strictNullChecks": true, /* Enable strict null checks. */
25+
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
26+
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
27+
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
28+
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
29+
30+
/* Additional Checks */
31+
// "noUnusedLocals": true, /* Report errors on unused locals. */
32+
// "noUnusedParameters": true, /* Report errors on unused parameters. */
33+
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
34+
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
35+
36+
/* Module Resolution Options */
37+
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
38+
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
39+
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
40+
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
41+
// "typeRoots": [], /* List of folders to include type definitions from. */
42+
"types": ["node"], /* Type declaration files to be included in compilation. */
43+
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
44+
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
45+
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
46+
47+
/* Source Map Options */
48+
// "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
49+
// "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
50+
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
51+
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
52+
53+
/* Experimental Options */
54+
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
55+
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
56+
},
57+
"include": [
58+
"declarations.d.ts",
59+
"bin/*.js",
60+
"lib/**/*.js"
61+
]
62+
}

yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
# yarn lockfile v1
33

44

5+
"@types/node@^9.6.0":
6+
version "9.6.0"
7+
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.0.tgz#d3480ee666df9784b1001a1872a2f6ccefb6c2d7"
8+
9+
"@types/tapable@^1.0.0":
10+
version "1.0.0"
11+
resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.0.tgz#b76254453021be05681f6213416766bac9afb99c"
12+
513
abbrev@1:
614
version "1.1.1"
715
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"

0 commit comments

Comments
 (0)