Skip to content

Commit

Permalink
Merge pull request #65 from topcoder-platform/develop
Browse files Browse the repository at this point in the history
Topcoder prod dev content
  • Loading branch information
ajefts authored Jun 12, 2017
2 parents 44d5746 + 6d4cc63 commit 28bf6d9
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 44 deletions.
6 changes: 5 additions & 1 deletion __mocks__/webpack.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import _ from 'lodash';

module.exports = _.noop;
module.exports = () => ({
apply: _.noop,
});

module.exports.ProgressPlugin = () => ({});
13 changes: 8 additions & 5 deletions config/webpack/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
loader: 'file-loader',
options: {
outputPath: '/fonts/',
publicPath: '/fonts/',
publicPath: '/fonts/../',
},
}, {
test: /\.(jsx?|svg)$/,
Expand Down Expand Up @@ -59,7 +59,7 @@ module.exports = {
loader: 'file-loader',
options: {
outputPath: '/images/',
publicPath: '/images/',
publicPath: '/images/../',
},
}, {
test: /\.scss$/,
Expand All @@ -73,14 +73,14 @@ module.exports = {
localIdentName: '[path]___[name]__[local]___[hash:base64:5]',
modules: true,
},
}, 'resolve-url-loader', {
}, {
loader: 'postcss-loader',
options: {
plugins: [
autoprefixer,
],
},
}, {
}, 'resolve-url-loader', {
loader: 'sass-loader',
options: {
sourceMap: true,
Expand Down Expand Up @@ -110,7 +110,10 @@ module.exports = {
from: path.resolve(__dirname, '../../src/assets/themes'),
to: path.resolve(__dirname, '../../build/themes'),
}]),
new ExtractTextPlugin('style.css'),
new ExtractTextPlugin({
allChunks: true,
filename: 'style.css',
}),
new webpack.DefinePlugin({
'process.env': {
/* Some isomorphic code relies on this variable to determine, whether
Expand Down
16 changes: 7 additions & 9 deletions config/webpack/dev-css-optimization.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,14 @@
*/

module.exports = {
autoprefixer: false,
colormin: false,
calc: false,
convertValues: false,
core: false,
discardComments: false,
discardEmpty: false,
discardOverridden: false,
discardUnused: false,
filterOptimiser: false,
filterPlugins: false,
functionOptimiser: false,
mergeIdents: false,
mergeLonghand: false,
mergeRules: false,
Expand All @@ -27,18 +24,19 @@ module.exports = {
minifyParams: false,
minifySelectors: false,
normalizeCharset: false,
normalizeDisplayValues: false,
normalizePositions: false,
normalizeRepeatStyle: false,
normalizeString: false,
normalizeTimingFunctions: false,
normalizeUnicode: false,
normalizeUrl: false,
normalizeWhitespace: false,
orderedValues: false,
reduceBackgroundRepeat: false,
reduceDisplayValues: false,
rawCache: false,
reduceIdents: false,
reduceInitial: false,
reducePositions: false,
reduceTimingFunctions: false,
reduceTransforms: false,
styleCache: false,
svgo: false,
uniqueSelectors: false,
zIndex: false,
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"dependencies": {
"atob": "^2.0.3",
"autoprefixer": "^7.1.0",
"babel-loader": "^6.4.0",
"babel-loader": "^7.0.0",
"babel-plugin-css-modules-transform": "^1.2.7",
"babel-plugin-inline-react-svg": "^0.4.0",
"babel-plugin-module-alias": "^1.6.0",
Expand All @@ -50,7 +50,7 @@
"config": "^1.25.1",
"cookie-parser": "^1.4.3",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.27.3",
"css-loader": "^0.28.4",
"debug": "^2.6.3",
"eslint": "^3.19.0",
"eslint-config-airbnb": "^15.0.1",
Expand All @@ -61,7 +61,7 @@
"eslint-plugin-react": "^7.0.1",
"express": "^4.15.2",
"extract-text-webpack-plugin": "^2.1.0",
"file-loader": "^0.10.1",
"file-loader": "^0.11.2",
"identity-obj-proxy": "^3.0.0",
"isomorphic-fetch": "^2.2.1",
"jest": "^20.0.0",
Expand All @@ -71,9 +71,9 @@
"moment": "^2.18.1",
"morgan": "^1.8.1",
"node-sass": "^4.5.0",
"optimize-css-assets-webpack-plugin": "^1.3.0",
"postcss-loader": "^1.3.3",
"postcss-scss": "^0.4.1",
"optimize-css-assets-webpack-plugin": "^2.0.0",
"postcss-loader": "^2.0.5",
"postcss-scss": "^1.0.0",
"prop-types": "^15.5.8",
"qs": "^6.4.0",
"rc-tooltip": "^3.4.3",
Expand All @@ -98,7 +98,7 @@
"serialize-javascript": "^1.3.0",
"serve-favicon": "^2.4.1",
"shortid": "^2.2.8",
"style-loader": "^0.14.0",
"style-loader": "^0.18.2",
"stylefmt": "^6.0.0",
"stylelint": "^7.9.0",
"stylelint-config-standard": "^16.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ if (USE_DEV_TOOLS) {
const webpackDevMiddleware = require('webpack-dev-middleware');
const webpackHotMiddleware = require('webpack-hot-middleware');
const compiler = webpack(webpackConfig);
compiler.apply(new webpack.ProgressPlugin());
app.use(webpackDevMiddleware(compiler, {
name: 'bundle.js',
noInfo: true,
publicPath: webpackConfig.output.publicPath,
serverSideRender: true,
}));
Expand Down
7 changes: 2 additions & 5 deletions src/server/tc-communities/tc-prod-dev/metadata.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"authorizedGroupIds": [
"20000000"
],
"challengeGroupId": "20000000",
"challengeGroupId": "20000001",
"challengeFilterTag": "",
"communityId": "tc-prod-dev",
"communityName": "Topcoder Product Development",
Expand Down Expand Up @@ -36,5 +33,5 @@
"url": "leaderboard"
}
],
"leaderboardApiUrl": "https://api.topcoder.com/v4/looks/0/run/json/"
"leaderboardApiUrl": "https://api.topcoder.com/v4/looks/412/run/json/"
}
3 changes: 2 additions & 1 deletion src/shared/components/tc-communities/ArticleCard/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import defaultStyle from './style.scss';
function ArticleCard(props) {
const { imageSrc, title, text, link, theme } = props;

const t = text.match(/<p>.*<\/p>/)[0].slice(3, -4);
let t = text.match(/<p>.*<\/p>/) || '';
if (t && t[0]) t = t[0].slice(3, -4);

return (
<div className={theme.container}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export default function Home(props) {
return (
<main>
<Banner
title="Wipro Crowd"
text="Wipro's Hybrid Crowd gives our vast ecosystem of customers and partners options to access new range of skills that provide new value services and efficiency options all over the world."
title="Topcoder Product Development Community"
text="This is the place where Topcoder members can come to focus on work that involves building out the Topcoder Platform."
link={{
title: 'Compete Now',
url: 'challenges',
Expand All @@ -57,8 +57,8 @@ export default function Home(props) {
>
<div>
<ImageText
title="Improve Your Skills"
text="Our continuously evolving structured learning paths, constantly abreast of the latest, tailored for employees to deepen your knowledge, infuses important software capabilities that are industry specific and help you get the skills you need to succeed."
title="Ramp Up"
text="Learn about what we're working on, our environments, procedures, etc."
link={{
title: 'Start Learning',
url: 'learn',
Expand All @@ -67,9 +67,9 @@ export default function Home(props) {
/>
<ImageText
title="Get Involved"
text="Rewards program is intended to celebrate and recognize your contribution. Rewards for project contributions are given using ‘Reward Points’. Points earned translate into badges. Quarterly rewards are given away to the toppers of all categories."
text="Whether you're a copilot, designer, developer, or data scientist...we want you involved. "
link={{
title: 'Start Earning',
title: 'Start Contributing',
url: 'challenges',
}}
imageSrc="/themes/wipro/home/image-text-do.jpg"
Expand All @@ -84,16 +84,16 @@ export default function Home(props) {
>
<ResourceCard
icon={IconNetwork}
title="Up Your iOS and Swift Development Skills"
text="Pellentesque non dignissim neque. Nunc vel rhoncus nibh, ut tincidunt turpis. Integer ac enim pellentesque, adipiscing metus id, pharetra odio."
title="Learn about our platform"
text="Pellentesque non dignissim neque. Nunc vel rhoncus nibh, ut tincidunt turpis. Integer ac enim pellentesque, adipiscing metus id, pharetra odio."
link={{
title: 'Browse resources',
url: 'learn',
}}
/>
<ResourceCard
icon={IconMedal}
title="Take the First Steps to Stand Out in the Community"
title="What's in it for me?"
text="Donec bibendum nunc sit amet tortor scelerisque luctus et sit amet mauris. Suspendisse felis sem, condimentum ullamcorper est sit amet, molestie"
link={{
title: 'Learn about badges',
Expand All @@ -102,8 +102,8 @@ export default function Home(props) {
/>
<ResourceCard
icon={IconRocket}
title="Compete in Challenges and Win Cash"
text="Suspendisse felis sem, condimentum ullamcorper est sit amet, molestie mollis nulla. Etiam lorem orci, consequat ac magna quis, facilisis"
title="Participate in many ways"
text="Suspendisse felis sem, condimentum ullamcorper est sit amet, molestie mollis nulla. Etiam lorem orci, consequat ac magna quis, facilisis "
link={{
title: 'Browse challenges',
url: 'challenges',
Expand All @@ -114,8 +114,8 @@ export default function Home(props) {
<NewsSection news={props.news} />

<NewsletterSignup
title="Sign up for our newsletter"
text="Don’t miss out on the latest Topcoder IOS challenges and information!"
title="Sign up for Topcoder Product Development Updates"
text="Don’t miss out opportunities to work on the Topcoder Platform!"
imageSrc="/themes/wipro/subscribe-bg.jpg"
/>

Expand Down
3 changes: 1 addition & 2 deletions src/styles/_tc-styles.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
@import 'tc-includes';
@import 'reset';

// Use to list all modules to include
@import 'typography';
@import 'buttons';
@import 'checkboxes';
@import 'forms';
@import 'flexbox';
@import 'typography';

0 comments on commit 28bf6d9

Please sign in to comment.