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

Merge master into production #470

Merged
merged 70 commits into from
Aug 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
5007d5d
Mobile landing page (#419)
mmahalwy Jul 31, 2016
2f3c32c
Fix build issue with babel-preset-es2015
ahmedre Aug 6, 2016
6865cda
Merge pull request #421 from quran/fix_build
ahmedre Aug 6, 2016
223fe89
guide updated
Aug 6, 2016
8f92662
Merge pull request #422 from mahboob-awan/fix/contributing_guide
ahmedre Aug 6, 2016
663d46c
Feature/refactor redux (#414)
thabti Aug 6, 2016
73a471a
Babel fixes
Aug 6, 2016
b991953
extract problem
mmahalwy Aug 6, 2016
291dd62
fix this time
mmahalwy Aug 6, 2016
e3b5340
Okay now.
mmahalwy Aug 6, 2016
79dc129
Merge pull request #423 from quran/babel-presets
ahmedre Aug 6, 2016
a705e29
Mobile page updates (#424)
mmahalwy Aug 6, 2016
834de9f
Fixes #411 - Repeat range bug (#425)
mmahalwy Aug 6, 2016
7487f12
Fixes #400 Developer page (#426)
mmahalwy Aug 6, 2016
3aad967
Upgrade express to the stable version (#433)
ahmedre Aug 7, 2016
dda7f09
https all the things (#434)
ahmedre Aug 8, 2016
33396b5
Bump node version (#431)
mmahalwy Aug 8, 2016
08d46c0
Remove svg fonts (#432)
ahmedre Aug 8, 2016
30b86db
Update README.md
thabti Aug 9, 2016
5b9105c
Merge pull request #441 from quran/readme-spelling
thabti Aug 10, 2016
9a2f0b1
duplicate declaration
infacq Aug 10, 2016
e0820ac
Merge pull request #442 from infacq/patch-1
thabti Aug 10, 2016
8e703f1
Let pm2 automagically choose the number of workers (#446)
ahmedre Aug 13, 2016
3c40c6d
Fixes 438 (#448)
mmahalwy Aug 14, 2016
a1d6d7a
Fix bootstrap.config
mmahalwy Aug 15, 2016
35ede18
Simplify audio and segments building (#451)
ahmedre Aug 17, 2016
219920b
Formatting issue corrected and tiny typo (#452)
UmanShahzad Aug 17, 2016
0715e53
Remove supported check for audio (#453)
ahmedre Aug 18, 2016
c20c5ec
Fix formatting of code blocks (#454)
ahmedelgabri Aug 20, 2016
cbc85c2
pure-components + tests
thabti Aug 13, 2016
fddac56
pure-components + tests
thabti Aug 14, 2016
4c40801
moved components to components folder.
thabti Aug 14, 2016
fe05b5d
folder level + merge with master
thabti Aug 16, 2016
3ac5cd8
ensure error routes give a 404 status.
thabti Aug 20, 2016
2ce60fe
renderTopOption as a component + tests
thabti Aug 21, 2016
eaf69f3
pure-components + tests
thabti Aug 13, 2016
b24c9ac
pure-components + tests
thabti Aug 14, 2016
36e661c
moved components to components folder.
thabti Aug 14, 2016
69f9413
folder level + merge with master
thabti Aug 16, 2016
ae9cb74
remove decorators for search
thabti Aug 21, 2016
015b72f
fixes #458 (#459)
thabti Aug 21, 2016
61edf3c
fix some of the suggestions
thabti Aug 21, 2016
61d999d
fix some of the suggestions
thabti Aug 21, 2016
dd11270
Merge pull request #450 from sabeurthabti/feature/pure-components
thabti Aug 22, 2016
b58ad51
Sort language in dropdown alphabetically (#462)
haritsE Aug 26, 2016
661f5ab
Get rid of Bootstrap tooltip & use a CSS tooltip
ahmedelgabri Aug 27, 2016
85980d6
Fix path for config
ahmedelgabri Aug 27, 2016
e37284f
Remove ranges & cleanup excutable paths
ahmedelgabri Aug 27, 2016
7d54e6b
fix indentation
ahmedelgabri Aug 27, 2016
53abaae
Linter fixes for webpack folder & bootstrap config
ahmedelgabri Aug 27, 2016
bdea549
Merge pull request #464 from ahmedelgabri/remove-bootstrap-tooltips
thabti Aug 27, 2016
2c53a21
make sure new npm isntallations will not use ranges
ahmedelgabri Aug 27, 2016
1c66231
tooltip content is always ltr
ahmedelgabri Aug 27, 2016
31bac53
Merge pull request #465 from ahmedelgabri/remove-bootstrap-tooltips
thabti Aug 27, 2016
a36cd79
Update node-sass
ahmedelgabri Aug 27, 2016
5675c6f
Update travis Node version
ahmedelgabri Aug 27, 2016
16f59c8
normalize paths in package.json
ahmedelgabri Aug 28, 2016
83caa1c
make test.sh executable & update env shebang
ahmedelgabri Aug 28, 2016
361c042
Remove npm install noise on CI, etc...
ahmedelgabri Aug 28, 2016
6f0b28d
remove duplicate phantomjs package 😱
ahmedelgabri Aug 28, 2016
54e4373
add comment in .travis.yml for .nvmrc usage
ahmedelgabri Aug 28, 2016
2d311a6
Update Karma & Karma-webpack to fix jenkins error
ahmedelgabri Aug 28, 2016
d06fdd3
missing segment fix (#467)
thabti Aug 29, 2016
3d65508
Merge master & fix conflict
ahmedelgabri Aug 29, 2016
1ec1a9b
Update packages to match production & remove old babel package
ahmedelgabri Aug 29, 2016
5e39c87
multi-purpose function
thabti Aug 27, 2016
f852044
fix unit tests
thabti Aug 28, 2016
67b932f
fix Sentry issues:
thabti Aug 29, 2016
7f57ba1
Merge pull request #466 from ahmedelgabri/code-cleanup
thabti Aug 29, 2016
7094284
Merge pull request #469 from sabeurthabti/feature/sentry-bugs
thabti Aug 29, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 8 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@
"transform-runtime",
"add-module-exports",
"transform-decorators-legacy",
"transform-react-display-name"
"transform-react-display-name",
["system-import-transformer", {"modules": "common"}]
],
"env": {
"development": {
"plugins": [
"typecheck"
]
},
"production": {
"plugins": [
"transform-react-inline-elements",
"transform-react-constant-elements"
]
}
}
}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ build
node_modules
/node_modules
static/dist
dist
test-results.xml
npm-debug.log
npm-debug.log.*
webpack-stats.json
webpack-assets.json
bundle-stats.json
selenium-debug.log
tests/functional/output/*
test/functional/screenshots/*
.ssh
webpack-stats.debug.json
webpack-stats.debug.json
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact = true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6.3.0
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
sudo: false
language: node_js
env: TEST_SUITE=unit
node_js:
- "5.6.0"
# Node version is handled inside `.nvmrc` file & travis picks it up automatically because it uses `nvm`
# https://docs.travis-ci.com/user/languages/javascript-with-nodejs#Using-.nvmrc
cache:
directories:
- node_modules
Expand Down
20 changes: 16 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Found a problem? Want a new feature?
Pull requests are the greatest contributions, so be sure they are focused in scope, and do avoid unrelated commits.

1. To begin, [fork this project], clone your fork, and add our [upstream].

```bash
# Clone your fork of the repository into the current directory
git clone https://github.com/<your-username>/quran.com-frontend
Expand All @@ -26,8 +27,17 @@ Pull requests are the greatest contributions, so be sure they are focused in sco
# Install the tools necessary for development
npm install
```
2. Pull latest changes from "upstream" and push these changes to your "origin"(forked)
> NOTE - This step will repeat every time You plan to contribute

```bash
# Pull latest changes from "upstream" repository
git pull upstream master
#Push latest changes to Your "origin" repository
git push origin master
```
3. Create a branch for your feature or fix:

2. Create a branch for your feature or fix:
```bash
# Move into a new branch for a feature
git checkout -b feature/thing
Expand All @@ -37,7 +47,8 @@ Pull requests are the greatest contributions, so be sure they are focused in sco
git checkout -b fix/something
```

3. Be sure your code follows our practices.
4. Be sure your code follows our practices.

```bash
# Test current code
npm run test
Expand All @@ -49,7 +60,8 @@ Pull requests are the greatest contributions, so be sure they are focused in sco
nightwatch --test tests/functional/specs/Index_spec.js
```

4. To create a PR you need to push your branch to the origin(forked) remote and then press some buttons on GitHub:
5. To create a PR you need to push your branch to the origin(forked) remote and then press some buttons on GitHub:

```bash
# Push a feature branch
git push -u origin feature/thing
Expand All @@ -61,7 +73,7 @@ Pull requests are the greatest contributions, so be sure they are focused in sco

This will create the branch on your GitHub project. The ```-u``` flag links this branch with the remote one, so that in the future, you can simply type ```git push origin```.

5. Now [open a pull request] with a clear title and description.
6. Now [open a pull request] with a clear title and description.

## Sever-side integration
Unless you have the backend API running locally, you will need to update the `API_URL`, in `development.env` file, from `localhost` to `api.quran.com`. Leave the port number same.
Expand Down
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM node:5.10.0
FROM node:6.3

ENV NODE_ENV production
ENV API_URL http://api.quran.com:3000
ENV SENTRY_KEY_CLIENT https://44c105328ae544ae9928f9eb74b40061@app.getsentry.com/80639
ENV SENTRY_KEY_SERVER https://44c105328ae544ae9928f9eb74b40061:41ca814d33124e04ab450104c3938cb1@app.getsentry.com/80639
ENV PORT 8000
ENV NODE_PATH "./src"

RUN apt-get -y update && apt-get -y install supervisor ssh rsync

Expand All @@ -17,15 +18,16 @@ RUN cp /etc/cron.daily/logrotate /etc/cron.hourly
# cache npm install when package.json hasn't changed
WORKDIR /tmp
ADD package.json package.json
RUN npm install
RUN npm install --silent --no-progress
RUN npm install -g pm2

RUN mkdir /quran
RUN cp -a /tmp/node_modules /quran

WORKDIR /quran
ADD . /quran/
RUN npm run build
RUN npm run build:client
RUN npm run build:server

# ssh keys
WORKDIR /root
Expand All @@ -38,5 +40,7 @@ RUN rsync --update --progress -raz . ahmedre@rsync.keycdn.com:zones/assets/
# go back to /quran
WORKDIR /quran

ENV NODE_PATH "./dist"

EXPOSE 8000
CMD ["supervisord", "--nodaemon", "-c", "/etc/supervisor/supervisord.conf"]
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To start the app, run `npm run dev` which will run both the server and the clien

## Backend
Current at: https://github.com/quran/quran-api-rails
DB is private, message me for acceess.
DB is private, message me for access.


## Design
Expand All @@ -40,8 +40,6 @@ subl bundle-stats.json #so that you can the output
analyze-bundle-size bundle-stats.json
```

## [View project issues on waffle.io...](https://waffle.io/quran/quran.com-frontend)

[Reactjs]: https://facebook.github.io/react/docs/getting-started.html
[Redux]: http://redux.js.org/
[Expressjs]: http://expressjs.com/en/starter/hello-world.html
Expand Down
17 changes: 7 additions & 10 deletions start.js → bin/server.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
require('dotenv').load();
require('app-module-path').addPath(__dirname);
require('app-module-path').addPath('./src');
require('app-module-path').addPath('../src');

var fs = require('fs');
var path = require('path');
var webpackIsomorphicTools = require('webpack-isomorphic-tools');
var babelrc = fs.readFileSync('./.babelrc');
var rootDir = path.resolve(__dirname, '..');
var config;

try {
Expand All @@ -13,8 +16,6 @@ try {
console.error(err);
}

config.plugins.push(['system-import-transformer', {modules: 'common'}]);

require('babel-register')(config);

global.__CLIENT__ = false;
Expand All @@ -30,12 +31,8 @@ if (__DEVELOPMENT__) {
}
}

var webpackIsomorphicTools = require('webpack-isomorphic-tools');
// this must be equal to your Webpack configuration "context" parameter
var rootPath = require('path').resolve(__dirname, './')

global.webpack_isomorphic_tools = new webpackIsomorphicTools(require('./webpack/isomorphic-tools-configuration'))
global.webpack_isomorphic_tools = new webpackIsomorphicTools(require('../webpack/isomorphic-tools-configuration'))
.development(process.env.NODE_ENV === 'development')
.server(rootPath, function() {
require('./server.js')();
.server(rootDir, function() {
require('../src/server.js')();
});
17 changes: 17 additions & 0 deletions bin/server.prod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
require('dotenv').load();
require('app-module-path').addPath(__dirname);
require('app-module-path').addPath('../dist');

var webpackIsomorphicTools = require('webpack-isomorphic-tools');
var path = require('path');
var rootDir = path.resolve(__dirname, '../dist');

global.__CLIENT__ = false;
global.__SERVER__ = true;
global.__DEVELOPMENT__ = process.env.NODE_ENV !== 'production';

global.webpack_isomorphic_tools = new webpackIsomorphicTools(require('../webpack/isomorphic-tools-configuration'))
.development(__DEVELOPMENT__)
.server(rootDir, function() {
require('../dist/server.js')();
});
4 changes: 0 additions & 4 deletions bootstrap.config.prod.js

This file was deleted.

2 changes: 1 addition & 1 deletion docker/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
nodaemon=true

[program:pm2]
command=pm2 start /quran/start.js -i 4 --no-daemon
command=pm2 start /quran/bin/server.prod.js -i 0 --no-daemon
directory=/quran
redirect_stderr=true
stdout_logfile=/dev/stdout
Expand Down
Loading