-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/react-router-redux-#1' into develop
- Loading branch information
Showing
57 changed files
with
1,094 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"presets": [ | ||
"es2015", | ||
"react" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"plugins": [ | ||
"react" | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"jsx": true | ||
} | ||
}, | ||
"env": { | ||
"browser": true, | ||
"amd": true, | ||
"es6": true, | ||
"node": true, | ||
"mocha": true | ||
}, | ||
"rules": { | ||
"comma-dangle": 1, | ||
"quotes": [ 1, "single" ], | ||
"no-undef": 1, | ||
"global-strict": 0, | ||
"no-extra-semi": 1, | ||
"no-underscore-dangle": 0, | ||
"no-console": 1, | ||
"no-unused-vars": 1, | ||
"no-trailing-spaces": [1, { "skipBlankLines": true }], | ||
"no-unreachable": 1, | ||
"no-alert": 0, | ||
"react/jsx-uses-react": 1, | ||
"react/jsx-uses-vars": 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Logs | ||
logs | ||
*.log | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directory | ||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git | ||
node_modules | ||
|
||
# Bower | ||
bower_components/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"generator-react-webpack": { | ||
"appName": "reactRouterRedux", | ||
"style": "css", | ||
"postcss": false, | ||
"generatedWithVersion": 3 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
'use strict'; | ||
let path = require('path'); | ||
let defaultSettings = require('./defaults'); | ||
|
||
// Additional npm or bower modules to include in builds | ||
// Add all foreign plugins you may need into this array | ||
// @example: | ||
// let npmBase = path.join(__dirname, '../node_modules'); | ||
// let additionalPaths = [ path.join(npmBase, 'react-bootstrap') ]; | ||
let additionalPaths = []; | ||
|
||
module.exports = { | ||
additionalPaths: additionalPaths, | ||
port: defaultSettings.port, | ||
debug: true, | ||
devtool: 'eval', | ||
output: { | ||
path: path.join(__dirname, '/../dist/assets'), | ||
filename: 'app.js', | ||
publicPath: defaultSettings.publicPath | ||
}, | ||
devServer: { | ||
contentBase: './src/', | ||
historyApiFallback: true, | ||
hot: true, | ||
port: defaultSettings.port, | ||
publicPath: defaultSettings.publicPath, | ||
noInfo: false | ||
}, | ||
resolve: { | ||
extensions: ['', '.js', '.jsx'], | ||
alias: { | ||
actions: `${defaultSettings.srcPath}/actions/`, | ||
components: `${defaultSettings.srcPath}/components/`, | ||
sources: `${defaultSettings.srcPath}/sources/`, | ||
stores: `${defaultSettings.srcPath}/stores/`, | ||
styles: `${defaultSettings.srcPath}/styles/`, | ||
config: `${defaultSettings.srcPath}/config/` + process.env.REACT_WEBPACK_ENV | ||
} | ||
}, | ||
module: {} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/** | ||
* Function that returns default values. | ||
* Used because Object.assign does a shallow instead of a deep copy. | ||
* Using [].push will add to the base array, so a require will alter | ||
* the base array output. | ||
*/ | ||
'use strict'; | ||
|
||
const path = require('path'); | ||
const srcPath = path.join(__dirname, '/../src'); | ||
const dfltPort = 8000; | ||
|
||
/** | ||
* Get the default modules object for webpack | ||
* @return {Object} | ||
*/ | ||
function getDefaultModules() { | ||
return { | ||
preLoaders: [ | ||
{ | ||
test: /\.(js|jsx)$/, | ||
include: srcPath, | ||
loader: 'eslint-loader' | ||
} | ||
], | ||
loaders: [ | ||
{ | ||
test: /\.css$/, | ||
loader: 'style-loader!css-loader' | ||
}, | ||
{ | ||
test: /\.sass/, | ||
loader: 'style-loader!css-loader!sass-loader?outputStyle=expanded&indentedSyntax' | ||
}, | ||
{ | ||
test: /\.scss/, | ||
loader: 'style-loader!css-loader!sass-loader?outputStyle=expanded' | ||
}, | ||
{ | ||
test: /\.less/, | ||
loader: 'style-loader!css-loader!less-loader' | ||
}, | ||
{ | ||
test: /\.styl/, | ||
loader: 'style-loader!css-loader!stylus-loader' | ||
}, | ||
{ | ||
test: /\.(png|jpg|gif|woff|woff2)$/, | ||
loader: 'url-loader?limit=8192' | ||
}, | ||
{ | ||
test: /\.(mp4|ogg|svg)$/, | ||
loader: 'file-loader' | ||
} | ||
] | ||
}; | ||
} | ||
|
||
module.exports = { | ||
srcPath: srcPath, | ||
publicPath: '/assets/', | ||
port: dfltPort, | ||
getDefaultModules: getDefaultModules | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
'use strict'; | ||
|
||
let path = require('path'); | ||
let webpack = require('webpack'); | ||
let baseConfig = require('./base'); | ||
let defaultSettings = require('./defaults'); | ||
|
||
// Add needed plugins here | ||
let BowerWebpackPlugin = require('bower-webpack-plugin'); | ||
|
||
let config = Object.assign({}, baseConfig, { | ||
entry: [ | ||
'webpack-dev-server/client?http://127.0.0.1:' + defaultSettings.port, | ||
'webpack/hot/only-dev-server', | ||
'./src/index' | ||
], | ||
cache: true, | ||
devtool: 'eval-source-map', | ||
plugins: [ | ||
new webpack.HotModuleReplacementPlugin(), | ||
new webpack.NoErrorsPlugin(), | ||
new BowerWebpackPlugin({ | ||
searchResolveModulesDirectories: false | ||
}) | ||
], | ||
module: defaultSettings.getDefaultModules() | ||
}); | ||
|
||
// Add needed loaders to the defaults here | ||
config.module.loaders.push({ | ||
test: /\.(js|jsx)$/, | ||
loader: 'react-hot!babel-loader', | ||
include: [].concat( | ||
config.additionalPaths, | ||
[ path.join(__dirname, '/../src') ] | ||
) | ||
}); | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
'use strict'; | ||
|
||
let path = require('path'); | ||
let webpack = require('webpack'); | ||
|
||
let baseConfig = require('./base'); | ||
let defaultSettings = require('./defaults'); | ||
|
||
// Add needed plugins here | ||
let BowerWebpackPlugin = require('bower-webpack-plugin'); | ||
|
||
let config = Object.assign({}, baseConfig, { | ||
entry: path.join(__dirname, '../src/index'), | ||
cache: false, | ||
devtool: 'sourcemap', | ||
plugins: [ | ||
new webpack.optimize.DedupePlugin(), | ||
new webpack.DefinePlugin({ | ||
'process.env.NODE_ENV': '"production"' | ||
}), | ||
new BowerWebpackPlugin({ | ||
searchResolveModulesDirectories: false | ||
}), | ||
new webpack.optimize.UglifyJsPlugin(), | ||
new webpack.optimize.OccurenceOrderPlugin(), | ||
new webpack.optimize.AggressiveMergingPlugin(), | ||
new webpack.NoErrorsPlugin() | ||
], | ||
module: defaultSettings.getDefaultModules() | ||
}); | ||
|
||
// Add needed loaders to the defaults here | ||
config.module.loaders.push({ | ||
test: /\.(js|jsx)$/, | ||
loader: 'babel', | ||
include: [].concat( | ||
config.additionalPaths, | ||
[ path.join(__dirname, '/../src') ] | ||
) | ||
}); | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
'use strict'; | ||
|
||
let path = require('path'); | ||
let srcPath = path.join(__dirname, '/../src/'); | ||
|
||
let baseConfig = require('./base'); | ||
|
||
// Add needed plugins here | ||
let BowerWebpackPlugin = require('bower-webpack-plugin'); | ||
|
||
module.exports = { | ||
devtool: 'eval', | ||
module: { | ||
preLoaders: [ | ||
{ | ||
test: /\.(js|jsx)$/, | ||
loader: 'isparta-instrumenter-loader', | ||
include: [ | ||
path.join(__dirname, '/../src') | ||
] | ||
} | ||
], | ||
loaders: [ | ||
{ | ||
test: /\.(png|jpg|gif|woff|woff2|css|sass|scss|less|styl)$/, | ||
loader: 'null-loader' | ||
}, | ||
{ | ||
test: /\.(js|jsx)$/, | ||
loader: 'babel-loader', | ||
include: [].concat( | ||
baseConfig.additionalPaths, | ||
[ | ||
path.join(__dirname, '/../src'), | ||
path.join(__dirname, '/../test') | ||
] | ||
) | ||
} | ||
] | ||
}, | ||
resolve: { | ||
extensions: [ '', '.js', '.jsx' ], | ||
alias: { | ||
actions: srcPath + 'actions/', | ||
helpers: path.join(__dirname, '/../test/helpers'), | ||
components: srcPath + 'components/', | ||
sources: srcPath + 'sources/', | ||
stores: srcPath + 'stores/', | ||
styles: srcPath + 'styles/', | ||
config: srcPath + 'config/' + process.env.REACT_WEBPACK_ENV | ||
} | ||
}, | ||
plugins: [ | ||
new BowerWebpackPlugin({ | ||
searchResolveModulesDirectories: false | ||
}) | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# About the dist folder | ||
After building the dist version of your project, the generated files are stored in this folder. You should keep it under version control. |
Oops, something went wrong.