-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 28da252
Showing
83 changed files
with
10,997 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
|
||
# Change these settings to your own preference | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# We recommend you to keep these unchanged | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
# editorconfig-tools is unable to ignore longs strings or urls | ||
max_line_length = null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/** | ||
* React Starter Kit (https://www.reactstarterkit.com/) | ||
* | ||
* Copyright © 2014-present Kriasoft, LLC. All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE.txt file in the root directory of this source tree. | ||
*/ | ||
|
||
// ESLint configuration | ||
// http://eslint.org/docs/user-guide/configuring | ||
module.exports = { | ||
parser: 'babel-eslint', | ||
|
||
extends: [ | ||
'airbnb', | ||
'plugin:css-modules/recommended', | ||
], | ||
|
||
plugins: [ | ||
'css-modules', | ||
], | ||
|
||
globals: { | ||
__DEV__: true, | ||
}, | ||
|
||
env: { | ||
browser: true, | ||
}, | ||
|
||
rules: { | ||
// `js` and `jsx` are common extensions | ||
// `mjs` is for `universal-router` only, for now | ||
'import/extensions': [ | ||
'error', | ||
'always', | ||
{ | ||
js: 'never', | ||
jsx: 'never', | ||
mjs: 'never', | ||
}, | ||
], | ||
|
||
// Not supporting nested package.json yet | ||
// https://github.com/benmosher/eslint-plugin-import/issues/458 | ||
'import/no-extraneous-dependencies': 'off', | ||
|
||
// Recommend not to leave any console.log in your code | ||
// Use console.error, console.warn and console.info instead | ||
'no-console': [ | ||
'error', | ||
{ | ||
allow: ['warn', 'error', 'info'], | ||
}, | ||
], | ||
|
||
// Allow js files to use jsx syntax, too | ||
'react/jsx-filename-extension': 'off', | ||
|
||
// https://github.com/kriasoft/react-starter-kit/pull/961 | ||
// You can reopen this if you still want this rule | ||
'react/prefer-stateless-function': 'off', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ignore] | ||
.*/build | ||
.*/docs | ||
.*/node_modules | ||
.*/public | ||
|
||
[include] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Automatically normalize line endings for all text-based files | ||
# http://git-scm.com/docs/gitattributes#_end_of_line_conversion | ||
* text=auto | ||
|
||
# For the following file types, normalize line endings to LF on | ||
# checkin and prevent conversion to CRLF when they are checked out | ||
# (this is required in order to prevent newline related issues like, | ||
# for example, after the build script is run) | ||
.* text eol=lf | ||
*.html text eol=lf | ||
*.css text eol=lf | ||
*.less text eol=lf | ||
*.scss text eol=lf | ||
*.sss text eol=lf | ||
*.js text eol=lf | ||
*.json text eol=lf | ||
*.md text eol=lf | ||
*.sh text eol=lf | ||
*.txt text eol=lf | ||
*.xml text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Include your project-specific ignores in this file | ||
# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files | ||
|
||
.idea | ||
build | ||
database.sqlite | ||
node_modules | ||
npm-debug.log | ||
yarn-error.log | ||
coverage | ||
.nyc_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"require": [ | ||
"babel-register" | ||
], | ||
"include": [ | ||
"src" | ||
], | ||
"reporter": [ | ||
"lcov", | ||
"text" | ||
], | ||
"sourceMap": false, | ||
"instrument": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* React Starter Kit (https://www.reactstarterkit.com/) | ||
* | ||
* Copyright © 2014-present Kriasoft, LLC. All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE.txt file in the root directory of this source tree. | ||
*/ | ||
|
||
// stylelint configuration | ||
// https://stylelint.io/user-guide/configuration/ | ||
module.exports = { | ||
|
||
// The standard config based on a handful of CSS style guides | ||
// https://github.com/stylelint/stylelint-config-standard | ||
extends: 'stylelint-config-standard', | ||
|
||
rules: { | ||
'property-no-unknown': [true, { | ||
ignoreProperties: [ | ||
// CSS Modules composition | ||
// https://github.com/css-modules/css-modules#composition | ||
'composes' | ||
] | ||
}], | ||
|
||
'selector-pseudo-class-no-unknown': [true, { | ||
ignorePseudoClasses: [ | ||
// CSS Modules :global scope | ||
// https://github.com/css-modules/css-modules#exceptions | ||
'global' | ||
] | ||
}], | ||
|
||
// Opinionated rule, you can disable it if you want | ||
'string-quotes': 'single', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
language: node_js | ||
node_js: | ||
- '7' | ||
- '6' | ||
env: | ||
- CXX=g++-4.8 | ||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- g++-4.8 | ||
script: | ||
- yarn lint | ||
- yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
## React Starter Kit Change Log | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
### [Unreleased][unreleased] | ||
|
||
- Split the `App` component into `App` setting context variables and `Layout` setting general look and feel of the app (BREAKING CHANGE) | ||
- Upgrade `history` npm module to v4.x, update `Link` component (BREAKING CHANGE) | ||
- Remove `core/createHistory.js` in favor of initializing a new history instance inside `server.js` and `client.js` (BREAKING CHANGE) | ||
- Remove Jade dependency in favor of React-based templates: `src/views/index.jade => src/components/Html` | ||
(BREAKING CHANGE) [#711](https://github.com/kriasoft/react-starter-kit/pull/711) | ||
- Update `isomorphic-style-loader` to `v1.0.0`, it adds comparability with ES2015+ decorators. | ||
Code such as `export default withStyles(MyComponent, style1, style2)` must be replaced with | ||
`export default withStyles(style1, style2)(MyComponent)` (BREAKING CHANGE). | ||
- Replace Jest with Mocha, Chai, Sinon. Unit test files must be renamed from | ||
`MyComponent/__test__/MyComponent-test.js` to `MyComponent/MyComponent.test.js` (BREAKING CHANGE). | ||
- Remove `actions`, `stores` folders since there is no Flux library included into the kit | ||
- Rename `server` variable in `server.js` to `app` | ||
- Integrate [Sequelize](http://docs.sequelizejs.com/) to make the project compatible with different types of databases | ||
- Rename `onSetTitle`, `onSetMeta` context variables to `setTitle`, `setMeta` | ||
- Move `Content` component to `src/routes/content` | ||
- Move `ErrorPage` component to `src/routes/error` | ||
- Move the list of top-level routes to `src/routes/index` | ||
- Update routing to use `universal-router` library | ||
- Move Babel, ESLint and JSCS configurations to `package.json` [#497](https://github.com/kriasoft/react-starter-kit/pull/497) | ||
- Convert `Feedback`, `Footer`, `Header`, and `Navigation` to functional stateless components | ||
- Move page / screen components into the `src/routes` folder along with the routing information for them (BREAKING CHANGE). [6553936](https://github.com/kriasoft/react-starter-kit/commit/6553936e693e24a8ac6178f4962af15e0ea87dfd) | ||
|
||
### [v0.5.1] | ||
> 2016-03-02 | ||
- Remove `Html` React component in favor of compiled Jade templates (`src/views`) (BREAKING CHANGE). [e188388](https://github.com/kriasoft/react-starter-kit/commit/e188388f87069cdc7d501b385d6b0e46c98fed60) | ||
- Add global error handling in Node.js/Express app. [e188388](https://github.com/kriasoft/react-starter-kit/commit/e188388f87069cdc7d501b385d6b0e46c98fed60) | ||
- Add support for Markdown and HTML for static pages. [#469](https://github.com/kriasoft/react-starter-kit/pull/469), [#477](https://github.com/kriasoft/react-starter-kit/pull/477) | ||
|
||
### [v0.5.0] | ||
> 2016-02-27 | ||
- Replace RESTful API endpoint (`src/api`) with GraphQL (`src/data`) | ||
- Add a sample GraphQL endpoint [localhost:3000/graphql](https://localhost:3000/graphql) | ||
- Change the default Node.js server port from `5000` to `3000` | ||
- Add a JWT-based authentication cookies (see `src/server.js`) | ||
- Add a reference implementation of Facebook authentication strategy (`src/core/passport.js`) | ||
- Add a sample database client utility for PostgreSQL (`src/core/db.js`) | ||
- Optimize the `tools/start.js` script that launches dev server with Browsersync and HMR | ||
- Replace Superagent with WHATWG Fetch library | ||
- Rename `app.js` to `client.js` (aka client-side code) | ||
- Integrate [CSS Modules](https://github.com/css-modules/css-modules) and | ||
[isomorphic-style-loader](https://github.com/kriasoft/isomorphic-style-loader) | ||
- Move `DOMUtils.js` to `src/core` folder; remove `src/utils` folder | ||
- Replace [cssnext](http://cssnext.io/) with [precss](https://github.com/jonathantneal/precss) | ||
- Update build automation scripts to use plain functions | ||
- Add support of `--release` and `--verbose` flags to build scripts | ||
- Add `CHANGELOG.md` file with a list of notable changes to this project | ||
|
||
### [v0.4.1] | ||
> 2015-10-04 | ||
- Replace React Hot Loader (deprecated) with React Transform | ||
- Replace `index.html` template with `Html` (shell) React component | ||
- Update the deployment script (`tools/deploy.js`), add Git-based deployment example | ||
- Update ESLint and JSCS settings to use AirBnb JavaScript style guide | ||
- Update `docs/how-to-configure-text-editors.md` to cover Atom editor | ||
- Update NPM production and dev dependencies to use the latest versions | ||
|
||
[unreleased]: https://github.com/kriasoft/react-starter-kit/compare/v0.5.1...HEAD | ||
[v0.5.1]: https://github.com/kriasoft/react-starter-kit/compare/v0.5.0...v0.5.1 | ||
[v0.5.0]: https://github.com/kriasoft/react-starter-kit/compare/v0.4.1...v0.5.0 | ||
[v0.4.1]: https://github.com/kriasoft/react-starter-kit/compare/v0.4.0...v0.4.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
## Contributing to React Starter Kit | ||
|
||
React Starter Kit is currently the most widely adopted Node.js/React boilerplate used by many | ||
tech startups around the globe. We're working hard to keep it up to date, making sure that it | ||
follows best practices and high coding standards, paying extremely close attention to details. | ||
|
||
Your contributions are welcome and are greatly appreciated! Every little bit helps, and credit | ||
will always be given. | ||
|
||
Please take a moment to review this document in order to make the contribution process easy and | ||
effective for everyone involved. | ||
|
||
### Conduct | ||
|
||
Please, follow the [golden rule](https://en.wikipedia.org/wiki/Golden_Rule). Be respectful, even to | ||
those that are disrespectful. | ||
|
||
### Feedback | ||
|
||
Feedback is the breakfast for champions! We'd love to hear your opinions, discuss potential | ||
improvements, architecture, theory, internal implementation, etc. Please, join or start a new | ||
conversation in our [issue tracker](https://github.com/kriasoft/react-starter-kit/issues), | ||
[Gitter](https://gitter.im/kriasoft/react-starter-kit) chat room, or let's talk face-to-face on | ||
[Appear.in](https://appear.in/react) or [Skype](http://hatscripts.com/addskype?koistya). | ||
|
||
### Documentation | ||
|
||
We need your help with improving documentation to the project. This might be the easiest way for | ||
you to contribute, because you don't even need to clone the repo but can edit or create new `.md` | ||
files right from GitHub website as described [here](https://help.github.com/articles/editing-files-in-your-repository/). | ||
|
||
### Bugs & Feature Requests | ||
|
||
Before opening an issue, please: | ||
|
||
* Check the [Getting Started](https://github.com/kriasoft/react-starter-kit/blob/master/docs/getting-started.md) guide. | ||
* Search the [issue tracker](https://github.com/kriasoft/react-starter-kit/issues) to make sure | ||
your issue hasn’t already been reported. | ||
* If your issue sounds more like a question, please post it on StackOverflow.com instead with the | ||
tag [react-starter-kit](http://stackoverflow.com/questions/tagged/react-starter-kit). | ||
|
||
### Pull Requests | ||
|
||
Before you submit a [pull request](https://help.github.com/articles/using-pull-requests/) from your | ||
forked repo, check that it meets these guidelines: | ||
|
||
* If the pull request adds functionality, the docs should be updated as part of the same PR. | ||
* Create a separate PR for each small feature or bug fix. | ||
* [Squash](http://stackoverflow.com/questions/5189560/squash-my-last-x-commits-together-using-git) | ||
your commits into one for each PR. | ||
* Run `yarn test` to make sure that your code style is OK and there are no any regression bugs. | ||
* When contributing to an opt-in feature, apply the `[feature/...]` tag as a prefix to your PR title | ||
|
||
#### Style Guide | ||
|
||
Our linter will catch most styling issues that may exist in your code. You can check the status | ||
of your code styling by simply running: `yarn lint` | ||
|
||
However, there are still some styles that the linter cannot pick up. If you are unsure about | ||
something, looking at [Airbnb's Style Guide](https://github.com/airbnb/javascript) will guide you | ||
in the right direction. | ||
|
||
### License | ||
|
||
By contributing to React Starter Kit, you agree that your contributions will be licensed under its | ||
[MIT license](https://github.com/kriasoft/react-starter-kit/blob/master/LICENSE.txt). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM node:7.9.0-alpine | ||
|
||
# Set a working directory | ||
WORKDIR /usr/src/app | ||
|
||
COPY ./build/package.json . | ||
|
||
# Install Node.js dependencies | ||
RUN yarn install --production --no-progress | ||
|
||
# Copy application files | ||
COPY ./build . | ||
|
||
CMD [ "node", "server.js" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License | ||
|
||
Copyright (c) 2014-present Konstantin Tarkus, Kriasoft LLC. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
Oops, something went wrong.