Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Ramadan Todo list #343

Merged
merged 4 commits into from
Jun 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ root = true

[*]
indent_style = space
indent_size = 4
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
Expand Down
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
NODE_ENV=development
PORT=8000
API_URL=http://api.quran.com:3000
API_URL=http://quran.com:3000
SEGMENTS_KEY=
SENTRY_KEY_CLIENT=
SENTRY_KEY_SERVER=
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/components/SurahInfo/htmls/*
78 changes: 46 additions & 32 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,40 +1,54 @@
{
"parser": "babel-eslint",
"extends": "airbnb",
"env": {
"es6": true,
"node": true,
"browser": true,
"jquery": true
},
"ecmaFeatures": {
"arrowFunctions": true,
"binaryLiterals": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,
"forOf": true,
"generators": true,
"modules": true,
"objectLiteralComputedProperties": true,
"objectLiteralDuplicateProperties": true,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"octalLiterals": true,
"regexUFlag": true,
"regexYFlag": true,
"spread": true,
"superInFunctions": true,
"templateStrings": true,
"unicodeCodePointEscapes": true,
"globalReturn": true,
"jsx": false
"node": true,
"mocha": true,
"es6": true
},
"rules": {
"strict": 0,
"indent": [2, 2],
"quotes": [2, "single"],
"no-unused-vars": 0
"react/no-multi-comp": 0,
"import/default": 0,
"import/no-duplicates": 0,
"import/named": 0,
"import/namespace": 0,
"import/no-unresolved": 0,
"import/no-named-as-default": 2,
// Temporarirly disabled due to a possible bug in babel-eslint (todomvc example)
"block-scoped-var": 0,
// Temporarily disabled for test/* until babel/babel-eslint#33 is resolved
"padded-blocks": 0,
"comma-dangle": 0, // not sure why airbnb turned this on. gross!
"indent": [2, 2, {"SwitchCase": 1}],
"no-console": 0,
"no-alert": 0,
"object-curly-spacing": 0,
"no-case-declarations": 0
},
"plugins": [
"react", "import"
],
"settings": {
"import/parser": "babel-eslint",
"import/resolve": {
moduleDirectory: ["node_modules", "src"]
}
},
"parserOptions":{
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
},
"plugins": ["react"]
"globals": {
"__DEVELOPMENT__": true,
"__CLIENT__": true,
"__SERVER__": true,
"__DISABLE_SSR__": true,
"__DEVTOOLS__": true,
"socket": true,
"webpackIsomorphicTools": true,
ga: true,
Raven: true
}
}
19 changes: 12 additions & 7 deletions client.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*global document, window, $ */
/* global document, window, $ */
import 'babel-polyfill';

import React from 'react';
Expand All @@ -21,15 +21,19 @@ import createStore from './src/redux/create';
import routes from './src/routes';

const client = new ApiClient();
const store = createStore(browserHistory, client, window.__data);
const store = createStore(browserHistory, client, window.reduxData);
const history = syncHistoryWithStore(browserHistory, store);

Raven.config(config.sentryClient).install()
try {
Raven.config(config.sentryClient).install();
} catch (error) {
console.log(error);
}

window.quranDebug = debug;
window.ReactDOM = ReactDOM; // For chrome dev tool support

window.clearCookies = function() {
window.clearCookies = () => {
reactCookie.remove('quran');
reactCookie.remove('content');
reactCookie.remove('audio');
Expand All @@ -38,7 +42,7 @@ window.clearCookies = function() {

// Init tooltip
if (typeof window !== 'undefined') {
$(function () {
$(() => {
$(document.body).tooltip({
selector: '[data-toggle="tooltip"]',
animation: false
Expand Down Expand Up @@ -69,6 +73,7 @@ match({ history, routes: routes() }, (error, redirectLocation, renderProps) => {
<Provider store={store} key="provider">
{component}
</Provider>, mountNode, () => {
debug('client', 'React Rendered');
});
debug('client', 'React Rendered');
}
);
});
17 changes: 11 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "quran",
"version": "0.0.0",
"version": "1.0.0",
"private": true,
"scripts": {
"test": "./node_modules/karma/bin/karma start",
"test:ci:unit": "./node_modules/karma/bin/karma start --browsers PhantomJS --single-run",
"test:ci:unit": "./node_modules/karma/bin/karma start --browsers PhantomJS --single-run; npm run test:ci:lint",
"test:ci:functional": "node ./nightwatch.js -c ./nightwatch.json -e production",
"test:ci:lint": "eslint ./src/scripts/**/*.js",
"test:ci:lint": "eslint ./src/**/*.js",
"test:dev:unit": "./node_modules/karma/bin/karma start",
"test:dev:functional": "node ./nightwatch.js -c ./nightwatch.json",
"test:dev:lint": "eslint ./src/scripts/**/*.js",
Expand Down Expand Up @@ -59,6 +59,7 @@
"express-useragent": "^0.2.0",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.8.4",
"fontfaceobserver": "^1.7.1",
"html-webpack-plugin": "^1.4.0",
"http-proxy": "^1.13.2",
"humps": "^1.0.0",
Expand Down Expand Up @@ -92,6 +93,7 @@
"react-scroll": "^1.0.4",
"redux": "^3.3.1",
"redux-connect": "^2.4.0",
"reselect": "^2.5.1",
"resolve-url": "^0.2.1",
"sass-loader": "2.0.1",
"scroll-behavior": "^0.3.3",
Expand All @@ -117,9 +119,12 @@
"chromedriver": "^2.19.0",
"del": "^2.0.2",
"enzyme": "^2.2.0",
"eslint": "^1.4.1",
"eslint-loader": "^1.0.0",
"eslint-plugin-react": "^3.3.2",
"eslint": "^2.13.0",
"eslint-config-airbnb": "^9.0.1",
"eslint-loader": "^1.3.0",
"eslint-plugin-import": "^1.8.1",
"eslint-plugin-jsx-a11y": "^1.5.3",
"eslint-plugin-react": "^5.2.2",
"jscs": "^2.1.1",
"karma": "^0.13.9",
"karma-chai": "^0.1.0",
Expand Down
8 changes: 3 additions & 5 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,9 @@ const port = process.env.PORT || 8000;

export default function serve(cb) {
return server.listen(port, function() {
console.info(`
==> 🌎 ENV=${process.env.NODE_ENV}
==> ✅ Server is listening at http://localhost:${port}
==> 🎯 API at ${process.env.API_URL}
`);
console.info(`==> 🌎 ENV=${process.env.NODE_ENV}`);
console.info(`==> ✅ Server is listening at http://localhost:${port}`);
console.info(`==> 🎯 API at ${process.env.API_URL}`);
Object.keys(config).forEach(key => config[key].constructor.name !== 'Object' && console.info(`==> ${key}`, config[key]));

cb && cb(this);
Expand Down
Loading