aboutsummaryrefslogtreecommitdiff
path: root/node_modules/ts-loader
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/ts-loader')
-rw-r--r--node_modules/ts-loader/.travis.yml1
-rw-r--r--node_modules/ts-loader/CHANGELOG.md4
-rw-r--r--node_modules/ts-loader/README.md42
-rw-r--r--node_modules/ts-loader/appveyor.yml1
-rw-r--r--node_modules/ts-loader/dist/index.js19
-rw-r--r--node_modules/ts-loader/dist/instances.js7
-rw-r--r--node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/README.md (renamed from node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/README.md)0
-rw-r--r--node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulp/clean.js (renamed from node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/clean.js)0
-rw-r--r--node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulp/inject.js (renamed from node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/inject.js)0
-rw-r--r--node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulp/staticFiles.js (renamed from node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/staticFiles.js)0
-rw-r--r--node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulp/tests.js (renamed from node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/tests.js)0
-rw-r--r--node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulp/webpack.js112
-rw-r--r--node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulpFile.js (renamed from node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulpFile.js)18
-rw-r--r--node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/karma.conf.js69
-rw-r--r--node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/package.json87
-rw-r--r--node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/tsconfig.json (renamed from node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/tsconfig.json)0
-rw-r--r--node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/tslint.json91
-rw-r--r--node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/webpack.config.js65
-rw-r--r--node_modules/ts-loader/examples/fork-ts-checker/package.json14
-rw-r--r--node_modules/ts-loader/examples/fork-ts-checker/tsconfig.json4
-rw-r--r--node_modules/ts-loader/examples/fork-ts-checker/webpack.config.js32
-rw-r--r--node_modules/ts-loader/examples/react-babel-karma-gulp/README.md (renamed from node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/README.md)1
-rw-r--r--node_modules/ts-loader/examples/react-babel-karma-gulp/gulp/clean.js (renamed from node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/clean.js)0
-rw-r--r--node_modules/ts-loader/examples/react-babel-karma-gulp/gulp/inject.js (renamed from node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/inject.js)0
-rw-r--r--node_modules/ts-loader/examples/react-babel-karma-gulp/gulp/staticFiles.js (renamed from node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/staticFiles.js)0
-rw-r--r--node_modules/ts-loader/examples/react-babel-karma-gulp/gulp/tests.js (renamed from node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/tests.js)0
-rw-r--r--node_modules/ts-loader/examples/react-babel-karma-gulp/gulp/webpack.js (renamed from node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/webpack.js)0
-rw-r--r--node_modules/ts-loader/examples/react-babel-karma-gulp/gulpFile.js49
-rw-r--r--node_modules/ts-loader/examples/react-babel-karma-gulp/karma.conf.js (renamed from node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/karma.conf.js)0
-rw-r--r--node_modules/ts-loader/examples/react-babel-karma-gulp/package.json (renamed from node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/package.json)6
-rw-r--r--node_modules/ts-loader/examples/react-babel-karma-gulp/tsconfig.json (renamed from node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/tsconfig.json)0
-rw-r--r--node_modules/ts-loader/examples/react-babel-karma-gulp/webpack.config.js (renamed from node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/webpack.config.js)0
-rw-r--r--node_modules/ts-loader/examples/react-cdn-simple/index.html (renamed from node_modules/ts-loader/examples/webpack2-react-cdn-simple/index.html)0
-rw-r--r--node_modules/ts-loader/examples/react-cdn-simple/package.json (renamed from node_modules/ts-loader/examples/webpack2-react-cdn-simple/package.json)0
-rw-r--r--node_modules/ts-loader/examples/react-cdn-simple/tsconfig.json (renamed from node_modules/ts-loader/examples/webpack2-react-cdn-simple/tsconfig.json)0
-rw-r--r--node_modules/ts-loader/examples/react-cdn-simple/webpack.config.js (renamed from node_modules/ts-loader/examples/webpack2-react-cdn-simple/webpack.config.js)0
-rw-r--r--node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/.npmignore201
-rw-r--r--node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/LICENSE22
-rw-r--r--node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/components/App.tsx45
-rw-r--r--node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/components/Greeting.tsx37
-rw-r--r--node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/components/WhoToGreet.tsx53
-rw-r--r--node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/index.html19
-rw-r--r--node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/main.tsx7
-rw-r--r--node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/test/components/App.tests.tsx32
-rw-r--r--node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/test/components/Greeting.tests.tsx45
-rw-r--r--node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/test/components/WhoToGreet.tests.tsx68
-rw-r--r--node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/test/main.js5
-rw-r--r--node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/.eslintrc (renamed from node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/.eslintrc)0
-rw-r--r--node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/clean.js29
-rw-r--r--node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/inject.js55
-rw-r--r--node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/staticFiles.js31
-rw-r--r--node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/tests.js45
-rw-r--r--node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/webpack.js (renamed from node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/webpack.js)0
-rw-r--r--node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulpFile.js (renamed from node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulpFile.js)0
-rw-r--r--node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/karma.conf.js (renamed from node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/karma.conf.js)0
-rw-r--r--node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/package.json (renamed from node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/package.json)0
-rw-r--r--node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/tsconfig.json22
-rw-r--r--node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/webpack.config.js (renamed from node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/webpack.config.js)0
-rw-r--r--node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/.npmignore201
-rw-r--r--node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/LICENSE22
-rw-r--r--node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/.eslintrc73
-rw-r--r--node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/components/App.tsx45
-rw-r--r--node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/components/Greeting.tsx37
-rw-r--r--node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/components/WhoToGreet.tsx53
-rw-r--r--node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/index.html19
-rw-r--r--node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/main.tsx7
-rw-r--r--node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/test/components/App.tests.tsx32
-rw-r--r--node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/test/components/Greeting.tests.tsx45
-rw-r--r--node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/test/components/WhoToGreet.tests.tsx68
-rw-r--r--node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/test/main.js5
-rw-r--r--node_modules/ts-loader/package.json7
71 files changed, 766 insertions, 1186 deletions
diff --git a/node_modules/ts-loader/.travis.yml b/node_modules/ts-loader/.travis.yml
index e82a9f56e..d00853eaf 100644
--- a/node_modules/ts-loader/.travis.yml
+++ b/node_modules/ts-loader/.travis.yml
@@ -17,4 +17,5 @@ env:
- TYPESCRIPT=typescript@2.0.9
- TYPESCRIPT=typescript@2.1.5
- TYPESCRIPT=typescript@2.2.1
+ - TYPESCRIPT=typescript@2.3.1
- TYPESCRIPT=typescript@next
diff --git a/node_modules/ts-loader/CHANGELOG.md b/node_modules/ts-loader/CHANGELOG.md
index 343e34e0a..de7b75702 100644
--- a/node_modules/ts-loader/CHANGELOG.md
+++ b/node_modules/ts-loader/CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog
+## v2.1.0
+
+- [Add happypack compatibility mode](https://github.com/TypeStrong/ts-loader/pull/547) - thanks @aindlq!
+
## v2.0.3
- [Don't include appended TS extension in webpack dependencies](https://github.com/TypeStrong/ts-loader/pull/497) - thanks again @wearymonkey!
diff --git a/node_modules/ts-loader/README.md b/node_modules/ts-loader/README.md
index 087cd97e1..714f5a93b 100644
--- a/node_modules/ts-loader/README.md
+++ b/node_modules/ts-loader/README.md
@@ -5,6 +5,8 @@
# TypeScript loader for webpack
+[![Greenkeeper badge](https://badges.greenkeeper.io/TypeStrong/ts-loader.svg)](https://greenkeeper.io/)
+
This is the typescript loader for webpack.
## Getting Started
@@ -15,26 +17,15 @@ Take a look at our [examples](examples/). You can also find some older tutorial
#### TypeScript
-ts-loader supports the latest and greatest version of TypeScript right back to v1.6. (Including the [nightly build](http://blogs.msdn.com/b/typescript/archive/2015/07/27/introducing-typescript-nightlies.aspx).)
-
-A full test suite runs each night (and on each pull request). It runs both on [Linux](https://travis-ci.org/TypeStrong/ts-loader) and [Windows](https://ci.appveyor.com/project/JohnReilly/ts-loader), testing ts-loader against the following versions of TypeScript:
-- TypeScript 2.2
-- TypeScript 2.1
-- TypeScript 2.0
-- TypeScript 1.8
-- TypeScript 1.7
-- TypeScript 1.6
+ts-loader supports the latest and greatest version of TypeScript right back to v1.6.
-and also:
-- TypeScript@next (because we want to use it as much as you do)
+A full test suite runs each night (and on each pull request). It runs both on [Linux](https://travis-ci.org/TypeStrong/ts-loader) and [Windows](https://ci.appveyor.com/project/JohnReilly/ts-loader), testing ts-loader against each major release of TypeScript from the latest right back to 1.6. The test suite also runs against TypeScript@next (because we want to use it as much as you do).
If you become aware of issues not caught by the test suite then please let us know. Better yet, write a test and submit it in a PR!
#### Webpack
-ts-loader was originally designed for Webpack 1. It may well still work with webpack 1 but it does not officially support webpack 1 any more. All development now targets webpack 2. Our continuous integration test suites run against webpack 2; **not** webpack 1.
-
-If you'd like to see a setup that works with webpack 2 take a look [at our example](examples/webpack2-gulp-react-flux-babel-karma) or at some of our [tests](test/comparison-tests); they all target webpack 2.
+ts-loader targets webpack 2. It may well still work with webpack 1 but it does not officially support webpack 1 any longer. Our continuous integration test suites run against webpack 2; **not** webpack 1.
#### `LoaderOptionsPlugin`
@@ -57,7 +48,7 @@ It's worth noting that use of the `LoaderOptionsPlugin` is [only supposed to be
ts-loader works very well in combination with [babel](https://babeljs.io/) and [babel-loader](https://github.com/babel/babel-loader). To see an example of this in practice take a look at the [example](https://github.com/Microsoft/TypeScriptSamples/tree/master/react-flux-babel-karma) in the official [TypeScript Samples](https://github.com/Microsoft/TypeScriptSamples).
-Alternatively take a look at this [webpack 2 example](examples/webpack2-gulp-react-flux-babel-karma).
+Alternatively take a look at this [webpack 2 example](examples/react-babel-karma-gulp).
### Contributing
@@ -180,6 +171,10 @@ different dependencies in your application will be lost. You should also
set the `isolatedModules` TypeScript option if you plan to ever make use
of this.
+##### happyPackMode *(boolean) (default=false)*
+
+Enables [`happypack`](https://github.com/amireh/happypack) compatibility mode. This implicitly sets `*transpileOnly*` to `true`. **WARNING!** Some errors will be silently ignored in `happypack` mode (`tsconfig.json` parsing errors, dependency resolution errors, etc.).
+
##### logInfoToStdOut *(boolean) (default=false)*
This is important if you read from stdout or stderr and for proper error handling.
@@ -245,9 +240,9 @@ module.exports = {
extensions: ['.ts', '.vue']
},
module: {
- loaders: [
- { test: /\.vue$/, loader: 'vue' },
- { test: /\.ts$/, loader: 'ts', options: { appendTsSuffixTo: [/\.vue$/] } }
+ rules: [
+ { test: /\.vue$/, loader: 'vue-loader' },
+ { test: /\.ts$/, loader: 'ts-loader', options: { appendTsSuffixTo: [/\.vue$/] } }
]
}
}
@@ -292,6 +287,17 @@ The same basic process is required for code splitting. In this case, you `import
don't directly use them. Instead you require them at [split points](http://webpack.github.io/docs/code-splitting.html#defining-a-split-point).
See [this example](test/comparison-tests/codeSplitting) and [this example](test/comparison-tests/es6codeSplitting) for more details.
+### Faster incremental builds
+
+As your project becomes bigger and bigger, compilation time increases linearly. It's because typescript's semantic checker has to inspect all files on every rebuild.
+
+The simple solution is to disable it by `transpileOnly: true` option but it leaves you without type checking.
+
+If you don't want give up type checking, you can use [fork-ts-checker-webpack-plugin](https://github.com/Realytics/fork-ts-checker-webpack-plugin).
+It runs checker on separate process, so your build is as fast as with `transpileOnly: true`. Also, it has several optimizations to make incremental type checking faster (AST cache, multiple workers).
+
+If you'd like to see a simple setup take a look at [our simple example](examples/webpack2-fork-ts-checker/). For a more complex setup take a look at our [more involved example](examples\fork-ts-checker-react-babel-karma-gulp).
+
## License
MIT License
diff --git a/node_modules/ts-loader/appveyor.yml b/node_modules/ts-loader/appveyor.yml
index 02fb8b2c1..82b424026 100644
--- a/node_modules/ts-loader/appveyor.yml
+++ b/node_modules/ts-loader/appveyor.yml
@@ -7,6 +7,7 @@ environment:
- TYPESCRIPT: typescript@2.0.9
- TYPESCRIPT: typescript@2.1.5
- TYPESCRIPT: typescript@2.2.1
+ - TYPESCRIPT: typescript@2.3.1
- TYPESCRIPT: typescript@next
install:
- ps: Install-Product node $env:nodejs_version
diff --git a/node_modules/ts-loader/dist/index.js b/node_modules/ts-loader/dist/index.js
index 335c1b190..7a1e59041 100644
--- a/node_modules/ts-loader/dist/index.js
+++ b/node_modules/ts-loader/dist/index.js
@@ -32,10 +32,13 @@ function loader(contents) {
throw new Error("Typescript emitted no output for " + filePath + "." + additionalGuidance);
}
var _c = makeSourceMap(sourceMapText, outputText, filePath, contents, this), sourceMap = _c.sourceMap, output = _c.output;
- // Make sure webpack is aware that even though the emitted JavaScript may be the same as
- // a previously cached version the TypeScript may be different and therefore should be
- // treated as new
- this._module.meta.tsLoaderFileVersion = fileVersion;
+ // _module.meta is not available inside happypack
+ if (!options.happyPackMode) {
+ // Make sure webpack is aware that even though the emitted JavaScript may be the same as
+ // a previously cached version the TypeScript may be different and therefore should be
+ // treated as new
+ this._module.meta.tsLoaderFileVersion = fileVersion;
+ }
callback(null, output, sourceMap);
}
/**
@@ -65,10 +68,13 @@ function getLoaderOptions(loader) {
compilerOptions: {},
appendTsSuffixTo: [],
entryFileIsJs: false,
+ happyPackMode: false,
}, configFileOptions, queryOptions);
options.ignoreDiagnostics = utils.arrify(options.ignoreDiagnostics).map(Number);
options.logLevel = options.logLevel.toUpperCase();
options.instance = instanceName;
+ // happypack can be used only together with transpileOnly mode
+ options.transpileOnly = options.happyPackMode ? true : options.transpileOnly;
loaderOptionsCache[instanceName] = options;
return options;
}
@@ -136,7 +142,10 @@ function getTranspilationEmit(filePath, contents, instance, loader) {
reportDiagnostics: true,
fileName: fileName,
}), outputText = _a.outputText, sourceMapText = _a.sourceMapText, diagnostics = _a.diagnostics;
- utils.registerWebpackErrors(loader._module.errors, utils.formatErrors(diagnostics, instance.loaderOptions, instance.compiler, { module: loader._module }));
+ // _module.errors is not available inside happypack - see https://github.com/TypeStrong/ts-loader/issues/336
+ if (!instance.loaderOptions.happyPackMode) {
+ utils.registerWebpackErrors(loader._module.errors, utils.formatErrors(diagnostics, instance.loaderOptions, instance.compiler, { module: loader._module }));
+ }
return { outputText: outputText, sourceMapText: sourceMapText };
}
function makeSourceMap(sourceMapText, outputText, filePath, contents, loader) {
diff --git a/node_modules/ts-loader/dist/instances.js b/node_modules/ts-loader/dist/instances.js
index fc9c13cc5..10227547a 100644
--- a/node_modules/ts-loader/dist/instances.js
+++ b/node_modules/ts-loader/dist/instances.js
@@ -32,7 +32,7 @@ function getTypeScriptInstance(loaderOptions, loader) {
return { error: configFileError };
}
var configParseResult = config.getConfigParseResult(compiler, configFile, configFilePath);
- if (configParseResult.errors.length) {
+ if (configParseResult.errors.length && !loaderOptions.happyPackMode) {
utils.registerWebpackErrors(loader._module.errors, utils.formatErrors(configParseResult.errors, loaderOptions, compiler, { file: configFilePath }));
return { error: utils.makeError({ rawMessage: 'error while parsing tsconfig.json', file: configFilePath }) };
}
@@ -43,7 +43,10 @@ function getTypeScriptInstance(loaderOptions, loader) {
// we do need to check for any issues with TS options though
var program = compiler.createProgram([], compilerOptions);
var diagnostics = program.getOptionsDiagnostics();
- utils.registerWebpackErrors(loader._module.errors, utils.formatErrors(diagnostics, loaderOptions, compiler, { file: configFilePath || 'tsconfig.json' }));
+ // happypack does not have _module.errors - see https://github.com/TypeStrong/ts-loader/issues/336
+ if (!loaderOptions.happyPackMode) {
+ utils.registerWebpackErrors(loader._module.errors, utils.formatErrors(diagnostics, loaderOptions, compiler, { file: configFilePath || 'tsconfig.json' }));
+ }
return { instance: instances[loaderOptions.instance] = { compiler: compiler, compilerOptions: compilerOptions, loaderOptions: loaderOptions, files: files, dependencyGraph: {}, reverseDependencyGraph: {} } };
}
// Load initial files (core lib files, any files specified in tsconfig.json)
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/README.md b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/README.md
index e7a0cb064..e7a0cb064 100644
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/README.md
+++ b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/README.md
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/clean.js b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulp/clean.js
index c51b4e416..c51b4e416 100644
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/clean.js
+++ b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulp/clean.js
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/inject.js b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulp/inject.js
index e4133e565..e4133e565 100644
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/inject.js
+++ b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulp/inject.js
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/staticFiles.js b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulp/staticFiles.js
index 20327f272..20327f272 100644
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/staticFiles.js
+++ b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulp/staticFiles.js
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/tests.js b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulp/tests.js
index 05af0a551..05af0a551 100644
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/tests.js
+++ b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulp/tests.js
diff --git a/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulp/webpack.js b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulp/webpack.js
new file mode 100644
index 000000000..7607c122b
--- /dev/null
+++ b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulp/webpack.js
@@ -0,0 +1,112 @@
+'use strict';
+
+var gulp = require('gulp');
+var gutil = require('gulp-util');
+var webpack = require('webpack');
+var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
+var ForkTsCheckerNotifierWebpackPlugin = require('fork-ts-checker-notifier-webpack-plugin');
+var webpackFailPlugin = require('webpack-fail-plugin');
+
+var webpackConfig = require('../webpack.config.js');
+var packageJson = require('../package.json');
+
+function buildProduction(done) {
+ // modify some webpack config options
+ var myProdConfig = webpackConfig;
+ myProdConfig.output.filename = '[name].[hash].js';
+
+ myProdConfig.plugins = myProdConfig.plugins.concat(
+ new webpack.DefinePlugin({
+ 'process.env': {
+ 'NODE_ENV': JSON.stringify('production')
+ }
+ }),
+ new webpack.optimize.CommonsChunkPlugin({ name: 'vendor', filename: 'vendor.[hash].js' }),
+ new webpack.optimize.UglifyJsPlugin({
+ compress: {
+ warnings: true
+ }
+ }),
+ new ForkTsCheckerWebpackPlugin({
+ blockEmit: true,
+ // tslint: true,
+ watch: ['./src', './test'] // optional but improves performance (less stat calls)
+ }),
+ webpackFailPlugin
+ );
+
+ // run webpack
+ webpack(myProdConfig, function (err, stats) {
+ if (err) { throw new gutil.PluginError('webpack:build', err); }
+ gutil.log('[webpack:build]', stats.toString({
+ colors: true
+ }));
+
+ if (done) { done(); }
+ });
+}
+
+function createDevCompiler() {
+ // modify some webpack config options
+ var myDevConfig = webpackConfig;
+ myDevConfig.devtool = 'inline-source-map';
+
+ myDevConfig.plugins = myDevConfig.plugins.concat(
+ new webpack.optimize.CommonsChunkPlugin({ name: 'vendor', filename: 'vendor.js' }),
+ new ForkTsCheckerNotifierWebpackPlugin ({ title: 'Build', excludeWarnings: false }),
+ new ForkTsCheckerWebpackPlugin({
+ blockEmit: false,
+ // tslint: true,
+ watch: ['./src'] // optional but improves performance (less stat calls)
+ })
+ );
+
+ // create a single instance of the compiler to allow caching
+ return webpack(myDevConfig);
+}
+
+function build() {
+ return new Promise(function (resolve, reject) {
+ buildProduction(function (err) {
+ if (err) {
+ reject(err);
+ } else {
+ resolve('webpack built');
+ }
+ });
+ });
+}
+
+function watch() {
+ var firstBuildDone = false;
+
+ return new Promise(function (resolve, reject) {
+ var devCompiler = createDevCompiler();
+ devCompiler.watch({ // watch options:
+ aggregateTimeout: 300 // wait so long for more changes
+ }, function (err, stats) {
+ if (err) {
+ if (!firstBuildDone) {
+ firstBuildDone = true;
+ reject(err);
+ }
+ throw new gutil.PluginError('webpack:build-dev', err);
+ } else {
+ if (!firstBuildDone) {
+ firstBuildDone = true;
+ resolve('webpack built');
+ }
+ }
+
+ gutil.log('[webpack:build-dev]', stats.toString({
+ chunks: false,
+ colors: true
+ }));
+ });
+ });
+}
+
+module.exports = {
+ build: function () { return build(); },
+ watch: function () { return watch(); }
+};
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulpFile.js b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulpFile.js
index b7b3abe73..02fcbc0d5 100644
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulpFile.js
+++ b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/gulpFile.js
@@ -3,7 +3,6 @@
var gulp = require('gulp');
var gutil = require('gulp-util');
-var eslint = require('gulp-eslint');
var webpack = require('./gulp/webpack');
var staticFiles = require('./gulp/staticFiles');
var tests = require('./gulp/tests');
@@ -16,28 +15,18 @@ gulp.task('delete-dist', function (done) {
clean.run(done);
});
-gulp.task('build-process.env.NODE_ENV', function () {
- process.env.NODE_ENV = 'production';
-});
-
-gulp.task('build-js', ['delete-dist', 'build-process.env.NODE_ENV'], function(done) {
+gulp.task('build-js', ['delete-dist'], function(done) {
webpack.build().then(function() { done(); });
});
-gulp.task('build-other', ['delete-dist', 'build-process.env.NODE_ENV'], function() {
+gulp.task('build-other', ['delete-dist'], function() {
staticFiles.build();
});
-gulp.task('build', ['build-js', 'build-other', 'lint'], function () {
+gulp.task('build', ['build-js', 'build-other'], function () {
inject.build();
});
-gulp.task('lint', function () {
- return gulp.src(lintSrcs)
- .pipe(eslint())
- .pipe(eslint.format());
-});
-
gulp.task('watch', ['delete-dist'], function(done) {
process.env.NODE_ENV = 'development';
Promise.all([
@@ -51,7 +40,6 @@ gulp.task('watch', ['delete-dist'], function(done) {
gutil.log('Problem generating initial assets (js and css)', error);
});
- gulp.watch(lintSrcs, ['lint']);
staticFiles.watch();
tests.watch();
});
diff --git a/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/karma.conf.js b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/karma.conf.js
new file mode 100644
index 000000000..1c35404d6
--- /dev/null
+++ b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/karma.conf.js
@@ -0,0 +1,69 @@
+/* eslint-disable no-var, strict */
+'use strict';
+
+var webpackConfig = require('./webpack.config.js');
+var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
+var ForkTsCheckerNotifierWebpackPlugin = require('fork-ts-checker-notifier-webpack-plugin');
+
+module.exports = function (config) {
+ var forkTsCheckerOptions = {
+ blockEmit: true,
+ watch: ['./test'] // optional but improves performance (less stat calls)
+ };
+ var plugins = config.singleRun
+ ? [
+ new ForkTsCheckerWebpackPlugin(forkTsCheckerOptions)
+ ]
+ : [
+ new ForkTsCheckerNotifierWebpackPlugin({ title: 'Tests Build', excludeWarnings: false }),
+ new ForkTsCheckerWebpackPlugin(Object.assign({}, forkTsCheckerOptions, { blockEmit: false }))
+ ];
+
+ // Documentation: https://karma-runner.github.io/0.13/config/configuration-file.html
+ config.set({
+ browsers: ['PhantomJS'],
+
+ files: [
+ // This ensures we have the es6 shims in place and then loads all the tests
+ 'test/main.js'
+ ],
+
+ port: 9876,
+
+ frameworks: ['jasmine'],
+
+ logLevel: config.LOG_INFO, //config.LOG_DEBUG
+
+ preprocessors: {
+ 'test/main.js': ['webpack', 'sourcemap']
+ },
+
+ webpack: {
+ devtool: 'inline-source-map',
+ module: webpackConfig.module,
+ resolve: webpackConfig.resolve,
+ plugins: plugins
+ },
+
+ webpackMiddleware: {
+ quiet: true,
+ stats: {
+ colors: true
+ }
+ },
+
+ // reporter options
+ mochaReporter: {
+ colors: {
+ success: 'bgGreen',
+ info: 'cyan',
+ warning: 'bgBlue',
+ error: 'bgRed'
+ }
+ },
+
+ notifyReporter: {
+ reportSuccess: false // Default: true, Will notify when a suite was successful
+ }
+ });
+};
diff --git a/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/package.json b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/package.json
new file mode 100644
index 000000000..a651593b8
--- /dev/null
+++ b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/package.json
@@ -0,0 +1,87 @@
+{
+ "name": "es6-babel-react-flux-karma",
+ "version": "1.0.0",
+ "description": "ES6 + TypeScript + Babel + React + Karma: The Secret Recipe",
+ "main": "index.js",
+ "scripts": {
+ "test": "karma start --reporters mocha,junit --single-run --browsers PhantomJS",
+ "serve": "gulp watch-and-serve",
+ "watch": "gulp watch",
+ "build": "gulp build"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/microsoft/typescriptsamples.git"
+ },
+ "keywords": [
+ "React",
+ "Flux",
+ "ES2016",
+ "typescript"
+ ],
+ "author": "John Reilly",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/microsoft/typescriptsamples/issues"
+ },
+ "homepage": "https://github.com/Microsoft/TypeScriptSamples/tree/master/es6-babel-react-flux-karma#readme",
+ "devDependencies": {
+ "@types/fbemitter": "^2.0.32",
+ "@types/flux": "0.0.32",
+ "@types/jasmine": "^2.5.35",
+ "@types/react": "^0.14.41",
+ "@types/react-addons-test-utils": "^0.14.15",
+ "@types/react-bootstrap": "0.0.33",
+ "@types/react-dom": "^0.14.18",
+ "@types/react-test-renderer": "^15.5.0",
+ "babel": "^6.0.0",
+ "babel-core": "^6.0.0",
+ "babel-loader": "^7.0.0",
+ "babel-preset-es2015": "^6.0.0",
+ "babel-preset-es2016": "^6.16.0",
+ "babel-preset-react": "^6.0.0",
+ "del": "^2.0.2",
+ "express": "^4.13.3",
+ "fork-ts-checker-notifier-webpack-plugin": "^0.1.3",
+ "fork-ts-checker-webpack-plugin": "^0.1.1",
+ "glob": "^7.0.0",
+ "gulp": "^3.9.0",
+ "gulp-autoprefixer": "^3.1.0",
+ "gulp-cached": "^1.1.0",
+ "gulp-cssmin": "^0.1.7",
+ "gulp-eslint": "^2.0.0",
+ "gulp-if": "^2.0.0",
+ "gulp-inject": "^3.0.0",
+ "gulp-notify": "^2.2.0",
+ "gulp-sourcemaps": "^1.5.2",
+ "gulp-streamify": "1.0.2",
+ "gulp-uglify": "^1.2.0",
+ "gulp-util": "^3.0.6",
+ "jasmine-core": "^2.3.4",
+ "karma": "^1.2.0",
+ "karma-jasmine": "^1.0.0",
+ "karma-junit-reporter": "^1.0.0",
+ "karma-mocha-reporter": "^2.0.0",
+ "karma-notify-reporter": "^1.0.0",
+ "karma-phantomjs-launcher": "^1.0.0",
+ "karma-sourcemap-loader": "^0.3.6",
+ "karma-webpack": "^2.0.1",
+ "phantomjs-prebuilt": "^2.1.4",
+ "react-addons-test-utils": "^15.3.1",
+ "react-test-renderer": "^15.5.4",
+ "ts-loader": "^2.0.0",
+ "tslint": "^5.1.0",
+ "tslint-react": "^3.0.0",
+ "typescript": "^2.1.4",
+ "webpack": "^2.2.0",
+ "webpack-fail-plugin": "^1.0.4",
+ "webpack-notifier": "^1.2.1"
+ },
+ "dependencies": {
+ "babel-polyfill": "^6.0.0",
+ "flux": "^2.0.3",
+ "fbemitter": "^2.0.2",
+ "react": "^15.4.1",
+ "react-dom": "^15.4.1"
+ }
+}
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/tsconfig.json b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/tsconfig.json
index c3a732c12..c3a732c12 100644
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/tsconfig.json
+++ b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/tsconfig.json
diff --git a/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/tslint.json b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/tslint.json
new file mode 100644
index 000000000..40d93780b
--- /dev/null
+++ b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/tslint.json
@@ -0,0 +1,91 @@
+{
+ "extends": [
+ "tslint:recommended",
+ "tslint-react"
+ ],
+ "rules": {
+ "arrow-parens": false,
+ "class-name": true,
+ "comment-format": [
+ true,
+ "check-space"
+ ],
+ "indent": [
+ true,
+ "spaces"
+ ],
+ "interface-name": [
+ false
+ ],
+ "jsx-alignment": false,
+ "jsx-no-lambda": true,
+ "jsx-wrap-multiline": false,
+ "jsx-no-multiline-js": false,
+ "jsx-no-string-ref": true,
+ "jsx-self-close": true,
+ "jsx-curly-spacing": "always",
+ "jsx-boolean-value": false,
+ "max-classes-per-file": {
+ "severity": "warning",
+ "options": [true, 1]
+ },
+ "max-line-length": [
+ false
+ ],
+ "member-access": false,
+ "no-duplicate-variable": true,
+ "no-empty": false,
+ "no-eval": true,
+ "no-internal-module": true,
+ "no-trailing-whitespace": true,
+ "no-var-keyword": true,
+ "object-literal-sort-keys": false,
+ "one-line": [
+ true,
+ "check-open-brace",
+ "check-whitespace"
+ ],
+ "ordered-imports": false,
+ "radix": false,
+ "quotemark": [
+ true,
+ "single",
+ "avoid-escape",
+ "jsx-double"
+ ],
+ "semicolon": [
+ true,
+ "always"
+ ],
+ "switch-default": false,
+ "trailing-comma": [
+ false
+ ],
+ "triple-equals": [
+ true,
+ "allow-null-check"
+ ],
+ "typedef-whitespace": [
+ true,
+ {
+ "call-signature": "nospace",
+ "index-signature": "nospace",
+ "parameter": "nospace",
+ "property-declaration": "nospace",
+ "variable-declaration": "nospace"
+ }
+ ],
+ "variable-name": [
+ true,
+ "ban-keywords"
+ ],
+ "whitespace": [
+ true,
+ "check-branch",
+ "check-decl",
+ "check-operator",
+ "check-separator",
+ "check-type"
+ ]
+ }
+} \ No newline at end of file
diff --git a/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/webpack.config.js b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/webpack.config.js
new file mode 100644
index 000000000..4c2922969
--- /dev/null
+++ b/node_modules/ts-loader/examples/fork-ts-checker-react-babel-karma-gulp/webpack.config.js
@@ -0,0 +1,65 @@
+'use strict';
+
+var path = require('path');
+
+var babelOptions = {
+ "presets": [
+ "react",
+ [
+ "es2015",
+ {
+ "modules": false
+ }
+ ],
+ "es2016"
+ ]
+};
+
+module.exports = {
+ cache: true,
+ entry: {
+ main: './src/main.tsx',
+ vendor: [
+ 'babel-polyfill',
+ 'fbemitter',
+ 'flux',
+ 'react',
+ 'react-dom'
+ ]
+ },
+ output: {
+ path: path.resolve(__dirname, './dist/scripts'),
+ filename: '[name].js',
+ chunkFilename: '[chunkhash].js'
+ },
+ module: {
+ rules: [{
+ test: /\.ts(x?)$/,
+ exclude: /node_modules/,
+ use: [
+ {
+ loader: 'babel-loader',
+ options: babelOptions
+ },
+ {
+ loader: 'ts-loader',
+ options: { transpileOnly: true }
+ }
+ ]
+ }, {
+ test: /\.js$/,
+ exclude: /node_modules/,
+ use: [
+ {
+ loader: 'babel-loader',
+ options: babelOptions
+ }
+ ]
+ }]
+ },
+ plugins: [
+ ],
+ resolve: {
+ extensions: ['.ts', '.tsx', '.js']
+ },
+};
diff --git a/node_modules/ts-loader/examples/fork-ts-checker/package.json b/node_modules/ts-loader/examples/fork-ts-checker/package.json
new file mode 100644
index 000000000..ee7197974
--- /dev/null
+++ b/node_modules/ts-loader/examples/fork-ts-checker/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "webpack2-fork-ts-checker",
+ "main": "index.js",
+ "version": "1.0.0",
+ "scripts": {
+ "start": "./node_modules/.bin/webpack --watch"
+ },
+ "devDependencies": {
+ "fork-ts-checker-webpack-plugin": "^0.1.2",
+ "ts-loader": "^2.0.3",
+ "typescript": "^2.2.2",
+ "webpack": "^2.2.0"
+ }
+}
diff --git a/node_modules/ts-loader/examples/fork-ts-checker/tsconfig.json b/node_modules/ts-loader/examples/fork-ts-checker/tsconfig.json
new file mode 100644
index 000000000..655163c00
--- /dev/null
+++ b/node_modules/ts-loader/examples/fork-ts-checker/tsconfig.json
@@ -0,0 +1,4 @@
+{
+ "compilerOptions": {
+ }
+}
diff --git a/node_modules/ts-loader/examples/fork-ts-checker/webpack.config.js b/node_modules/ts-loader/examples/fork-ts-checker/webpack.config.js
new file mode 100644
index 000000000..bac2155e0
--- /dev/null
+++ b/node_modules/ts-loader/examples/fork-ts-checker/webpack.config.js
@@ -0,0 +1,32 @@
+'use strict';
+
+var process = require('process');
+var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
+
+module.exports = {
+ context: __dirname, // to automatically find tsconfig.json
+ entry: './src/index.ts',
+ output: { filename: 'index.js' },
+ module: {
+ rules: [
+ {
+ test: /\.tsx?$/,
+ loader: 'ts-loader',
+ options: {
+ transpileOnly: true // IMPORTANT! use transpileOnly mode to speed-up compilation
+ }
+ }
+ ]
+ },
+ resolve: {
+ extensions: [ '.ts', '.tsx' ]
+ },
+ plugins: [
+ new ForkTsCheckerWebpackPlugin({
+ tslint: false, // disable tslint support
+ watch: './src', // optional but improves performance (less stat calls)
+ workers: ForkTsCheckerWebpackPlugin.TWO_CPUS_FREE, // use multi-process mode, leave 2 cpu's free for builder and system
+ blockEmit: process.env.NODE_ENV === 'production' // for production make it synchronous
+ })
+ ]
+};
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/README.md b/node_modules/ts-loader/examples/react-babel-karma-gulp/README.md
index 5d52ccbb8..e7a0cb064 100644
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/README.md
+++ b/node_modules/ts-loader/examples/react-babel-karma-gulp/README.md
@@ -13,3 +13,4 @@ This will:
1. Download the npm packages you need (including the type definitions from DefinitelyTyped)
2. Compile the code and serve it up at [http://localhost:8080](http://localhost:8080)
+
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/clean.js b/node_modules/ts-loader/examples/react-babel-karma-gulp/gulp/clean.js
index c51b4e416..c51b4e416 100644
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/clean.js
+++ b/node_modules/ts-loader/examples/react-babel-karma-gulp/gulp/clean.js
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/inject.js b/node_modules/ts-loader/examples/react-babel-karma-gulp/gulp/inject.js
index e4133e565..e4133e565 100644
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/inject.js
+++ b/node_modules/ts-loader/examples/react-babel-karma-gulp/gulp/inject.js
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/staticFiles.js b/node_modules/ts-loader/examples/react-babel-karma-gulp/gulp/staticFiles.js
index 20327f272..20327f272 100644
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/staticFiles.js
+++ b/node_modules/ts-loader/examples/react-babel-karma-gulp/gulp/staticFiles.js
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/tests.js b/node_modules/ts-loader/examples/react-babel-karma-gulp/gulp/tests.js
index 05af0a551..05af0a551 100644
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/tests.js
+++ b/node_modules/ts-loader/examples/react-babel-karma-gulp/gulp/tests.js
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/webpack.js b/node_modules/ts-loader/examples/react-babel-karma-gulp/gulp/webpack.js
index 2ecbf42ea..2ecbf42ea 100644
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/webpack.js
+++ b/node_modules/ts-loader/examples/react-babel-karma-gulp/gulp/webpack.js
diff --git a/node_modules/ts-loader/examples/react-babel-karma-gulp/gulpFile.js b/node_modules/ts-loader/examples/react-babel-karma-gulp/gulpFile.js
new file mode 100644
index 000000000..03c6a6b4e
--- /dev/null
+++ b/node_modules/ts-loader/examples/react-babel-karma-gulp/gulpFile.js
@@ -0,0 +1,49 @@
+'use strict';
+
+var gulp = require('gulp');
+var gutil = require('gulp-util');
+var webpack = require('./gulp/webpack');
+var staticFiles = require('./gulp/staticFiles');
+var tests = require('./gulp/tests');
+var clean = require('./gulp/clean');
+var inject = require('./gulp/inject');
+
+gulp.task('delete-dist', function (done) {
+ clean.run(done);
+});
+
+gulp.task('build-js', ['delete-dist'], function(done) {
+ webpack.build().then(function() { done(); });
+});
+
+gulp.task('build-other', ['delete-dist'], function() {
+ staticFiles.build();
+});
+
+gulp.task('build', ['build-js', 'build-other'], function () {
+ inject.build();
+});
+
+gulp.task('watch', ['delete-dist'], function(done) {
+ Promise.all([
+ webpack.watch()
+ ]).then(function() {
+ gutil.log('Now that initial assets (js and css) are generated inject will start...');
+ inject.watch();
+ done();
+ }).catch(function(error) {
+ gutil.log('Problem generating initial assets (js and css)', error);
+ });
+
+ staticFiles.watch();
+ tests.watch();
+});
+
+gulp.task('watch-and-serve', ['watch'], function() {
+ // local as not required for build
+ var express = require('express')
+ var app = express()
+
+ app.use(express.static('dist', {'index': 'index.html'}))
+ app.listen(8080);
+});
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/karma.conf.js b/node_modules/ts-loader/examples/react-babel-karma-gulp/karma.conf.js
index f07fbc179..f07fbc179 100644
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/karma.conf.js
+++ b/node_modules/ts-loader/examples/react-babel-karma-gulp/karma.conf.js
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/package.json b/node_modules/ts-loader/examples/react-babel-karma-gulp/package.json
index f90bfb4df..52ed4c468 100644
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/package.json
+++ b/node_modules/ts-loader/examples/react-babel-karma-gulp/package.json
@@ -31,11 +31,12 @@
"@types/jasmine": "^2.5.35",
"@types/react": "^0.14.41",
"@types/react-addons-test-utils": "^0.14.15",
+ "@types/react-test-renderer": "^15.5.0",
"@types/react-bootstrap": "0.0.33",
"@types/react-dom": "^0.14.18",
"babel": "^6.0.0",
"babel-core": "^6.0.0",
- "babel-loader": "^6.0.0",
+ "babel-loader": "^7.0.0",
"babel-preset-es2015": "^6.0.0",
"babel-preset-es2016": "^6.16.0",
"babel-preset-react": "^6.0.0",
@@ -65,6 +66,8 @@
"karma-sourcemap-loader": "^0.3.6",
"karma-webpack": "^2.0.1",
"phantomjs-prebuilt": "^2.1.4",
+ "react-addons-test-utils": "^15.3.1",
+ "react-test-renderer": "^15.5.4",
"ts-loader": "^2.0.0",
"typescript": "^2.1.4",
"webpack": "^2.2.0",
@@ -76,7 +79,6 @@
"flux": "^2.0.3",
"fbemitter": "^2.0.2",
"react": "^15.4.1",
- "react-addons-test-utils": "^15.4.1",
"react-dom": "^15.4.1"
}
}
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/tsconfig.json b/node_modules/ts-loader/examples/react-babel-karma-gulp/tsconfig.json
index c3a732c12..c3a732c12 100644
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/tsconfig.json
+++ b/node_modules/ts-loader/examples/react-babel-karma-gulp/tsconfig.json
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/webpack.config.js b/node_modules/ts-loader/examples/react-babel-karma-gulp/webpack.config.js
index 60620a83f..60620a83f 100644
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/webpack.config.js
+++ b/node_modules/ts-loader/examples/react-babel-karma-gulp/webpack.config.js
diff --git a/node_modules/ts-loader/examples/webpack2-react-cdn-simple/index.html b/node_modules/ts-loader/examples/react-cdn-simple/index.html
index 09651107e..09651107e 100644
--- a/node_modules/ts-loader/examples/webpack2-react-cdn-simple/index.html
+++ b/node_modules/ts-loader/examples/react-cdn-simple/index.html
diff --git a/node_modules/ts-loader/examples/webpack2-react-cdn-simple/package.json b/node_modules/ts-loader/examples/react-cdn-simple/package.json
index 33b29639d..33b29639d 100644
--- a/node_modules/ts-loader/examples/webpack2-react-cdn-simple/package.json
+++ b/node_modules/ts-loader/examples/react-cdn-simple/package.json
diff --git a/node_modules/ts-loader/examples/webpack2-react-cdn-simple/tsconfig.json b/node_modules/ts-loader/examples/react-cdn-simple/tsconfig.json
index b48ecdfb6..b48ecdfb6 100644
--- a/node_modules/ts-loader/examples/webpack2-react-cdn-simple/tsconfig.json
+++ b/node_modules/ts-loader/examples/react-cdn-simple/tsconfig.json
diff --git a/node_modules/ts-loader/examples/webpack2-react-cdn-simple/webpack.config.js b/node_modules/ts-loader/examples/react-cdn-simple/webpack.config.js
index 7abb3171d..7abb3171d 100644
--- a/node_modules/ts-loader/examples/webpack2-react-cdn-simple/webpack.config.js
+++ b/node_modules/ts-loader/examples/react-cdn-simple/webpack.config.js
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/.npmignore b/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/.npmignore
deleted file mode 100644
index c8c6a02b7..000000000
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/.npmignore
+++ /dev/null
@@ -1,201 +0,0 @@
-## Ignore Visual Studio temporary files, build results, and
-## files generated by popular Visual Studio add-ons.
-
-# User-specific files
-*.suo
-*.user
-*.userosscache
-*.sln.docstates
-
-# User-specific files (MonoDevelop/Xamarin Studio)
-*.userprefs
-
-# Build results
-[Dd]ebug/
-[Dd]ebugPublic/
-[Rr]elease/
-[Rr]eleases/
-x64/
-x86/
-build/
-bld/
-[Bb]in/
-[Oo]bj/
-dist/
-
-# Visual Studo 2015 cache/options directory
-.vs/
-
-# MSTest test Results
-[Tt]est[Rr]esult*/
-[Bb]uild[Ll]og.*
-
-# NUNIT
-*.VisualState.xml
-TestResult.xml
-
-# JUnit test results
-test-results
-
-# Build Results of an ATL Project
-[Dd]ebugPS/
-[Rr]eleasePS/
-dlldata.c
-
-*_i.c
-*_p.c
-*_i.h
-*.ilk
-*.meta
-*.obj
-*.pch
-*.pdb
-*.pgc
-*.pgd
-*.rsp
-*.sbr
-*.tlb
-*.tli
-*.tlh
-*.tmp
-*.tmp_proj
-*.log
-*.vspscc
-*.vssscc
-.builds
-*.pidb
-*.svclog
-*.scc
-
-# Chutzpah Test files
-_Chutzpah*
-
-# Visual C++ cache files
-ipch/
-*.aps
-*.ncb
-*.opensdf
-*.sdf
-*.cachefile
-
-# Visual Studio profiler
-*.psess
-*.vsp
-*.vspx
-
-# TFS 2012 Local Workspace
-$tf/
-
-# Guidance Automation Toolkit
-*.gpState
-
-# ReSharper is a .NET coding add-in
-_ReSharper*/
-*.[Rr]e[Ss]harper
-*.DotSettings.user
-
-# JustCode is a .NET coding addin-in
-.JustCode
-
-# TeamCity is a build add-in
-_TeamCity*
-
-# DotCover is a Code Coverage Tool
-*.dotCover
-
-# NCrunch
-_NCrunch_*
-.*crunch*.local.xml
-
-# MightyMoose
-*.mm.*
-AutoTest.Net/
-
-# Web workbench (sass)
-.sass-cache/
-
-# Installshield output folder
-[Ee]xpress/
-
-# DocProject is a documentation generator add-in
-DocProject/buildhelp/
-DocProject/Help/*.HxT
-DocProject/Help/*.HxC
-DocProject/Help/*.hhc
-DocProject/Help/*.hhk
-DocProject/Help/*.hhp
-DocProject/Help/Html2
-DocProject/Help/html
-
-# Click-Once directory
-publish/
-
-# Publish Web Output
-*.[Pp]ublish.xml
-*.azurePubxml
-# TODO: Comment the next line if you want to checkin your web deploy settings
-# but database connection strings (with potential passwords) will be unencrypted
-*.pubxml
-*.publishproj
-
-# NuGet Packages
-*.nupkg
-# The packages folder can be ignored because of Package Restore
-**/packages/*
-# except build/, which is used as an MSBuild target.
-!**/packages/build/
-# Uncomment if necessary however generally it will be regenerated when needed
-#!**/packages/repositories.config
-
-# Windows Azure Build Output
-csx/
-*.build.csdef
-
-# Windows Store app package directory
-AppPackages/
-
-# Others
-*.[Cc]ache
-ClientBin/
-[Ss]tyle[Cc]op.*
-~$*
-*~
-*.dbmdl
-*.dbproj.schemaview
-*.pfx
-*.publishsettings
-node_modules/
-bower_components/
-typings/
-
-# RIA/Silverlight projects
-Generated_Code/
-
-# Backup & report files from converting an old project file
-# to a newer Visual Studio version. Backup files are not needed,
-# because we have git ;-)
-_UpgradeReport_Files/
-Backup*/
-UpgradeLog*.XML
-UpgradeLog*.htm
-
-# SQL Server files
-*.mdf
-*.ldf
-
-# Business Intelligence projects
-*.rdl.data
-*.bim.layout
-*.bim_*.settings
-
-# Microsoft Fakes
-FakesAssemblies/
-
-# Node.js Tools for Visual Studio
-.ntvs_analysis.dat
-
-# Visual Studio 6 build log
-*.plg
-
-# Visual Studio 6 workspace options file
-*.opt
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/LICENSE b/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/LICENSE
deleted file mode 100644
index d5a917f49..000000000
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 John Reilly
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/components/App.tsx b/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/components/App.tsx
deleted file mode 100644
index e74cc9538..000000000
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/components/App.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import React from 'react';
-import FBEmitter from "fbemitter";
-
-import GreetingStore from '../stores/GreetingStore';
-import GreetingState from '../types/GreetingState';
-import WhoToGreet from './WhoToGreet';
-import Greeting from './Greeting';
-
-class App extends React.Component<{}, GreetingState> {
- eventSubscription: FBEmitter.EventSubscription;
- constructor(props: {}) {
- super(props);
- this.state = this.getStateFromStores();
- }
- private onChange = () => {
- this.setState(this.getStateFromStores());
- }
-
- public componentWillMount() {
- this.eventSubscription = GreetingStore.addChangeListener(this.onChange);
- }
-
- public componentWillUnmount() {
- this.eventSubscription.remove();
- }
-
- render() {
- const { greetings, newGreeting } = this.state;
- return (
- <div className="container-fluid">
- <h1>Hello People!</h1>
-
- <WhoToGreet newGreeting={ newGreeting } />
-
- { greetings.map((g, index) => <Greeting key={ index } targetOfGreeting={ g } />) }
- </div>
- );
- }
-
- private getStateFromStores() {
- return GreetingStore.getState();
- }
-}
-
-export default App;
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/components/Greeting.tsx b/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/components/Greeting.tsx
deleted file mode 100644
index 7150537c7..000000000
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/components/Greeting.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import React from 'react';
-
-import * as GreetingActions from '../actions/GreetingActions';
-
-interface Props {
- key: number;
- targetOfGreeting: string;
-}
-
-class Greeting extends React.Component<Props, any> {
- constructor(props: Props) {
- super(props);
- }
-
- static propTypes: React.ValidationMap<Props> = {
- targetOfGreeting: React.PropTypes.string.isRequired
- }
-
- render() {
- return (
- <p>
- Hello { this.props.targetOfGreeting }!
-
- <button className="btn btn-default btn-danger"
- onClick={ this._onClick }>
- Remove
- </button>
- </p>
- );
- }
-
- _onClick = (_event: React.MouseEvent<HTMLButtonElement>) => {
- GreetingActions.removeGreeting(this.props.targetOfGreeting);
- }
-}
-
-export default Greeting;
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/components/WhoToGreet.tsx b/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/components/WhoToGreet.tsx
deleted file mode 100644
index 9f3deda94..000000000
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/components/WhoToGreet.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-import React from 'react';
-
-import * as GreetingActions from '../actions/GreetingActions';
-
-interface Props {
- newGreeting: string;
-}
-
-class WhoToGreet extends React.Component<Props, any> {
- constructor(props: Props) {
- super(props);
- }
-
- static propTypes: React.ValidationMap<Props> = {
- newGreeting: React.PropTypes.string.isRequired
- }
-
- render() {
- return (
- <form role="form">
- <div className="form-group">
- <input type="text" className="form-control" placeholder="Who would you like to greet?"
- value={ this.props.newGreeting }
- onChange={ this._handleNewGreetingChange } />
- <button type="submit" className="btn btn-default btn-primary"
- onClick={ this._onSubmit }
- disabled={ this._preventSubmission }>
- Add greeting
- </button>
- </div>
- </form>
- );
- }
-
- get _preventSubmission() {
- return !this.props.newGreeting;
- }
-
- _handleNewGreetingChange = (event: React.FormEvent<HTMLInputElement>) => {
- const newGreeting = (event.target as HTMLInputElement).value;
- GreetingActions.newGreetingChanged(newGreeting);
- }
-
- _onSubmit = (event: React.FormEvent<HTMLButtonElement>) => {
- event.preventDefault();
-
- if (!this._preventSubmission) {
- GreetingActions.addGreeting(this.props.newGreeting);
- }
- }
-}
-
-export default WhoToGreet;
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/index.html b/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/index.html
deleted file mode 100644
index a3f53185a..000000000
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/index.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!doctype html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
-
- <title>TypeScript, Babel, React, Flux, and Karma</title>
-
- <!-- inject:css -->
- <!-- endinject -->
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
- </head>
- <body>
- <div id="content"></div>
- <!-- inject:js -->
- <!-- endinject -->
- </body>
-</html>
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/main.tsx b/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/main.tsx
deleted file mode 100644
index 7e957bd47..000000000
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/src/main.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-import 'babel-polyfill';
-import React from 'react';
-import ReactDOM from 'react-dom';
-
-import App from './components/App';
-
-ReactDOM.render(<App />, document.getElementById('content'));
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/test/components/App.tests.tsx b/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/test/components/App.tests.tsx
deleted file mode 100644
index aa9612416..000000000
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/test/components/App.tests.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import React from 'react';
-import TestUtils from 'react-addons-test-utils';
-
-import App from '../../src/components/App';
-import WhoToGreet from '../../src/components/WhoToGreet';
-import Greeting from '../../src/components/Greeting';
-import GreetingStore from '../../src/stores/GreetingStore';
-
-describe('App', () => {
- it('renders expected HTML', () => {
- const app = render({ greetings: ['James'], newGreeting: 'Benjamin' });
- expect(app).toEqual(
- <div className="container-fluid">
- <h1>Hello People!</h1>
-
- <WhoToGreet newGreeting={ 'Benjamin' } />
-
- { [
- <Greeting key={ 0 } targetOfGreeting="James" />
- ] }
- </div>
- );
- });
-
- function render(state: any) {
- const shallowRenderer = TestUtils.createRenderer();
- spyOn(GreetingStore, 'getState').and.returnValue(state);
-
- shallowRenderer.render(<App />);
- return shallowRenderer.getRenderOutput();
- }
-});
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/test/components/Greeting.tests.tsx b/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/test/components/Greeting.tests.tsx
deleted file mode 100644
index 911a6cba2..000000000
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/test/components/Greeting.tests.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import React from 'react';
-import TestUtils from 'react-addons-test-utils';
-
-import Greeting from '../../src/components/Greeting';
-import * as GreetingActions from '../../src/actions/GreetingActions';
-
-describe('Greeting', () => {
- let handleSelectionChangeSpy: jasmine.Spy;
- beforeEach(() => {
- handleSelectionChangeSpy = jasmine.createSpy('handleSelectionChange');
- });
-
- it('given a targetOfGreeting of \'James\' it renders a p containing a greeting and a remove button', () => {
- const targetOfGreeting = 'James';
-
- const p = render({ targetOfGreeting });
- expect(p.type).toBe('p');
- expect(p.props.children[0]).toBe('Hello ');
- expect(p.props.children[1]).toBe('James');
- expect(p.props.children[2]).toBe('!');
-
- const [ , , , button ] = p.props.children;
-
- expect(button.type).toBe('button');
- expect(button.props.className).toBe('btn btn-default btn-danger');
- expect(button.props.children).toBe('Remove');
- });
-
- it('button onClick triggers an removeGreeting action', () => {
- const targetOfGreeting = 'Benjamin';
- const p = render({ targetOfGreeting });
- const [ , , , button ] = p.props.children;
- spyOn(GreetingActions, 'removeGreeting');
-
- button.props.onClick();
-
- expect(GreetingActions.removeGreeting).toHaveBeenCalledWith(targetOfGreeting);
- });
-
- function render({ targetOfGreeting }: { targetOfGreeting: string; }) {
- const shallowRenderer = TestUtils.createRenderer();
- shallowRenderer.render(<Greeting key={ 0 } targetOfGreeting={ targetOfGreeting } />);
- return shallowRenderer.getRenderOutput();
- }
-});
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/test/components/WhoToGreet.tests.tsx b/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/test/components/WhoToGreet.tests.tsx
deleted file mode 100644
index 01398952e..000000000
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/test/components/WhoToGreet.tests.tsx
+++ /dev/null
@@ -1,68 +0,0 @@
-import React from 'react';
-import TestUtils from 'react-addons-test-utils';
-
-import WhoToGreet from '../../src/components/WhoToGreet';
-import * as GreetingActions from '../../src/actions/GreetingActions';
-
-describe('WhoToGreet', () => {
- let handleSelectionChangeSpy: jasmine.Spy;
- beforeEach(() => {
- handleSelectionChangeSpy = jasmine.createSpy('handleSelectionChange');
- });
-
- it('given a newGreeting then it renders a form containing an input containing that text and an add button', () => {
- const newGreeting = 'James';
-
- const form = render({ newGreeting });
- expect(form.type).toBe('form');
- expect(form.props.role).toBe('form');
-
- const formGroup = form.props.children;
- expect(formGroup.type).toBe('div');
- expect(formGroup.props.className).toBe('form-group');
-
- const [ input, button ] = formGroup.props.children;
-
- expect(input.type).toBe('input');
- expect(input.props.type).toBe('text');
- expect(input.props.className).toBe('form-control');
- expect(input.props.placeholder).toBe('Who would you like to greet?');
- expect(input.props.value).toBe(newGreeting);
-
- expect(button.type).toBe('button');
- expect(button.props.type).toBe('submit');
- expect(button.props.className).toBe('btn btn-default btn-primary');
- expect(button.props.disabled).toBe(false);
- expect(button.props.children).toBe('Add greeting');
- });
-
- it('input onChange triggers a newGreetingChanged action', () => {
- const newGreeting = 'Benjamin';
- const form = render({ newGreeting });
- const formGroup = form.props.children;
- const [ input ] = formGroup.props.children;
- spyOn(GreetingActions, 'newGreetingChanged');
-
- input.props.onChange({ target: { value: newGreeting }});
-
- expect(GreetingActions.newGreetingChanged).toHaveBeenCalledWith(newGreeting);
- });
-
- it('button onClick triggers an addGreeting action', () => {
- const newGreeting = 'Benjamin';
- const form = render({ newGreeting });
- const formGroup = form.props.children;
- const [ , button ] = formGroup.props.children;
- spyOn(GreetingActions, 'addGreeting');
-
- button.props.onClick({ preventDefault: () => {} });
-
- expect(GreetingActions.addGreeting).toHaveBeenCalledWith(newGreeting);
- });
-
- function render({ newGreeting }: { newGreeting: string }) {
- const shallowRenderer = TestUtils.createRenderer();
- shallowRenderer.render(<WhoToGreet newGreeting={ newGreeting } />);
- return shallowRenderer.getRenderOutput();
- }
-});
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/test/main.js b/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/test/main.js
deleted file mode 100644
index 1b332a7c0..000000000
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/test/main.js
+++ /dev/null
@@ -1,5 +0,0 @@
-/* eslint-disable */
-import 'babel-polyfill';
-
-const testsContext = require.context('./', true, /\.tests\.ts(x?)$/);
-testsContext.keys().forEach(testsContext); \ No newline at end of file
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/.eslintrc b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/.eslintrc
index f7aa388ad..f7aa388ad 100644
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/.eslintrc
+++ b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/.eslintrc
diff --git a/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/clean.js b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/clean.js
new file mode 100644
index 000000000..c51b4e416
--- /dev/null
+++ b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/clean.js
@@ -0,0 +1,29 @@
+'use strict';
+
+var del = require('del');
+var gutil = require('gulp-util');
+var fs = require('fs');
+
+function run(done) {
+ fs.stat('./dist', function(err){
+ if (err) {
+ // Never existed
+ done();
+ }
+ else {
+ del(['./dist'], { force: true })
+ .then(function(paths) {
+ gutil.log('Deleted files/folders:\n', paths.join('\n'));
+ done();
+ })
+ .catch(function(error) {
+ gutil.log('Problem deleting:\n', error);
+ done();
+ });
+ }
+ });
+}
+
+module.exports = {
+ run: function(done) { return run(done); }
+};
diff --git a/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/inject.js b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/inject.js
new file mode 100644
index 000000000..e4133e565
--- /dev/null
+++ b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/inject.js
@@ -0,0 +1,55 @@
+'use strict';
+
+var gulp = require('gulp');
+var inject = require('gulp-inject');
+var glob = require('glob');
+
+function injectIndex(options) {
+ function run() {
+ var target = gulp.src('./src/index.html');
+ var sources = gulp.src([
+ //'./dist/styles/main*.css',
+ './dist/scripts/vendor*.js',
+ './dist/scripts/main*.js'
+ ], { read: false });
+
+ return target
+ .pipe(inject(sources, { ignorePath: '/dist/', addRootSlash: false, removeTags: true }))
+ .pipe(gulp.dest('./dist'));
+ }
+
+ var jsCssGlob = 'dist/**/*.{js,css}';
+
+ function checkForInitialFilesThenRun() {
+ glob(jsCssGlob, function (er, files) {
+ var filesWeNeed = ['dist/scripts/main', 'dist/scripts/vendor'/*, 'dist/styles/main'*/];
+
+ function fileIsPresent(fileWeNeed) {
+ return files.some(function(file) {
+ return file.indexOf(fileWeNeed) !== -1;
+ });
+ }
+
+ if (filesWeNeed.every(fileIsPresent)) {
+ run('initial build');
+ } else {
+ checkForInitialFilesThenRun();
+ }
+ });
+ }
+
+ checkForInitialFilesThenRun();
+
+ if (options.shouldWatch) {
+ gulp.watch(jsCssGlob, function(evt) {
+ if (evt.path && evt.type === 'changed') {
+ run(evt.path);
+ }
+ });
+ }
+}
+
+module.exports = {
+ build: function() { return injectIndex({ shouldWatch: false }); },
+ watch: function() { return injectIndex({ shouldWatch: true }); }
+};
diff --git a/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/staticFiles.js b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/staticFiles.js
new file mode 100644
index 000000000..20327f272
--- /dev/null
+++ b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/staticFiles.js
@@ -0,0 +1,31 @@
+'use strict';
+
+var gulp = require('gulp');
+var cache = require('gulp-cached');
+
+var targets = [
+ { description: 'INDEX', src: './src/index.html', dest: './dist' }
+];
+
+function copy(options) {
+ function run(target) {
+ gulp.src(target.src)
+ .pipe(cache(target.description))
+ .pipe(gulp.dest(target.dest));
+ }
+
+ function watch(target) {
+ gulp.watch(target.src, function() { run(target); });
+ }
+
+ targets.forEach(run);
+
+ if (options.shouldWatch) {
+ targets.forEach(watch);
+ }
+}
+
+module.exports = {
+ build: function() { return copy({ shouldWatch: false }); },
+ watch: function() { return copy({ shouldWatch: true }); }
+};
diff --git a/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/tests.js b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/tests.js
new file mode 100644
index 000000000..05af0a551
--- /dev/null
+++ b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/tests.js
@@ -0,0 +1,45 @@
+'use strict';
+
+var Server = require('karma').Server;
+var path = require('path');
+var gutil = require('gulp-util');
+
+function runTests(options) {
+ // Documentation: https://karma-runner.github.io/0.13/dev/public-api.html
+ var karmaConfig = {
+ configFile: path.join(__dirname, '../karma.conf.js'),
+ singleRun: !options.shouldWatch,
+
+ plugins: ['karma-webpack', 'karma-jasmine', 'karma-mocha-reporter', 'karma-sourcemap-loader', 'karma-phantomjs-launcher'],
+ reporters: ['mocha']
+ };
+
+ if (options.done) {
+ karmaConfig.plugins.push('karma-junit-reporter');
+ karmaConfig.reporters.push('junit');
+ } else {
+ karmaConfig.plugins.push('karma-notify-reporter');
+ karmaConfig.reporters.push('notify');
+ }
+
+ new Server(karmaConfig, karmaCompleted).start();
+
+ function karmaCompleted(exitCode) {
+ if (options.done) {
+ if (exitCode === 1) {
+ gutil.log('Karma: tests failed with code ' + exitCode);
+ } else {
+ gutil.log('Karma completed!');
+ }
+ options.done();
+ }
+ else {
+ process.exit(exitCode);
+ }
+ }
+}
+
+module.exports = {
+ run: function(done) { return runTests({ shouldWatch: false, done: done }); },
+ watch: function() { return runTests({ shouldWatch: true }); }
+};
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/webpack.js b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/webpack.js
index b0de5c558..b0de5c558 100644
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulp/webpack.js
+++ b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulp/webpack.js
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulpFile.js b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulpFile.js
index b7b3abe73..b7b3abe73 100644
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/gulpFile.js
+++ b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/gulpFile.js
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/karma.conf.js b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/karma.conf.js
index 72579927f..72579927f 100644
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/karma.conf.js
+++ b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/karma.conf.js
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/package.json b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/package.json
index 131bb2911..131bb2911 100644
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/package.json
+++ b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/package.json
diff --git a/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/tsconfig.json b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/tsconfig.json
new file mode 100644
index 000000000..c3a732c12
--- /dev/null
+++ b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/tsconfig.json
@@ -0,0 +1,22 @@
+{
+ "compileOnSave": false,
+ "compilerOptions": {
+ "allowSyntheticDefaultImports": true,
+ "lib": [
+ "dom",
+ "es2015",
+ "es2016"
+ ],
+ "jsx": "preserve",
+ "target": "es2016",
+ "module": "es2015",
+ "moduleResolution": "node",
+ "noImplicitAny": true,
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "removeComments": false,
+ "preserveConstEnums": true,
+ "sourceMap": true,
+ "skipLibCheck": true
+ }
+} \ No newline at end of file
diff --git a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/webpack.config.js b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/webpack.config.js
index cc26b27b7..cc26b27b7 100644
--- a/node_modules/ts-loader/examples/webpack1-gulp-react-flux-babel-karma/webpack.config.js
+++ b/node_modules/ts-loader/examples/webpack1/react-babel-karma-gulp/webpack.config.js
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/.npmignore b/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/.npmignore
deleted file mode 100644
index c8c6a02b7..000000000
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/.npmignore
+++ /dev/null
@@ -1,201 +0,0 @@
-## Ignore Visual Studio temporary files, build results, and
-## files generated by popular Visual Studio add-ons.
-
-# User-specific files
-*.suo
-*.user
-*.userosscache
-*.sln.docstates
-
-# User-specific files (MonoDevelop/Xamarin Studio)
-*.userprefs
-
-# Build results
-[Dd]ebug/
-[Dd]ebugPublic/
-[Rr]elease/
-[Rr]eleases/
-x64/
-x86/
-build/
-bld/
-[Bb]in/
-[Oo]bj/
-dist/
-
-# Visual Studo 2015 cache/options directory
-.vs/
-
-# MSTest test Results
-[Tt]est[Rr]esult*/
-[Bb]uild[Ll]og.*
-
-# NUNIT
-*.VisualState.xml
-TestResult.xml
-
-# JUnit test results
-test-results
-
-# Build Results of an ATL Project
-[Dd]ebugPS/
-[Rr]eleasePS/
-dlldata.c
-
-*_i.c
-*_p.c
-*_i.h
-*.ilk
-*.meta
-*.obj
-*.pch
-*.pdb
-*.pgc
-*.pgd
-*.rsp
-*.sbr
-*.tlb
-*.tli
-*.tlh
-*.tmp
-*.tmp_proj
-*.log
-*.vspscc
-*.vssscc
-.builds
-*.pidb
-*.svclog
-*.scc
-
-# Chutzpah Test files
-_Chutzpah*
-
-# Visual C++ cache files
-ipch/
-*.aps
-*.ncb
-*.opensdf
-*.sdf
-*.cachefile
-
-# Visual Studio profiler
-*.psess
-*.vsp
-*.vspx
-
-# TFS 2012 Local Workspace
-$tf/
-
-# Guidance Automation Toolkit
-*.gpState
-
-# ReSharper is a .NET coding add-in
-_ReSharper*/
-*.[Rr]e[Ss]harper
-*.DotSettings.user
-
-# JustCode is a .NET coding addin-in
-.JustCode
-
-# TeamCity is a build add-in
-_TeamCity*
-
-# DotCover is a Code Coverage Tool
-*.dotCover
-
-# NCrunch
-_NCrunch_*
-.*crunch*.local.xml
-
-# MightyMoose
-*.mm.*
-AutoTest.Net/
-
-# Web workbench (sass)
-.sass-cache/
-
-# Installshield output folder
-[Ee]xpress/
-
-# DocProject is a documentation generator add-in
-DocProject/buildhelp/
-DocProject/Help/*.HxT
-DocProject/Help/*.HxC
-DocProject/Help/*.hhc
-DocProject/Help/*.hhk
-DocProject/Help/*.hhp
-DocProject/Help/Html2
-DocProject/Help/html
-
-# Click-Once directory
-publish/
-
-# Publish Web Output
-*.[Pp]ublish.xml
-*.azurePubxml
-# TODO: Comment the next line if you want to checkin your web deploy settings
-# but database connection strings (with potential passwords) will be unencrypted
-*.pubxml
-*.publishproj
-
-# NuGet Packages
-*.nupkg
-# The packages folder can be ignored because of Package Restore
-**/packages/*
-# except build/, which is used as an MSBuild target.
-!**/packages/build/
-# Uncomment if necessary however generally it will be regenerated when needed
-#!**/packages/repositories.config
-
-# Windows Azure Build Output
-csx/
-*.build.csdef
-
-# Windows Store app package directory
-AppPackages/
-
-# Others
-*.[Cc]ache
-ClientBin/
-[Ss]tyle[Cc]op.*
-~$*
-*~
-*.dbmdl
-*.dbproj.schemaview
-*.pfx
-*.publishsettings
-node_modules/
-bower_components/
-typings/
-
-# RIA/Silverlight projects
-Generated_Code/
-
-# Backup & report files from converting an old project file
-# to a newer Visual Studio version. Backup files are not needed,
-# because we have git ;-)
-_UpgradeReport_Files/
-Backup*/
-UpgradeLog*.XML
-UpgradeLog*.htm
-
-# SQL Server files
-*.mdf
-*.ldf
-
-# Business Intelligence projects
-*.rdl.data
-*.bim.layout
-*.bim_*.settings
-
-# Microsoft Fakes
-FakesAssemblies/
-
-# Node.js Tools for Visual Studio
-.ntvs_analysis.dat
-
-# Visual Studio 6 build log
-*.plg
-
-# Visual Studio 6 workspace options file
-*.opt
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/LICENSE b/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/LICENSE
deleted file mode 100644
index d5a917f49..000000000
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 John Reilly
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/.eslintrc b/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/.eslintrc
deleted file mode 100644
index f7aa388ad..000000000
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/gulp/.eslintrc
+++ /dev/null
@@ -1,73 +0,0 @@
-{
- "root": true,
- "env": {
- "commonjs": true,
- },
- "rules": {
- "camelcase": 2,
- "comma-spacing": 1,
- "consistent-return": 2,
- "curly": [ 2, "all" ],
- "dot-notation": [
- 2,
- { "allowKeywords": true }
- ],
- "eol-last": 2,
- "eqeqeq": 2,
- "keyword-spacing": 2,
- "new-cap": 2,
- "new-parens": 2,
- "no-alert": 2,
- "no-array-constructor": 2,
- "no-caller": 2,
- "no-catch-shadow": 2,
- "no-eval": 2,
- "no-extend-native": 2,
- "no-extra-bind": 2,
- "no-extra-parens": [ 2, "functions" ],
- "no-implied-eval": 2,
- "no-iterator": 2,
- "no-labels": 2,
- "no-label-var": 2,
- "no-lone-blocks": 2,
- "no-loop-func": 2,
- "no-multi-str": 2,
- "no-native-reassign": 2,
- "no-new": 2,
- "no-new-func": 2,
- "no-new-object": 2,
- "no-new-wrappers": 2,
- "no-octal-escape": 2,
- "no-proto": 2,
- "no-return-assign": 2,
- "no-script-url": 2,
- "no-sequences": 2,
- "no-shadow": 2,
- "no-shadow-restricted-names": 2,
- "no-spaced-func": 2,
- "no-trailing-spaces": 1,
- "no-undef-init": 2,
- "no-unused-expressions": 2,
- "no-use-before-define": [ 2, "nofunc" ],
- "no-with": 2,
- "quotes": [ 1, "single" ],
- "semi": 2,
- "semi-spacing": [
- 2,
- {
- "before": false,
- "after": true
- }
- ],
- "space-infix-ops": 2,
- "space-unary-ops": [
- 2,
- {
- "words": true,
- "nonwords": false
- }
- ],
- "strict": [ 2, "global" ],
- "yoda": [ 2, "never" ]
- }
-}
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/components/App.tsx b/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/components/App.tsx
deleted file mode 100644
index e74cc9538..000000000
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/components/App.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import React from 'react';
-import FBEmitter from "fbemitter";
-
-import GreetingStore from '../stores/GreetingStore';
-import GreetingState from '../types/GreetingState';
-import WhoToGreet from './WhoToGreet';
-import Greeting from './Greeting';
-
-class App extends React.Component<{}, GreetingState> {
- eventSubscription: FBEmitter.EventSubscription;
- constructor(props: {}) {
- super(props);
- this.state = this.getStateFromStores();
- }
- private onChange = () => {
- this.setState(this.getStateFromStores());
- }
-
- public componentWillMount() {
- this.eventSubscription = GreetingStore.addChangeListener(this.onChange);
- }
-
- public componentWillUnmount() {
- this.eventSubscription.remove();
- }
-
- render() {
- const { greetings, newGreeting } = this.state;
- return (
- <div className="container-fluid">
- <h1>Hello People!</h1>
-
- <WhoToGreet newGreeting={ newGreeting } />
-
- { greetings.map((g, index) => <Greeting key={ index } targetOfGreeting={ g } />) }
- </div>
- );
- }
-
- private getStateFromStores() {
- return GreetingStore.getState();
- }
-}
-
-export default App;
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/components/Greeting.tsx b/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/components/Greeting.tsx
deleted file mode 100644
index 7150537c7..000000000
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/components/Greeting.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import React from 'react';
-
-import * as GreetingActions from '../actions/GreetingActions';
-
-interface Props {
- key: number;
- targetOfGreeting: string;
-}
-
-class Greeting extends React.Component<Props, any> {
- constructor(props: Props) {
- super(props);
- }
-
- static propTypes: React.ValidationMap<Props> = {
- targetOfGreeting: React.PropTypes.string.isRequired
- }
-
- render() {
- return (
- <p>
- Hello { this.props.targetOfGreeting }!
-
- <button className="btn btn-default btn-danger"
- onClick={ this._onClick }>
- Remove
- </button>
- </p>
- );
- }
-
- _onClick = (_event: React.MouseEvent<HTMLButtonElement>) => {
- GreetingActions.removeGreeting(this.props.targetOfGreeting);
- }
-}
-
-export default Greeting;
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/components/WhoToGreet.tsx b/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/components/WhoToGreet.tsx
deleted file mode 100644
index 9f3deda94..000000000
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/components/WhoToGreet.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-import React from 'react';
-
-import * as GreetingActions from '../actions/GreetingActions';
-
-interface Props {
- newGreeting: string;
-}
-
-class WhoToGreet extends React.Component<Props, any> {
- constructor(props: Props) {
- super(props);
- }
-
- static propTypes: React.ValidationMap<Props> = {
- newGreeting: React.PropTypes.string.isRequired
- }
-
- render() {
- return (
- <form role="form">
- <div className="form-group">
- <input type="text" className="form-control" placeholder="Who would you like to greet?"
- value={ this.props.newGreeting }
- onChange={ this._handleNewGreetingChange } />
- <button type="submit" className="btn btn-default btn-primary"
- onClick={ this._onSubmit }
- disabled={ this._preventSubmission }>
- Add greeting
- </button>
- </div>
- </form>
- );
- }
-
- get _preventSubmission() {
- return !this.props.newGreeting;
- }
-
- _handleNewGreetingChange = (event: React.FormEvent<HTMLInputElement>) => {
- const newGreeting = (event.target as HTMLInputElement).value;
- GreetingActions.newGreetingChanged(newGreeting);
- }
-
- _onSubmit = (event: React.FormEvent<HTMLButtonElement>) => {
- event.preventDefault();
-
- if (!this._preventSubmission) {
- GreetingActions.addGreeting(this.props.newGreeting);
- }
- }
-}
-
-export default WhoToGreet;
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/index.html b/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/index.html
deleted file mode 100644
index a3f53185a..000000000
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/index.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!doctype html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
-
- <title>TypeScript, Babel, React, Flux, and Karma</title>
-
- <!-- inject:css -->
- <!-- endinject -->
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
- </head>
- <body>
- <div id="content"></div>
- <!-- inject:js -->
- <!-- endinject -->
- </body>
-</html>
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/main.tsx b/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/main.tsx
deleted file mode 100644
index 7e957bd47..000000000
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/src/main.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-import 'babel-polyfill';
-import React from 'react';
-import ReactDOM from 'react-dom';
-
-import App from './components/App';
-
-ReactDOM.render(<App />, document.getElementById('content'));
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/test/components/App.tests.tsx b/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/test/components/App.tests.tsx
deleted file mode 100644
index aa9612416..000000000
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/test/components/App.tests.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import React from 'react';
-import TestUtils from 'react-addons-test-utils';
-
-import App from '../../src/components/App';
-import WhoToGreet from '../../src/components/WhoToGreet';
-import Greeting from '../../src/components/Greeting';
-import GreetingStore from '../../src/stores/GreetingStore';
-
-describe('App', () => {
- it('renders expected HTML', () => {
- const app = render({ greetings: ['James'], newGreeting: 'Benjamin' });
- expect(app).toEqual(
- <div className="container-fluid">
- <h1>Hello People!</h1>
-
- <WhoToGreet newGreeting={ 'Benjamin' } />
-
- { [
- <Greeting key={ 0 } targetOfGreeting="James" />
- ] }
- </div>
- );
- });
-
- function render(state: any) {
- const shallowRenderer = TestUtils.createRenderer();
- spyOn(GreetingStore, 'getState').and.returnValue(state);
-
- shallowRenderer.render(<App />);
- return shallowRenderer.getRenderOutput();
- }
-});
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/test/components/Greeting.tests.tsx b/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/test/components/Greeting.tests.tsx
deleted file mode 100644
index 911a6cba2..000000000
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/test/components/Greeting.tests.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import React from 'react';
-import TestUtils from 'react-addons-test-utils';
-
-import Greeting from '../../src/components/Greeting';
-import * as GreetingActions from '../../src/actions/GreetingActions';
-
-describe('Greeting', () => {
- let handleSelectionChangeSpy: jasmine.Spy;
- beforeEach(() => {
- handleSelectionChangeSpy = jasmine.createSpy('handleSelectionChange');
- });
-
- it('given a targetOfGreeting of \'James\' it renders a p containing a greeting and a remove button', () => {
- const targetOfGreeting = 'James';
-
- const p = render({ targetOfGreeting });
- expect(p.type).toBe('p');
- expect(p.props.children[0]).toBe('Hello ');
- expect(p.props.children[1]).toBe('James');
- expect(p.props.children[2]).toBe('!');
-
- const [ , , , button ] = p.props.children;
-
- expect(button.type).toBe('button');
- expect(button.props.className).toBe('btn btn-default btn-danger');
- expect(button.props.children).toBe('Remove');
- });
-
- it('button onClick triggers an removeGreeting action', () => {
- const targetOfGreeting = 'Benjamin';
- const p = render({ targetOfGreeting });
- const [ , , , button ] = p.props.children;
- spyOn(GreetingActions, 'removeGreeting');
-
- button.props.onClick();
-
- expect(GreetingActions.removeGreeting).toHaveBeenCalledWith(targetOfGreeting);
- });
-
- function render({ targetOfGreeting }: { targetOfGreeting: string; }) {
- const shallowRenderer = TestUtils.createRenderer();
- shallowRenderer.render(<Greeting key={ 0 } targetOfGreeting={ targetOfGreeting } />);
- return shallowRenderer.getRenderOutput();
- }
-});
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/test/components/WhoToGreet.tests.tsx b/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/test/components/WhoToGreet.tests.tsx
deleted file mode 100644
index 01398952e..000000000
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/test/components/WhoToGreet.tests.tsx
+++ /dev/null
@@ -1,68 +0,0 @@
-import React from 'react';
-import TestUtils from 'react-addons-test-utils';
-
-import WhoToGreet from '../../src/components/WhoToGreet';
-import * as GreetingActions from '../../src/actions/GreetingActions';
-
-describe('WhoToGreet', () => {
- let handleSelectionChangeSpy: jasmine.Spy;
- beforeEach(() => {
- handleSelectionChangeSpy = jasmine.createSpy('handleSelectionChange');
- });
-
- it('given a newGreeting then it renders a form containing an input containing that text and an add button', () => {
- const newGreeting = 'James';
-
- const form = render({ newGreeting });
- expect(form.type).toBe('form');
- expect(form.props.role).toBe('form');
-
- const formGroup = form.props.children;
- expect(formGroup.type).toBe('div');
- expect(formGroup.props.className).toBe('form-group');
-
- const [ input, button ] = formGroup.props.children;
-
- expect(input.type).toBe('input');
- expect(input.props.type).toBe('text');
- expect(input.props.className).toBe('form-control');
- expect(input.props.placeholder).toBe('Who would you like to greet?');
- expect(input.props.value).toBe(newGreeting);
-
- expect(button.type).toBe('button');
- expect(button.props.type).toBe('submit');
- expect(button.props.className).toBe('btn btn-default btn-primary');
- expect(button.props.disabled).toBe(false);
- expect(button.props.children).toBe('Add greeting');
- });
-
- it('input onChange triggers a newGreetingChanged action', () => {
- const newGreeting = 'Benjamin';
- const form = render({ newGreeting });
- const formGroup = form.props.children;
- const [ input ] = formGroup.props.children;
- spyOn(GreetingActions, 'newGreetingChanged');
-
- input.props.onChange({ target: { value: newGreeting }});
-
- expect(GreetingActions.newGreetingChanged).toHaveBeenCalledWith(newGreeting);
- });
-
- it('button onClick triggers an addGreeting action', () => {
- const newGreeting = 'Benjamin';
- const form = render({ newGreeting });
- const formGroup = form.props.children;
- const [ , button ] = formGroup.props.children;
- spyOn(GreetingActions, 'addGreeting');
-
- button.props.onClick({ preventDefault: () => {} });
-
- expect(GreetingActions.addGreeting).toHaveBeenCalledWith(newGreeting);
- });
-
- function render({ newGreeting }: { newGreeting: string }) {
- const shallowRenderer = TestUtils.createRenderer();
- shallowRenderer.render(<WhoToGreet newGreeting={ newGreeting } />);
- return shallowRenderer.getRenderOutput();
- }
-});
diff --git a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/test/main.js b/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/test/main.js
deleted file mode 100644
index 1b332a7c0..000000000
--- a/node_modules/ts-loader/examples/webpack2-gulp-react-flux-babel-karma/test/main.js
+++ /dev/null
@@ -1,5 +0,0 @@
-/* eslint-disable */
-import 'babel-polyfill';
-
-const testsContext = require.context('./', true, /\.tests\.ts(x?)$/);
-testsContext.keys().forEach(testsContext); \ No newline at end of file
diff --git a/node_modules/ts-loader/package.json b/node_modules/ts-loader/package.json
index ff3c8d286..3951d12e7 100644
--- a/node_modules/ts-loader/package.json
+++ b/node_modules/ts-loader/package.json
@@ -1,6 +1,6 @@
{
"name": "ts-loader",
- "version": "2.0.3",
+ "version": "2.1.0",
"description": "TypeScript loader for webpack",
"main": "index.js",
"scripts": {
@@ -40,14 +40,15 @@
"devDependencies": {
"babel": "^6.0.0",
"babel-core": "^6.0.0",
- "babel-loader": "^6.0.0",
+ "babel-loader": "^7.0.0",
"babel-polyfill": "^6.16.0",
"babel-preset-es2015": "^6.0.0",
"babel-preset-es2016": "^6.16.0",
"babel-preset-react": "^6.0.0",
"escape-string-regexp": "^1.0.3",
- "fs-extra": "^2.0.0",
+ "fs-extra": "^3.0.0",
"glob": "^7.1.1",
+ "happypack": "^3.1.0",
"html-webpack-plugin": "^2.17.0",
"jasmine-core": "^2.5.2",
"karma": "^1.3.0",