react-fs-router 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,16 +15,16 @@ npm install react-fs-router
|
|
|
15
15
|
|
|
16
16
|
## Usage
|
|
17
17
|
|
|
18
|
-
The position of a file in the folder structure defines
|
|
18
|
+
The position of a file in the folder structure defines its path. Files named index are treated as the root file in each folder.
|
|
19
19
|
You can define a dynamic route by placing the name of the file in brackets. ie: [id].js ==> :id
|
|
20
20
|
|
|
21
|
-
| Arguments
|
|
22
|
-
|
|
23
|
-
| -i
|
|
24
|
-
| -o
|
|
25
|
-
| -ext
|
|
26
|
-
| -p
|
|
27
|
-
| -b
|
|
21
|
+
| Arguments | Result |
|
|
22
|
+
|-------------------------------| ------------------------------------------------------------------------------------------------------------- |
|
|
23
|
+
| -i --input <directory> | Path to watch for changes. Required. |
|
|
24
|
+
| -o --output <output> | Optional argument that takes a path to place output files in. Defaults to the input directory. |
|
|
25
|
+
| -ext --extention <extention> | Optional argument to change the file extension of the output files. Defaults to .js . |
|
|
26
|
+
| -p --pageProperties [type] | Optional boolean argument to disable generating page_properties file. Defaults to false. |
|
|
27
|
+
| -b --build [type] | Optional boolean argument that tells the program to run once. Defaults to false. Intended for build commands. |
|
|
28
28
|
|
|
29
29
|
```JSON
|
|
30
30
|
"scripts": {
|
|
@@ -92,7 +92,7 @@ function App() {
|
|
|
92
92
|
}
|
|
93
93
|
return renders;
|
|
94
94
|
}
|
|
95
|
-
return <Switch>{
|
|
95
|
+
return <Switch>{renderConponents(Pages)}</Switch>;
|
|
96
96
|
}
|
|
97
97
|
```
|
|
98
98
|
|
|
@@ -106,7 +106,7 @@ Place this component inside BrowserRouter
|
|
|
106
106
|
|
|
107
107
|
## Using with Ant Pro Layout
|
|
108
108
|
|
|
109
|
-
The
|
|
109
|
+
The properties file generated by this library can be easily used with Ant Designs pro layout component.
|
|
110
110
|
The following is an example using an hoc:
|
|
111
111
|
|
|
112
112
|
```javascript xml
|