Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d6aebf7

Browse files
author
schowdhury
committed
(Readme+Test): Added/updated section/s in Readme.md and changed file structure for tests
1 parent d7a8e0e commit d6aebf7

File tree

4 files changed

+34
-8
lines changed

4 files changed

+34
-8
lines changed

‎README.md‎

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,17 @@ A minimal boilerplate to reactive programming using `react.js`, `redux`, `redux-
77
- npm install
88
- npm install gulp -g
99

10-
## Packages used
10+
## Overview
11+
12+
File structure is "Feature/Domain-style" - separate folders per feature.
13+
14+
This setup is fairly straight forward for those who are aware of [RxJs](https://rxjs-dev.firebaseapp.com) and [React - Redux](https://redux.js.org/basics/usagewithreact). Also for those who dont know [RxJs](https://rxjs-dev.firebaseapp.com) but familiar with [React - Redux](https://redux.js.org/basics/usagewithreact), going through Rxjs and [redux-observable](https://redux-observable.js.org) documentations (for brief understanding) should make you comfortable. But for those who are not aware of either of those, then I think its better if you can grasp some knowledge of [React - Redux](https://redux.js.org/basics/usagewithreact) and [RxJs](https://rxjs-dev.firebaseapp.com) first.
15+
16+
### Given EXAMPLE
17+
18+
This boilerplate is bundled with a simple example of - "button click and display change" and not "Hello World!" example, as would be fairly simple for this kind of setup. There was a need of putting an examples which uses the underlying concepts of reactive programming using [**React - Redux**](https://redux.js.org/basics/usagewithreact) and [**redux-observable**](https://redux-observable.js.org) THE - "Action, Epic, Selecor, Reducer".
19+
20+
## Packages overview
1121

1222
- React.js
1323
- Redux (react-redux)
@@ -18,9 +28,23 @@ A minimal boilerplate to reactive programming using `react.js`, `redux`, `redux-
1828
- **Webpack**: For rest of the tasks ;)
1929
- Jest (testing)
2030

31+
2132
## Style
2233

23-
Considering this boilerplate to be used for single page appliation, `./app/src/styles/index.min.css` file deligates all the styles (in form of `[name].less` in each features) added in the project, in minified form. This file is generated (and updated) each time application is started.
34+
We are using [Less](http://lesscss.org) preprocessor by default, as it is most widely used and pretty simple. We're using [Gulp](https://gulpjs.com) to convert all the `*.less` files into `*.css` as Gulp is better when it comes to handling static assets, also because it is very easy to understand and use.
35+
Considering this boilerplate to be used for single page appliation, `./app/src/styles/index.min.css` file deligates all the styles (in form of `[name].less` in each features) useed in the project. This file is generated (and updated) each time application is started.
2436

2537
> To be noted: `gulp watch` is active in development when the application is started using `npm start`. So any changes to any [*].less file will be watched when the server is on.
2638
39+
**Change to [Sass](https://sass-lang.com)?**
40+
41+
1. Install [gulp-sass](https://www.npmjs.com/package/gulp-sass) `npm install gulp-sass --save-dev`
42+
2. Change file type of `./app/src/index.less` to `./app/src/index.scss`
43+
3. Open `./gulpfile.js` and make the necessary changes according to the [documentation](https://www.npmjs.com/package/gulp-sass)
44+
4. And don't forget to check the `"scripts"` part of the `.\package.json` file.
45+
46+
## Test
47+
48+
We're using [Jest](https://jestjs.io/docs/en/tutorial-async) by facebook, as it's popular among React.js community, also because it is easy, well documented and does the job!
49+
50+
Use `npm test` or `npm t` to run example test.
File renamed without changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import mockState from "../../../_mocks/mockState";
2+
import {selectAuthInfo} from "../selectAuthInfo";
3+
4+
describe("Testing example selector 'selectAuthInfo'", () => {
5+
it ("Expect FALSE as default", () => {
6+
expect(selectAuthInfo(mockState)).toBe(false)
7+
});
8+
});

‎app/tests/selectAuthInfo.test.ts‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /