From 2db0659f22be1badbec67b8e5d6b80e8ffd24883 Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 11 Jul 2016 11:50:41 +0200 Subject: [PATCH] Fixes #35 -- update npm req for Travis to v3+ (#36) - updated .travis.yml to ensure npm3 for tests #35 - explicitly set various config files in strict mode to silence errors about unsupported keywords (let, const, ...) on Node 4 --- .travis.yml | 1 + conf/webpack/Base.js | 2 ++ conf/webpack/Dev.js | 2 ++ conf/webpack/Dist.js | 2 ++ conf/webpack/Test.js | 2 ++ conf/webpack/index.js | 2 ++ karma.conf.js | 2 ++ test/loadtests.js | 2 ++ webpack.config.js | 2 ++ 9 files changed, 17 insertions(+) diff --git a/.travis.yml b/.travis.yml index b9303da..6ff8fe2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,4 +12,5 @@ addons: - g++-4.8 before_install: - currentfolder=${PWD##*/} + - if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi - if [ "$currentfolder" != 'react-webpack-template' ]; then cd .. && eval "mv $currentfolder react-webpack-template" && cd react-webpack-template; fi diff --git a/conf/webpack/Base.js b/conf/webpack/Base.js index 5298073..11bfdc6 100644 --- a/conf/webpack/Base.js +++ b/conf/webpack/Base.js @@ -1,3 +1,5 @@ +'use strict'; + /** * Webpack configuration base class */ diff --git a/conf/webpack/Dev.js b/conf/webpack/Dev.js index 7f19bf0..a767868 100644 --- a/conf/webpack/Dev.js +++ b/conf/webpack/Dev.js @@ -1,3 +1,5 @@ +'use strict'; + /** * Default dev server configuration. */ diff --git a/conf/webpack/Dist.js b/conf/webpack/Dist.js index 4f38b6d..98a87e3 100644 --- a/conf/webpack/Dist.js +++ b/conf/webpack/Dist.js @@ -1,3 +1,5 @@ +'use strict'; + /** * Dist configuration. Used to build the * final output when running npm run dist. diff --git a/conf/webpack/Test.js b/conf/webpack/Test.js index d4d1fed..d2ce036 100644 --- a/conf/webpack/Test.js +++ b/conf/webpack/Test.js @@ -1,3 +1,5 @@ +'use strict'; + /** * Default test configuration. */ diff --git a/conf/webpack/index.js b/conf/webpack/index.js index 0a6f36b..8c39c09 100644 --- a/conf/webpack/index.js +++ b/conf/webpack/index.js @@ -1,3 +1,5 @@ +'use strict'; + const dev = require('./Dev'); const dist = require('./Dist'); const test = require('./Test'); diff --git a/karma.conf.js b/karma.conf.js index e1028d6..8355c22 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,3 +1,5 @@ +'use strict'; + const webpackCfg = require('./webpack.config')('test'); module.exports = function karmaConfig(config) { diff --git a/test/loadtests.js b/test/loadtests.js index 1b83780..54c3952 100644 --- a/test/loadtests.js +++ b/test/loadtests.js @@ -1,3 +1,5 @@ +'use strict'; + // Add support for Promise objects via polyfills import 'babel-polyfill'; diff --git a/webpack.config.js b/webpack.config.js index 3284904..ec995fd 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,3 +1,5 @@ +'use strict'; + /* eslint no-console: "off" */ const webpackConfigs = require('./conf/webpack'); const defaultConfig = 'dev';