Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 5 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 bootstrap.config.prod.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const bootstrapConfig = require('./bootstrap.config.js');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
bootstrapConfig.styleLoader = ExtractTextPlugin.extract('style-loader', 'css-loader!sass-loader');
bootstrapConfig.styleLoader = ExtractTextPlugin.extract({fallbackLoader: 'style-loader', loader: 'css-loader!sass-loader'});
module.exports = bootstrapConfig;
29 changes: 14 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@
"name": "quran",
"version": "1.0.0",
"private": false,
"repository": "https://github.com/quran/quran.com-frontend",
"scripts": {
"test": "npm run test:dev:unit",
"test:ci:unit": "./node_modules/karma/bin/karma start --browsers PhantomJS --single-run; npm run test:ci:lint",
"test:ci:unit": "karma start --browsers PhantomJS --single-run; npm run test:ci:lint",
"test:ci:functional": "BROWSER=phantomjs bash tests/functional/test.sh start-ci",
"posttest:ci:functional": "bash tests/functional/test.sh stop",
"test:ci:unit": "karma start --browsers PhantomJS --single-run; npm run test:ci:lint",
"test:dev:unit": "karma start",
"test:ci:lint": "eslint ./src/**/*.js",
"test:dev:unit": "./node_modules/karma/bin/karma start",
"test:ci:lint": "eslint ./src/**/*.js",
"test:dev:functional": "BROWSER=chrome bash tests/functional/test.sh start",
"posttest:dev:functional": "bash tests/functional/test.sh stop",
"test:dev:lint": "eslint ./src/scripts/**/*.js",
"test:stylelint": "stylelint './src/**/*.scss' --config webpack/.stylelintrc",
"test:dev:lint": "node_modules/eslint/bin/eslint.js ./src/scripts/**/*.js",
"test:stylelint": "node_modules/stylelint/dist/cli.js './src/**/*.scss' --config webpack/.stylelintrc",
"dev": "node webpack/dev-server.js & PORT=8000 node start.js",
"start": "NODE_PATH=\"./src\" node ./start",
"build": "node ./node_modules/webpack/bin/webpack.js --config webpack/prod.config.js",
Expand All @@ -29,6 +28,7 @@
"app-module-path": "^1.0.2",
"autoprefixer-loader": "^3.1.0",
"babel": "^6.5.2",
"babel-core": "^6.13.2",
"babel-loader": "^6.2.4",
"babel-plugin-add-module-exports": "^0.1.4",
"babel-plugin-system-import-transformer": "^2.0.0",
Expand All @@ -37,12 +37,11 @@
"babel-plugin-transform-runtime": "^6.7.5",
"babel-plugin-typecheck": "^3.8.0",
"babel-polyfill": "^6.7.4",
"babel-preset-es2015": "~6.9.0",
"babel-preset-es2015-webpack": "^6.4.1",
"babel-preset-es2015": "^6.13.2",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-0": "^6.5.0",
"babel-register": "^6.7.2",
"babel-runtime": "^6.6.1",
"babel-register": "^6.11.6",
"babel-runtime": "^6.11.6",
"body-parser": "^1.14.1",
"bootstrap-loader": "^1.0.10",
"bootstrap-sass": "~3.3.1",
Expand All @@ -62,7 +61,7 @@
"express": "^4.3.2",
"express-state": "^1.2.0",
"express-useragent": "^0.2.0",
"extract-text-webpack-plugin": "^1.0.1",
"extract-text-webpack-plugin": "2.0.0-beta.3",
"file-loader": "^0.8.4",
"fontfaceobserver": "^1.7.1",
"html-webpack-plugin": "^1.4.0",
Expand Down Expand Up @@ -107,17 +106,16 @@
"superagent": "^1.2.0",
"url": "^0.11.0",
"url-loader": "~0.5.5",
"webpack": "2.1.0-beta.7",
"webpack": "2.1.0-beta.20",
"webpack-isomorphic-tools": "^2.2.41",
"winston": "^1.1.2"
},
"devDependencies": {
"babel-core": "^6.7.7",
"babel-eslint": "^6.0.4",
"babel-plugin-react-transform": "^2.0.2",
"babel-preset-react-hmre": "^1.1.1",
"chai": "^3.0.0",
"chromedriver": "^2.19.0",
"chromedriver": "^2.22.2",
"del": "^2.0.2",
"enzyme": "^2.2.0",
"eslint": "^2.13.0",
Expand All @@ -127,7 +125,7 @@
"eslint-plugin-jsx-a11y": "^1.5.3",
"eslint-plugin-react": "^5.2.2",
"jscs": "^2.1.1",
"karma": "^0.13.9",
"karma": "^1.1.2",
"karma-chai": "^0.1.0",
"karma-chai-sinon": "^0.1.5",
"karma-chrome-launcher": "^0.2.0",
Expand Down Expand Up @@ -155,6 +153,7 @@
"selenium-server": "^2.48.2",
"sinon": "^1.15.3",
"sinon-chai": "^2.8.0",
"stylelint": "^7.1.0",
"stylelint-webpack-plugin": "^0.2.0",
"wdio-mocha-framework": "^0.3.7",
"wdio-spec-reporter": "0.0.3",
Expand Down
2 changes: 1 addition & 1 deletion webpack/dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = {
'transform-react-display-name',
'typecheck',
],
presets: ['react', 'es2015-webpack', 'stage-0', 'react-hmre'],
presets: ['react', ['es2015', {'modules': false}], 'stage-0', 'react-hmre'],
cacheDirectory: true
}
},
Expand Down
9 changes: 6 additions & 3 deletions webpack/prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = {
{
loader: 'babel',
query: {
'presets': ['react', 'es2015-webpack', 'stage-0'],
'presets': ['react', ['es2015', {'modules': false}], 'stage-0'],
'plugins': [
'transform-runtime',
'add-module-exports',
Expand All @@ -59,7 +59,10 @@ module.exports = {
}
]},
{ test: /\.json$/, loader: 'json-loader'},
{ test: /\.scss$/, loader: ExtractTextPlugin.extract('style', 'css?modules&importLoaders=2&sourceMap!autoprefixer?browsers=last 2 version!sass?outputStyle=expanded&sourceMap=true&sourceMapContents=true') },
{ test: /\.scss$/, loader: ExtractTextPlugin.extract({
fallbackLoader: 'style',
loader: 'css?modules&importLoaders=2&sourceMap!autoprefixer?browsers=last 2 version!sass?outputStyle=expanded&sourceMap=true&sourceMapContents=true'
}) },
{ test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: "url?name=fonts/[name].[ext]&limit=10000&mimetype=application/font-woff" },
{ test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: "url?name=fonts/[name].[ext]&limit=10000&mimetype=application/font-woff" },
{ test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url?name=fonts/[name].[ext]&limit=10000&mimetype=application/octet-stream" },
Expand All @@ -77,7 +80,7 @@ module.exports = {
jQuery: "jquery",
"windows.jQuery": "jquery"
}),
new ExtractTextPlugin("[name]-[hash].css", {allChunks: true}),
new ExtractTextPlugin({ filename: '[name]-[hash].css', allChunks: true }),
new webpack.DefinePlugin({
'process.env.BROWSER': true,
'process.env.API_URL': JSON.stringify(process.env.API_URL),
Expand Down