-
Notifications
You must be signed in to change notification settings - Fork 212
Create a Skeleton app for Isomorphic React app #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@parthshah @vic-topcoder What is our deployment target? I mean, should our App include Express server for production deployment to Heroku or whatsover, which will serve the frontend? Or just webpack-dev-server for development, while for production we just package the App, and we place resulting bundle to be served by an external server? |
We do both, via different settings/parameters. For local environment we have node.js and the react hot reload, and other goodies. Usually done via The development server is node.js again, but different settings @parthshah please help with the technical details :) |
Yeah, I mean, for production we just |
Both - we'll run an express server for production on AWS which will serve the first page request. Once the app is loaded on client side, it can request additional resources through a CDN (cloudfront + s3). So assets will also have to be packaged and deployed to an S3 bucket. |
Ok, so production server is also part of the App? |
Yes, unless there is a better architectural pattern to handle such apps. |
@parthshah Got new questions:
|
|
|
okay, let's start with the simpler approach, use different loaders? Also, I just realized that this setup might have some conflicts when using react-components repo. Just something to keep in mind, we can work through those cases as they come up. |
|
@vic-topcoder @parthshah
|
1. Okay so it sounds like stylefmt is similar to 'eslint --fix'. In that
case it's a good to have. Might help as a standalone tool to to fix
existing styles.
2. Awesome thanks @birdofpreyru
…On Thu, Mar 16, 2017 at 5:42 PM birdofpreyru ***@***.***> wrote:
@vic-topcoder <https://github.com/vic-topcoder> @parthshah
<https://github.com/parthshah>
1.
By conversion I mean, it gets an ugly formatted css or scss file as
input and outputs a pretty formatted version, which follows stylelint
settings for the project. Sure we can add it to the repo, so that we can
run a command and it automatically fixes any problems in styles, but to me
it looks like a strange thing to do. At least, I just have stylelint plugin
installed for my editor, so if I work on a project which has stylelint
configured, it highlights me any mistakes I do in the styling I write, so
that I just correct them right away. And, if somebody does not do it this
way, any style errors will be catched by stylelint, thus we can be rejected
until contributor fixes them. Thus, I still don't see why to include
StyleFMT. But, sure, if you insist, I'll add it to the project as dev
dependency and include an npm script to trigger it.
2.
The SVG import issue is resolved. FYI I found
babel-plugin-inline-react-svg, which seems to works the same as
react-svg-loader, but as Babel plugin. So, for server-side rendering I
just add it to Babel config, and for client-side rendering, in Webpack, I
use for .svg files babel-loader with this plugin. This way it works
the same in both cases :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB5UfujCdP2PMQh_vsxtds70FhAPOzCAks5rmdcSgaJpZM4MYfFB>
.
|
@vic-topcoder @parthshah |
We had a deep dependency on https://github.com/appirio-tech/tc-ui, but we want to move those into the repository itself. The styles are located at the latest feature branch https://github.com/appirio-tech/tc-ui/tree/feature/connectv2/src/styles. We can move them in the new repo under styles, as we have to rework some of them to support theming in the future, and simplify the component styling. // FONT STACK
// --------------------------------------------------------------------------------------------
// Use the mixin to include fonts.
@mixin font-family($font-name, $font-weight, $font-style, $font-url, $font-file) {
@font-face {
font-family: '#{$font-name}';
src: url('#{$font-url}#{$font-file}.eot');
src: url('#{$font-url}#{$font-file}.eot?#iefix') format('embedded-opentype'),
url('#{$font-url}#{$font-file}.woff') format('woff'),
url('#{$font-url}#{$font-file}.ttf') format('truetype'),
url('#{$font-url}.svg##{$font-file}') format('svg');
font-weight: $font-weight;
font-style: $font-style;
}
}
// FONT WEIGHTS
// --------------------------------------------------------------------------------------------
// Use the numerical value instead of the weight name.
// 100 Thin (Hairline)
// 200 Extra Light (Ultra Light)
// 300 Light
// 400 Normal
// 500 Medium
// 600 Semi Bold (Demi Bold)
// 700 Bold
// 800 Extra Bold (Ultra Bold)
// 900 Black (Heavy)
// Roboto
@include font-family('Roboto', 900, normal, '~/src/assets/fonts/roboto/', 'roboto-black');
@include font-family('Roboto', 900, italic, '~/src/assets/fonts/roboto/', 'roboto-blackitalic');
@include font-family('Roboto', 700, normal, '~/src/assets/fonts/roboto/', 'roboto-bold');
@include font-family('Roboto', 700, italic, '~/src/assets/fonts/roboto/', 'roboto-bolditalic');
@include font-family('Roboto', 500, normal, '~/src/assets/fonts/roboto/', 'roboto-medium');
@include font-family('Roboto', 500, italic, '~/src/assets/fonts/roboto/', 'roboto-mediumitalic');
@include font-family('Roboto', 400, normal, '~/src/assets/fonts/roboto/', 'roboto-regular');
@include font-family('Roboto', 400, italic, '~/src/assets/fonts/roboto/', 'roboto-italic');
@include font-family('Roboto', 300, normal, '~/src/assets/fonts/roboto/', 'roboto-light');
@include font-family('Roboto', 300, italic, '~/src/assets/fonts/roboto/', 'roboto-lightitalic');
@include font-family('Roboto', 100, normal, '~/src/assets/fonts/roboto/', 'roboto-thin');
@include font-family('Roboto', 100, italic, '~/src/assets/fonts/roboto/', 'roboto-thinitalic'); We should add that to the styles. I think Didi can answer better on SCSS-related questions. |
- Home page is ready (with is some room for improvements, but the current version should be fine for now).
Must haves
Good To have
Sample boilerplate:
https://github.com/nicksp/redux-webpack-es6-boilerplate
Structure that supports isomorphic app - (https://reactjsnews.com/isomorphic-react-in-real-life)
The text was updated successfully, but these errors were encountered: