Selaa lähdekoodia

webpack config for travis and test for build fail

sanex3339 8 vuotta sitten
vanhempi
commit
5d72fc08ea
3 muutettua tiedostoa jossa 20 lisäystä ja 9 poistoa
  1. 1 0
      dist/index.js
  2. 2 0
      src/node-groups/ConsoleOutputNodesGroup.ts
  3. 17 9
      webpack.config.js

+ 1 - 0
dist/index.js

@@ -2216,6 +2216,7 @@ var ConsoleOutputNodesGroup = function (_AbstractNodesGroup_) {
             return _possibleConstructorReturn(_this);
         }
         _this.nodes.set('consoleOutputDisableExpressionNode', new ConsoleOutputDisableExpressionNode_1.ConsoleOutputDisableExpressionNode(_this.options));
+        var t = {};
         return _this;
     }
 

+ 2 - 0
src/node-groups/ConsoleOutputNodesGroup.ts

@@ -18,5 +18,7 @@ export class ConsoleOutputNodesGroup extends AbstractNodesGroup {
             'consoleOutputDisableExpressionNode',
             new ConsoleOutputDisableExpressionNode(this.options)
         );
+
+        var t = {};
     }
 }

+ 17 - 9
webpack.config.js

@@ -12,7 +12,23 @@ ${fs.readFileSync('./LICENSE.BSD', 'utf8')}
 */`;
 }
 
+const isTravisEnv = process.env.TRAVIS ? JSON.parse(process.env.TRAVIS) : false;
+const plugins = [
+    new webpack.BannerPlugin(
+        {
+            banner: `${getLicenseText()}\n\nrequire("source-map-support").install();\n`,
+            raw: true,
+            entryOnly: false
+        }
+    )
+];
+
+if (isTravisEnv) {
+    plugins.push(new webpack.NoErrorsPlugin());
+}
+
 module.exports = {
+    bail: isTravisEnv,
     entry: {
         'index': './index.ts'
     },
@@ -28,15 +44,7 @@ module.exports = {
         extensions: ['', '.ts'],
         modulesDirectories: ['./src', './node_modules']
     },
-    plugins: [
-        new webpack.BannerPlugin(
-            {
-                banner: `${getLicenseText()}\n\nrequire("source-map-support").install();\n`,
-                raw: true,
-                entryOnly: false
-            }
-        )
-    ],
+    plugins: plugins,
     output: {
         path: './dist',
         filename: '[name].js',