forked from nosovsh/motoparking
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eslint and styling files at root dir
- Loading branch information
Showing
9 changed files
with
105 additions
and
105 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "eslint-config-airbnb-es5", | ||
"rules": { | ||
"quotes": [2, "double", "avoid-escape"], | ||
"no-console": 0 | ||
} | ||
} |
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 |
---|---|---|
@@ -1,22 +1,17 @@ | ||
var React = require('react'); | ||
var routes = require('./routes'); | ||
var React = require("react"); | ||
var routes = require("./routes"); | ||
|
||
// Require React-Router | ||
var Router = require('react-router'); | ||
var Route = Router.Route; | ||
var NotFoundRoute = Router.NotFoundRoute; | ||
var DefaultRoute = Router.DefaultRoute; | ||
var Link = Router.Link; | ||
var RouteHandler = Router.RouteHandler; | ||
var Router = require("react-router"); | ||
|
||
var analytics = require('./utils/analytics'); | ||
var analytics = require("./utils/analytics"); | ||
|
||
window.React = React; // For chrome dev tool support | ||
|
||
var flux = require("./fluxy"); | ||
|
||
Router.run(routes, Router.HistoryLocation, function (Handler, state) { | ||
React.render(<Handler flux={ flux }/>, document.body); | ||
analytics.pageView(state.path); | ||
Router.run(routes, Router.HistoryLocation, function(Handler, state) { | ||
React.render(<Handler flux={ flux }/>, document.body); | ||
analytics.pageView(state.path); | ||
}); | ||
|
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
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 |
---|---|---|
@@ -1,38 +1,38 @@ | ||
// Stupid simple server | ||
var express = require('express'); | ||
var webpack = require('webpack'); | ||
var WebpackDevServer = require('webpack-dev-server'); | ||
var config = require('./webpack.config'); | ||
var express = require("express"); | ||
var webpack = require("webpack"); | ||
var WebpackDevServer = require("webpack-dev-server"); | ||
var config = require("./webpack.config"); | ||
|
||
var app = express(); | ||
var port = 3004; | ||
// var port = 3004; | ||
var webPackPort = 3005; | ||
|
||
app.get("/*", function (req, res) { | ||
res.end("<!DOCTYPE html>\n"+ | ||
"<html>\n" + | ||
" <head>\n" + | ||
" <meta charset='utf-8'/>\n" + | ||
" <title>Hello React</title>\n" + | ||
" </head>\n" + | ||
" <body>\n" + | ||
" <div id='content'></div>\n" + | ||
" <script src='http://localhost:" + webPackPort +"/build/bundle.js'></script>\n" + | ||
" </body>\n" + | ||
"</html>"); | ||
app.get("/*", function(req, res) { | ||
res.end("<!DOCTYPE html>\n" + | ||
"<html>\n" + | ||
" <head>\n" + | ||
" <meta charset='utf-8'/>\n" + | ||
" <title>Motoparking.club</title>\n" + | ||
" </head>\n" + | ||
" <body>\n" + | ||
" <div id='content'></div>\n" + | ||
" <script src='http://localhost:" + webPackPort + "/build/bundle.js'></script>\n" + | ||
" </body>\n" + | ||
"</html>"); | ||
}); | ||
|
||
//app.listen(port, function () { | ||
// app.listen(port, function () { | ||
// console.log("Server listening on port " + port); | ||
//}); | ||
// }); | ||
|
||
new WebpackDevServer(webpack(config), { | ||
publicPath: config.output.publicPath, | ||
hot: true | ||
}).listen(webPackPort, 'localhost', function (err, result) { | ||
}).listen(webPackPort, "localhost", function(err) { | ||
if (err) { | ||
console.log(err); | ||
} | ||
|
||
console.log('Listening at localhost:' + webPackPort); | ||
console.log("Listening at localhost:" + webPackPort); | ||
}); |
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 |
---|---|---|
@@ -1,47 +1,47 @@ | ||
|
||
var webpack = require('webpack'); | ||
var webpack = require("webpack"); | ||
var path = require("path"); | ||
|
||
module.exports = { | ||
// Entry point for static analyzer: | ||
entry: [ | ||
'webpack-dev-server/client?http://localhost:3005', | ||
'webpack/hot/only-dev-server', | ||
'./entry.jsx', | ||
"webpack-dev-server/client?http://localhost:3005", | ||
"webpack/hot/only-dev-server", | ||
"./entry.jsx" | ||
], | ||
|
||
output: { | ||
path: __dirname + '/build/', | ||
filename: '[name].js', | ||
publicPath: 'http://localhost:3005/build/' | ||
path: path.join(__dirname, "/build/"), | ||
filename: "[name].js", | ||
publicPath: "http://localhost:3005/build/" | ||
}, | ||
|
||
resolve: { | ||
// Allow to omit extensions when requiring these files | ||
extensions: ['', '.js', '.jsx'], | ||
extensions: ["", ".js", ".jsx"], | ||
root: __dirname | ||
}, | ||
|
||
module: { | ||
loaders: [ | ||
// Pass *.jsx files through jsx-loader transform | ||
{ test: /\.jsx$/, loaders: ['react-hot', 'jsx'] }, | ||
{ test: /\.css$/, loader: "style!css" }, | ||
{ test: /\.png$/, loader: "file" }, | ||
{ test: /\.jpg$/, loader: "file" }, | ||
{ test: /\.gif/, loader: "file" }, | ||
{ test: /\.(ttf|eot|svg|woff|ttf)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader" }, | ||
//{ test: "png|jpg|jpeg|gif|svg", loader: "url-loader?limit=10000",} | ||
{ test: /\.scss$/, loader: "style!css!sass"}, | ||
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'} | ||
{test: /\.jsx$/, loaders: ["react-hot", "jsx"]}, | ||
{test: /\.css$/, loader: "style!css"}, | ||
{test: /\.png$/, loader: "file"}, | ||
{test: /\.jpg$/, loader: "file"}, | ||
{test: /\.gif/, loader: "file"}, | ||
{test: /\.(ttf|eot|svg|woff|ttf)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader"}, | ||
// { test: "png|jpg|jpeg|gif|svg", loader: "url-loader?limit=10000",} | ||
{test: /\.scss$/, loader: "style!css!sass"}, | ||
{test: /\.js$/, exclude: /node_modules/, loader: "babel-loader"} | ||
|
||
] | ||
}, | ||
plugins: [ | ||
new webpack.HotModuleReplacementPlugin(), | ||
new webpack.DefinePlugin({ | ||
GA_TRACKING_CODE: undefined, | ||
DEBUG: true, | ||
YANDEX_API_KEY: JSON.stringify("AHMEKVUBAAAAdcQIfQIA6t3GMOs3_4bbwjkyhyBbjTpnP0cAAAAAAAAAAACGT93VehWe6n5wXG-tL7Gv_61nSw==") | ||
// GA_TRACKING_CODE: undefined, | ||
DEBUG: true, | ||
YANDEX_API_KEY: JSON.stringify("AHMEKVUBAAAAdcQIfQIA6t3GMOs3_4bbwjkyhyBbjTpnP0cAAAAAAAAAAACGT93VehWe6n5wXG-tL7Gv_61nSw==") | ||
}) | ||
] | ||
}; | ||
}; |
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 |
---|---|---|
@@ -1,37 +1,39 @@ | ||
var config = require("./webpack.config"); | ||
var webpack = require('webpack'); | ||
var webpack = require("webpack"); | ||
var path = require("path"); | ||
|
||
|
||
config["entry"] = [ | ||
'./entry.jsx', | ||
config.entry = [ | ||
"./entry.jsx" | ||
]; | ||
config["output"] = { | ||
path: __dirname + '/static/build/', | ||
filename: '[name].js', | ||
publicPath: '/static/build/', | ||
chunkFilename: "[id].js" | ||
|
||
config.output = { | ||
path: path.join(__dirname, "/build/"), | ||
filename: "[name].js", | ||
publicPath: "/static/build/", | ||
chunkFilename: "[id].js" | ||
}; | ||
|
||
config["module"] = { | ||
loaders: [ | ||
// Pass *.jsx files through jsx-loader transform | ||
{test: /\.jsx$/, loaders: ['jsx']}, | ||
{ test: /\.css$/, loader: "style!css" }, | ||
{test: /\.png$/, loader: "file"}, | ||
{test: /\.jpg$/, loader: "file"}, | ||
{test: /\.(ttf|eot|svg|woff|ttf)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader"} | ||
//{ test: "png|jpg|jpeg|gif|svg", loader: "url-loader?limit=10000",} | ||
config.module = { | ||
loaders: [ | ||
// Pass *.jsx files through jsx-loader transform | ||
{test: /\.jsx$/, loaders: ["jsx"]}, | ||
{test: /\.css$/, loader: "style!css"}, | ||
{test: /\.png$/, loader: "file"}, | ||
{test: /\.jpg$/, loader: "file"}, | ||
{test: /\.(ttf|eot|svg|woff|ttf)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader"} | ||
// { test: "png|jpg|jpeg|gif|svg", loader: "url-loader?limit=10000",} | ||
|
||
] | ||
] | ||
}; | ||
config["plugins"] = [ | ||
new webpack.optimize.UglifyJsPlugin({minimize: true}), | ||
new webpack.DefinePlugin({ | ||
GA_TRACKING_CODE: JSON.stringify('UA-59996600-1'), | ||
DEBUG: false, | ||
YANDEX_API_KEY: JSON.stringify("AHMEKVUBAAAAdcQIfQIA6t3GMOs3_4bbwjkyhyBbjTpnP0cAAAAAAAAAAACGT93VehWe6n5wXG-tL7Gv_61nSw==") | ||
}) | ||
|
||
config.plugins = [ | ||
new webpack.optimize.UglifyJsPlugin({minimize: true}), | ||
new webpack.DefinePlugin({ | ||
GA_TRACKING_CODE: JSON.stringify("UA-59996600-1"), | ||
DEBUG: false, | ||
YANDEX_API_KEY: JSON.stringify("AHMEKVUBAAAAdcQIfQIA6t3GMOs3_4bbwjkyhyBbjTpnP0cAAAAAAAAAAACGT93VehWe6n5wXG-tL7Gv_61nSw==") | ||
}) | ||
|
||
]; | ||
|
||
module.exports = config; | ||
module.exports = config; |