You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/reactful-main/README.md
+27-18Lines changed: 27 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,64 +1,73 @@
1
1
## Reactful
2
2
3
-
A very opinionated React CLI. You can use it to generate an independent full-stack react application that's fully-configured to render on both client and server.
3
+
A very opinionated React CLI. You can use it to generate an independent
4
+
full-stack react application that's fully-configured to render on both client
This CLI requires Node 8.0 or greater, and it would work better if you have [Yarn](https://yarnpkg.com/en/) and [Git](https://git-scm.com/) on the machine.
9
+
This CLI requires Node 8.0 or greater, and it would work better if you have
10
+
[Yarn](https://yarnpkg.com/en/) and [Git](https://git-scm.com/) on the machine.
8
11
9
12
### Install
10
13
11
14
npm i -g reactful
12
15
13
-
Once installed, the package will have a global ```react``` command.
16
+
Once installed, the package will have a global `reactful` command.
14
17
15
18
### Create New React App
16
19
17
-
react new my-awesome-react-app-name
20
+
reactful new my-awesome-react-app-name
18
21
19
22
Once created, you'll see instructions on how to start it:
20
23
21
24
cd my-awesome-react-app-name
22
25
23
26
### To start the app (for development):
24
-
react start
27
+
reactful start
25
28
26
29
# The start command starts a watcher process
27
30
# which will restart node/webpack on save
28
31
29
32
### Open the app in browser:
30
-
react open
33
+
reactful open
31
34
32
35
# The app will be running on localhost:4242 by default
33
36
34
37
### To run tests:
35
-
react test
38
+
reactful test
36
39
37
40
### To build for production:
38
-
react build
41
+
reactful build
39
42
40
43
### To start the app for production:
41
-
react prod
44
+
reactful prod
42
45
43
-
The generated app is completely independent from the reactful package. At this point you can part ways with the reactful package and do your own thing, but if you follow the patterns initialized by the package, you can use a few handy commands from the global react command.
46
+
The generated app is completely independent from the reactful package. At this
47
+
point you can part ways with the reactful package and do your own thing, but if
48
+
you follow the patterns initialized by the package, you can use a few handy
49
+
commands from the global react command.
44
50
45
51
### Update Existing React App
46
52
47
-
While in a React application that's created with this tool, you can always revert things back the default configurations with the init command. You can also use this command in an empty directory.
53
+
While in a React application that's created with this tool, you can always
54
+
revert things back the default configurations with the init command. You can
55
+
also use this command in an empty directory.
48
56
49
57
cd my-awesome-react-app-name
50
-
react init
58
+
reactful init
51
59
52
-
If that directory already has files, reactful will ask you if you want to override them.
60
+
If that directory already has files, reactful will ask you if you want to
61
+
override them.
53
62
54
63
### Creating Components
55
64
56
-
- Create a New Component: ```react c ComponentName```
57
-
- Create a New Pure Component: ```react pc ComponentName```
58
-
- Create a New Function Component: ```react fc ComponentName```
59
-
60
-
All of these commands will also create a jest snapshot test for the generated component.
65
+
- Create a New Component: `reactful c ComponentName`
66
+
- Create a New Pure Component: `reactful pc ComponentName`
67
+
- Create a New Function Component: `reactful fc ComponentName`
61
68
69
+
All of these commands will also create a jest snapshot test for the generated
0 commit comments