diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cb72826b..d6803765d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ All notable changes to this project will be documented in this file. - 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) @@ -34,6 +35,7 @@ All notable changes to this project will be documented in this file. - 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`) @@ -54,6 +56,7 @@ All notable changes to this project will be documented in this file. - 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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aab3a8774..24e66a167 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,10 +33,10 @@ files right from GitHub website as described [here](https://help.github.com/arti 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 +- 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 +- 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 @@ -44,12 +44,12 @@ Before opening an issue, please: 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) +- 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 +- 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 diff --git a/README.md b/README.md index 817c3ac23..9a0e225ec 100644 --- a/README.md +++ b/README.md @@ -21,31 +21,29 @@ and newcomers to the industry. Hiring

- ### Getting Started - * Follow the [getting started guide](./docs/getting-started.md) to download and run the project - ([Node.js](https://nodejs.org/) >= 6.9) - * Check the [code recipes](./docs/recipes) used in this boilerplate, or share yours - +- Follow the [getting started guide](./docs/getting-started.md) to download and run the project + ([Node.js](https://nodejs.org/) >= 6.9) +- Check the [code recipes](./docs/recipes) used in this boilerplate, or share yours ### Customization The `master` branch of React Starter Kit doesn't include a Flux implementation or any other -advanced integrations. Nevertheless, we have some integrations available to you in *feature* +advanced integrations. Nevertheless, we have some integrations available to you in _feature_ branches that you can use either as a reference or merge into your project: - * [feature/redux](https://github.com/kriasoft/react-starter-kit/tree/feature/redux) ([PR](https://github.com/kriasoft/react-starter-kit/pull/1084)) - — isomorphic Redux by [Pavel Lang](https://github.com/langpavel) - (see [how to integrate Redux](./docs/recipes/how-to-integrate-redux.md)) (based on `master`) - * [feature/apollo](https://github.com/kriasoft/react-starter-kit/tree/feature/apollo) ([PR](https://github.com/kriasoft/react-starter-kit/pull/1147)) - — isomorphic Apollo Client by [Pavel Lang](https://github.com/langpavel) - (see [Tracking PR #1147](https://github.com/kriasoft/react-starter-kit/pull/1147)) (based on `feature/redux`) - * [feature/react-intl](https://github.com/kriasoft/react-starter-kit/tree/feature/react-intl) ([PR](https://github.com/kriasoft/react-starter-kit/pull/1135)) - — isomorphic Redux and React Intl by [Pavel Lang](https://github.com/langpavel) - (see [how to integrate React Intl](./docs/recipes/how-to-integrate-react-intl.md)) (based on `feature/apollo`) - * [feature/apollo-pure](https://github.com/kriasoft/react-starter-kit/tree/feature/apollo-pure) ([PR](https://github.com/kriasoft/react-starter-kit/pull/1666)) - — Apollo devtools and TypeScript integration by [piglovesyou](https://github.com/piglovesyou) (based on `master`) +- [feature/redux](https://github.com/kriasoft/react-starter-kit/tree/feature/redux) ([PR](https://github.com/kriasoft/react-starter-kit/pull/1084)) + — isomorphic Redux by [Pavel Lang](https://github.com/langpavel) + (see [how to integrate Redux](./docs/recipes/how-to-integrate-redux.md)) (based on `master`) +- [feature/apollo](https://github.com/kriasoft/react-starter-kit/tree/feature/apollo) ([PR](https://github.com/kriasoft/react-starter-kit/pull/1147)) + — isomorphic Apollo Client by [Pavel Lang](https://github.com/langpavel) + (see [Tracking PR #1147](https://github.com/kriasoft/react-starter-kit/pull/1147)) (based on `feature/redux`) +- [feature/react-intl](https://github.com/kriasoft/react-starter-kit/tree/feature/react-intl) ([PR](https://github.com/kriasoft/react-starter-kit/pull/1135)) + — isomorphic Redux and React Intl by [Pavel Lang](https://github.com/langpavel) + (see [how to integrate React Intl](./docs/recipes/how-to-integrate-react-intl.md)) (based on `feature/apollo`) +- [feature/apollo-pure](https://github.com/kriasoft/react-starter-kit/tree/feature/apollo-pure) ([PR](https://github.com/kriasoft/react-starter-kit/pull/1666)) + — Apollo devtools and TypeScript integration by [piglovesyou](https://github.com/piglovesyou) (based on `master`) You can see status of most reasonable merge combination as [PRs labeled as `TRACKING`](https://github.com/kriasoft/react-starter-kit/labels/TRACKING) @@ -53,7 +51,6 @@ If you think that any of these features should be on `master`, or vice versa, so removed from the `master` branch, please [let us know](https://gitter.im/kriasoft/react-starter-kit). We love your feedback! - ### Comparison @@ -151,7 +148,6 @@ We love your feedback!
- ### Backers ♥ React Starter Kit? Help us keep it alive by donating funds to cover project @@ -180,7 +176,6 @@ expenses via [OpenCollective](https://opencollective.com/react-starter-kit) or - ### How to Contribute Anyone and everyone is welcome to [contribute](CONTRIBUTING.md) to this project. The best way to @@ -190,35 +185,31 @@ start is by checking our [open issues](https://github.com/kriasoft/react-starter participate in discussions, upvote or downvote the issues you like or dislike, send [pull requests](CONTRIBUTING.md#pull-requests). - ### Learn More - * [Getting Started with React.js](http://facebook.github.io/react/) - * [Getting Started with GraphQL and Relay](https://quip.com/oLxzA1gTsJsE) - * [React.js Questions on StackOverflow](http://stackoverflow.com/questions/tagged/reactjs) - * [React.js Discussion Board](https://discuss.reactjs.org/) - * [Flux Architecture for Building User Interfaces](http://facebook.github.io/flux/) - * [Enzyme — JavaScript Testing utilities for React](http://airbnb.io/enzyme/) - * [Flow — A static type checker for JavaScript](http://flowtype.org/) - * [The Future of React](https://github.com/reactjs/react-future) - * [Learn ES6](https://babeljs.io/docs/learn-es6/), [ES6 Features](https://github.com/lukehoban/es6features#readme) - +- [Getting Started with React.js](http://facebook.github.io/react/) +- [Getting Started with GraphQL and Relay](https://quip.com/oLxzA1gTsJsE) +- [React.js Questions on StackOverflow](http://stackoverflow.com/questions/tagged/reactjs) +- [React.js Discussion Board](https://discuss.reactjs.org/) +- [Flux Architecture for Building User Interfaces](http://facebook.github.io/flux/) +- [Enzyme — JavaScript Testing utilities for React](http://airbnb.io/enzyme/) +- [Flow — A static type checker for JavaScript](http://flowtype.org/) +- [The Future of React](https://github.com/reactjs/react-future) +- [Learn ES6](https://babeljs.io/docs/learn-es6/), [ES6 Features](https://github.com/lukehoban/es6features#readme) ### Related Projects - * [GraphQL Starter Kit](https://github.com/kriasoft/graphql-starter-kit) — Boilerplate for building data APIs with Node.js, JavaScript (via Babel) and GraphQL - * [Membership Database](https://github.com/membership/membership.db) — SQL schema boilerplate for user accounts, profiles, roles, and auth claims - * [Babel Starter Kit](https://github.com/kriasoft/babel-starter-kit) — Boilerplate for authoring JavaScript/React.js libraries - +- [GraphQL Starter Kit](https://github.com/kriasoft/graphql-starter-kit) — Boilerplate for building data APIs with Node.js, JavaScript (via Babel) and GraphQL +- [Membership Database](https://github.com/membership/membership.db) — SQL schema boilerplate for user accounts, profiles, roles, and auth claims +- [Babel Starter Kit](https://github.com/kriasoft/babel-starter-kit) — Boilerplate for authoring JavaScript/React.js libraries ### Support - * [#react-starter-kit](http://stackoverflow.com/questions/tagged/react-starter-kit) on Stack Overflow — Questions and answers - * [#react-starter-kit](https://gitter.im/kriasoft/react-starter-kit) on Gitter — Watch announcements, share ideas and feedback - * [GitHub issues](https://github.com/kriasoft/react-starter-kit/issues), or [Scrum board](https://waffle.io/kriasoft/react-starter-kit) — File issues, send feature requests - * [appear.in/react](https://appear.in/react) — Open hours! Exchange ideas and experiences (React, GraphQL, startups and pet projects) - * [@koistya](https://twitter.com/koistya) on [Codementor](https://www.codementor.io/koistya), or [Skype](http://hatscripts.com/addskype?koistya) — Private consulting - +- [#react-starter-kit](http://stackoverflow.com/questions/tagged/react-starter-kit) on Stack Overflow — Questions and answers +- [#react-starter-kit](https://gitter.im/kriasoft/react-starter-kit) on Gitter — Watch announcements, share ideas and feedback +- [GitHub issues](https://github.com/kriasoft/react-starter-kit/issues), or [Scrum board](https://waffle.io/kriasoft/react-starter-kit) — File issues, send feature requests +- [appear.in/react](https://appear.in/react) — Open hours! Exchange ideas and experiences (React, GraphQL, startups and pet projects) +- [@koistya](https://twitter.com/koistya) on [Codementor](https://www.codementor.io/koistya), or [Skype](http://hatscripts.com/addskype?koistya) — Private consulting ### License @@ -228,6 +219,7 @@ file. The documentation to the project is licensed under the [CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/) license. --- + Made with ♥ by Konstantin Tarkus ([@koistya](https://twitter.com/koistya)) and [contributors](https://github.com/kriasoft/react-starter-kit/graphs/contributors) [rsk]: https://www.reactstarterkit.com diff --git a/docs/README.md b/docs/README.md index 99f478a28..b261f203b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,22 +2,22 @@ ### General -* [Getting Started](./getting-started.md) -* [React Style Guide](./react-style-guide.md) -* [How to configure text editors and IDEs](./how-to-configure-text-editors.md) -* [Data fetching with WHATWG Fetch](./data-fetching.md) -* [Testing your application](./testing-your-application.md) +- [Getting Started](./getting-started.md) +- [React Style Guide](./react-style-guide.md) +- [How to configure text editors and IDEs](./how-to-configure-text-editors.md) +- [Data fetching with WHATWG Fetch](./data-fetching.md) +- [Testing your application](./testing-your-application.md) ### Questions -* [Which module bundler should I use?](https://github.com/kriasoft/react-starter-kit/issues/3) -* [Which Flux implementation should I use?](https://github.com/kriasoft/react-starter-kit/issues/22) +- [Which module bundler should I use?](https://github.com/kriasoft/react-starter-kit/issues/3) +- [Which Flux implementation should I use?](https://github.com/kriasoft/react-starter-kit/issues/22) ### Recipes -* [How to Implement Routing and Navigation](./recipes/how-to-implement-routing.md) -* [How to Integrate Redux](./recipes/how-to-integrate-redux.md) -* [How to Integrate React Intl](./recipes/how-to-integrate-react-intl.md) -* [How to Integrate Disqus](./recipes/how-to-integrate-disqus.md) -* [How to Use Sass/SCSS](./recipes/how-to-use-sass.md) -* [How to Configure Facebook Login](./recipes/how-to-configure-facebook-login.md) +- [How to Implement Routing and Navigation](./recipes/how-to-implement-routing.md) +- [How to Integrate Redux](./recipes/how-to-integrate-redux.md) +- [How to Integrate React Intl](./recipes/how-to-integrate-react-intl.md) +- [How to Integrate Disqus](./recipes/how-to-integrate-disqus.md) +- [How to Use Sass/SCSS](./recipes/how-to-use-sass.md) +- [How to Configure Facebook Login](./recipes/how-to-configure-facebook-login.md) diff --git a/docs/data-fetching.md b/docs/data-fetching.md index 1ce808b16..b1d3919ef 100644 --- a/docs/data-fetching.md +++ b/docs/data-fetching.md @@ -54,7 +54,7 @@ class Post extends React.Component { #### Related articles -* [That's so fetch!](https://jakearchibald.com/2015/thats-so-fetch/) by +- [That's so fetch!](https://jakearchibald.com/2015/thats-so-fetch/) by [Jake Archibald](https://twitter.com/jaffathecake) [fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch diff --git a/docs/getting-started.md b/docs/getting-started.md index a06d5d454..41d456213 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -2,10 +2,10 @@ ### Requirements -* Mac OS X, Windows, or Linux -* [Yarn](https://yarnpkg.com/) package + [Node.js](https://nodejs.org/) v6.9 or +- Mac OS X, Windows, or Linux +- [Yarn](https://yarnpkg.com/) package + [Node.js](https://nodejs.org/) v6.9 or newer -* Text editor or IDE pre-configured with React/JSX/Flow/ESlint +- Text editor or IDE pre-configured with React/JSX/Flow/ESlint ([learn more](./how-to-configure-text-editors.md)) ### Directory Layout diff --git a/docs/how-to-configure-text-editors.md b/docs/how-to-configure-text-editors.md index 21d536b7a..786dc041d 100644 --- a/docs/how-to-configure-text-editors.md +++ b/docs/how-to-configure-text-editors.md @@ -32,10 +32,10 @@ Enable **CSSComb** by following the instructions Install atom packages -* [linter](https://atom.io/packages/linter) -* [linter-eslint](https://atom.io/packages/linter-eslint) -* [linter-stylelint](https://atom.io/packages/linter-stylelint) -* [react](https://atom.io/packages/react) +- [linter](https://atom.io/packages/linter) +- [linter-eslint](https://atom.io/packages/linter-eslint) +- [linter-stylelint](https://atom.io/packages/linter-stylelint) +- [react](https://atom.io/packages/react) ```shell apm install linter linter-eslint react linter-stylelint @@ -43,10 +43,10 @@ apm install linter linter-eslint react linter-stylelint Install local npm packages -* [eslint](https://www.npmjs.com/package/eslint) -* [babel-eslint](https://www.npmjs.com/package/babel-eslint) -* [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) -* [stylelint](https://www.npmjs.com/package/stylelint) +- [eslint](https://www.npmjs.com/package/eslint) +- [babel-eslint](https://www.npmjs.com/package/babel-eslint) +- [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) +- [stylelint](https://www.npmjs.com/package/stylelint) ```shell yarn add --dev eslint babel-eslint eslint-plugin-react stylelint @@ -60,10 +60,10 @@ Install SublimeText packages\ Easiest with [Package Control](https://packagecontrol.io/) and then "Package Control: Install Package" (Ctrl+Shift+P) -* [Babel](https://packagecontrol.io/packages/Babel) -* [Sublime-linter](http://www.sublimelinter.com/en/latest/) -* [SublimeLinter-contrib-eslint](https://packagecontrol.io/packages/SublimeLinter-contrib-eslint) -* [SublimeLinter-contrib-stylelint](https://packagecontrol.io/packages/SublimeLinter-contrib-stylelint) +- [Babel](https://packagecontrol.io/packages/Babel) +- [Sublime-linter](http://www.sublimelinter.com/en/latest/) +- [SublimeLinter-contrib-eslint](https://packagecontrol.io/packages/SublimeLinter-contrib-eslint) +- [SublimeLinter-contrib-stylelint](https://packagecontrol.io/packages/SublimeLinter-contrib-stylelint) You can also use [SublimeLinter-contrib-eslint_d](https://packagecontrol.io/packages/SublimeLinter-contrib-eslint_d) @@ -71,11 +71,11 @@ for faster linting. Set Babel as default syntax for a particular extension: -* Open a file with that extension, -* Select `View` from the menu, -* Then `Syntax` `->` `Open all with current extension as...` `->` `Babel` `->` +- Open a file with that extension, +- Select `View` from the menu, +- Then `Syntax` `->` `Open all with current extension as...` `->` `Babel` `->` `JavaScript (Babel)`. -* Repeat this for each extension (e.g.: .js and .jsx). +- Repeat this for each extension (e.g.: .js and .jsx). Install local npm packages diff --git a/docs/recipes/how-to-implement-routing.md b/docs/recipes/how-to-implement-routing.md index 3bca9495a..c306a1281 100644 --- a/docs/recipes/how-to-implement-routing.md +++ b/docs/recipes/how-to-implement-routing.md @@ -206,25 +206,25 @@ module that is built around the same concepts demonstrated earlier with the majo it supports nested routes and provides you with the helper `Link` React component. It can be seen as a lightweight more flexible alternative to React Router. -* It has simple code with minimum dependencies (just `path-to-regexp` and `babel-runtime`) -* It can be used with any JavaScript framework such as React, Vue.js etc -* It uses the same middleware approach used in Express and Koa, making it easy to learn -* It uses the exact same API and implementation to be used in both Node.js and browser environments +- It has simple code with minimum dependencies (just `path-to-regexp` and `babel-runtime`) +- It can be used with any JavaScript framework such as React, Vue.js etc +- It uses the same middleware approach used in Express and Koa, making it easy to learn +- It uses the exact same API and implementation to be used in both Node.js and browser environments The [Getting Started page](https://github.com/kriasoft/universal-router/blob/master/docs/getting-started.md) has a few examples how to use it. ### Related Articles -* [You might not need React Router](https://medium.freecodecamp.com/you-might-not-need-react-router-38673620f3d) by Konstantin Tarkus +- [You might not need React Router](https://medium.freecodecamp.com/you-might-not-need-react-router-38673620f3d) by Konstantin Tarkus ### Related Projects -* [`path-to-regexp`](https://github.com/pillarjs/path-to-regexp) -* [`history`](https://github.com/ReactTraining/history) -* [Universal Router](https://github.com/kriasoft/universal-router) +- [`path-to-regexp`](https://github.com/pillarjs/path-to-regexp) +- [`history`](https://github.com/ReactTraining/history) +- [Universal Router](https://github.com/kriasoft/universal-router) ### Related Discussions -* [How to Implement Routing and Navigation](https://github.com/kriasoft/react-starter-kit/issues/748) -* [How to Add a Route to RSK?](https://github.com/kriasoft/react-starter-kit/issues/754) +- [How to Implement Routing and Navigation](https://github.com/kriasoft/react-starter-kit/issues/748) +- [How to Add a Route to RSK?](https://github.com/kriasoft/react-starter-kit/issues/754) diff --git a/docs/recipes/how-to-integrate-react-intl.md b/docs/recipes/how-to-integrate-react-intl.md index d518fb220..455d01020 100644 --- a/docs/recipes/how-to-integrate-react-intl.md +++ b/docs/recipes/how-to-integrate-react-intl.md @@ -44,24 +44,24 @@ Just import the appropriate [component](https://github.com/yahoo/react-intl/wiki#the-react-intl-module) from `react-intl` -* For localizable text use +- For localizable text use [``](https://github.com/yahoo/react-intl/wiki/Components#formattedmessage). -* You can also use it with +- You can also use it with the [`defineMessages()`](https://github.com/yahoo/react-intl/wiki/API#definemessages) helper. -* For date and time: +- For date and time: [``](https://github.com/yahoo/react-intl/wiki/Components#formatteddate) [``](https://github.com/yahoo/react-intl/wiki/Components#formattedtime) [``](https://github.com/yahoo/react-intl/wiki/Components#formattedrelative) -* For numbers and currencies: +- For numbers and currencies: [``](https://github.com/yahoo/react-intl/wiki/Components#formattednumber) [``](https://github.com/yahoo/react-intl/wiki/Components#formattedplural) -* If possible, do not use ``, see how to use _Rich Text Formatting_ with +- If possible, do not use ``, see how to use _Rich Text Formatting_ with [``](https://github.com/yahoo/react-intl/wiki/Components#formattedmessage) -* When you need an imperative formatting API, use the [`injectIntl`](https://github.com/yahoo/react-intl/wiki/API#injectintl) High-Order Component. +- When you need an imperative formatting API, use the [`injectIntl`](https://github.com/yahoo/react-intl/wiki/API#injectintl) High-Order Component. #### Example @@ -128,6 +128,6 @@ When editing a translation file, it should be copied to `build/messages/` direct ### Other References -* [`Intl documentation on MDN`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Intl) -* [express-request-language](https://github.com/tinganho/express-request-language#readme) +- [`Intl documentation on MDN`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Intl) +- [express-request-language](https://github.com/tinganho/express-request-language#readme) – for more details how initial language negotiation works. diff --git a/docs/recipes/how-to-integrate-redux.md b/docs/recipes/how-to-integrate-redux.md index ae595c1ad..f7b7b6fc6 100644 --- a/docs/recipes/how-to-integrate-redux.md +++ b/docs/recipes/how-to-integrate-redux.md @@ -25,12 +25,12 @@ branch instead as it also includes Redux. You can copy [`src/reducers/runtime.js`](https://github.com/kriasoft/react-starter-kit/tree/feature/redux/src/reducers/runtime.js) as a template. - * Do not forget to always return `state`. - * Never mutate provided `state`. + - Do not forget to always return `state`. + - Never mutate provided `state`. If you mutate state, rendering of connected component will not be triggered because of `===` equality. Always return new value if you perform state update. You can use this construct: `{ ...state, updatedKey: action.payload.value, }` - * Keep in mind that store state _must_ be repeatable by replaying actions on it. + - Keep in mind that store state _must_ be repeatable by replaying actions on it. For example, when you store timestamp, pass it into _action payload_. If you call REST API, do it in action. _Never do this in reducer!_ diff --git a/docs/testing-your-application.md b/docs/testing-your-application.md index f0984d5ee..6c72bc692 100644 --- a/docs/testing-your-application.md +++ b/docs/testing-your-application.md @@ -4,13 +4,13 @@ RSK comes with the following libraries for testing purposes: -* [Jest](https://facebook.github.io/jest/) - JavaScript testing library -* [Enzyme](https://github.com/airbnb/enzyme) - Testing utilities for React +- [Jest](https://facebook.github.io/jest/) - JavaScript testing library +- [Enzyme](https://github.com/airbnb/enzyme) - Testing utilities for React You may also want to take a look at the following related packages: -* [jsdom](https://github.com/tmpvar/jsdom) -* [react-addons-test-utils](https://www.npmjs.com/package/react-addons-test-utils) +- [jsdom](https://github.com/tmpvar/jsdom) +- [react-addons-test-utils](https://www.npmjs.com/package/react-addons-test-utils) ### Running tests @@ -18,7 +18,7 @@ To test your application simply run the [`yarn test`](https://github.com/kriasoft/react-starter-kit/blob/9014614edcb2f44b23298ca3287b9af3a14b6076/package.json#L152) command which will: -* recursively find all files ending with `.test.js` in your `src/` directory +- recursively find all files ending with `.test.js` in your `src/` directory ```bash yarn test @@ -26,9 +26,9 @@ yarn test ### Conventions -* test filenames MUST end with `test.js` or `yarn test` will not be able to +- test filenames MUST end with `test.js` or `yarn test` will not be able to detect them -* test filenames SHOULD be named after the related component (e.g. create +- test filenames SHOULD be named after the related component (e.g. create `Login.test.js` for `Login.js` component) ### Basic example diff --git a/tools/README.md b/tools/README.md index 2e45cc14f..07438f63e 100644 --- a/tools/README.md +++ b/tools/README.md @@ -2,24 +2,24 @@ ### `yarn start` (`start.js`) -* Cleans up the output `/build` directory (`clean.js`) -* Copies static files to the output folder (`copy.js`) -* Launches [Webpack](https://webpack.github.io/) compiler in a watch mode (via +- Cleans up the output `/build` directory (`clean.js`) +- Copies static files to the output folder (`copy.js`) +- Launches [Webpack](https://webpack.github.io/) compiler in a watch mode (via [webpack-middleware](https://github.com/kriasoft/webpack-middleware)) -* Launches Node.js server from the compiled output folder (`runServer.js`) -* Launches [Browsersync](https://browsersync.io/) and +- Launches Node.js server from the compiled output folder (`runServer.js`) +- Launches [Browsersync](https://browsersync.io/) and [Hot Module Replacement](https://webpack.github.io/docs/hot-module-replacement) ### `yarn run build` (`build.js`) -* Cleans up the output `/build` folder (`clean.js`) -* Copies static files to the output folder (`copy.js`) -* Creates application bundles with Webpack (`bundle.js`, `webpack.config.js`) +- Cleans up the output `/build` folder (`clean.js`) +- Copies static files to the output folder (`copy.js`) +- Creates application bundles with Webpack (`bundle.js`, `webpack.config.js`) ### `yarn run deploy` (`deploy.js`) -* Builds the project from source files (`build.js`) -* Pushes the contents of the `/build` folder to a remote server with Git +- Builds the project from source files (`build.js`) +- Pushes the contents of the `/build` folder to a remote server with Git ## Options @@ -46,10 +46,9 @@ $ yarn start --release # Launch dev server in production mode ## Misc -* `webpack.config.js` - Webpack configuration for both client-side and +- `webpack.config.js` - Webpack configuration for both client-side and server-side bundles -* `postcss.config.js` - PostCSS configuration for transforming styles with JS +- `postcss.config.js` - PostCSS configuration for transforming styles with JS plugins -* `run.js` - Helps to launch other scripts with `babel-node` (e.g. `babel-node - tools/run build`) -* `.eslintrc` - ESLint overrides for built automation scripts +- `run.js` - Helps to launch other scripts with `babel-node` (e.g. `babel-node tools/run build`) +- `.eslintrc` - ESLint overrides for built automation scripts