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
<a href="https://github.com/oslabs-beta/sapling/releases"><img alt="GitHub release (latest by date including pre-releases)" src="https://img.shields.io/github/v/release/oslabs-beta/sapling?include_prereleases"></a>
Sapling is a VS Code extension built with React developers in mind. As your codebase grows, your native file structure becomes less and less intuitive. Wouldn't it be nice to have a file structure that represents the actual relationships between the components and containers in your application? Wouldn't you like a quick reference to your available props, and an indication of routes and conditional rendering?
@@ -79,24 +84,26 @@ With Sapling, you don't have to guess at the parent component of your current fi
Installing from VS Code Extension Marketplace (or downloading package from GitHub?).
97
+
Installing from VS Code Extension Marketplace:
93
98
94
99
1. If needed, install Visual Studio Code for Windows (7+), macOS (Sierra+), or Linux (details).
95
100
96
101
2. Install the Sapling extension for Visual Studio Code.
97
102
98
103
3. Once complete, you'll see Sapling appear in your sidebar. You can now begin using Sapling! Check out the Getting Started below for information on how to get started.
99
104
105
+
To install sapling for development, please see the contributing section below.
106
+
100
107
## Getting Started
101
108
102
109
1. After installing VSCode Extension, you will see the extension on your sidebar. Click the "Choose a File" button.
@@ -113,7 +120,7 @@ Icon Legend in Sapling Tree View:
113
120
*[<imgstyle="height: 1em;"src="sapling/media/circle-info-solid.svg">]() available props (hover)
114
121
*[<imgstyle="height: 1em;"src="sapling/media/circle-arrow-right-solid.svg">]() open file (click)
115
122
*[<imgstyle="height: 1em;"src="sapling/media/store-solid.svg" >]() Redux store connection
116
-
*[<spanstyle='color:red;'>Navbar</span>](): error in file (matches the error color of your theme)
123
+
* <span>Navbar</span>: error in file (matches the error color of your theme)
117
124
* <b>Navbar</b>: currently open file
118
125
119
126
Sapling can currently display React apps made with TSX/JSX and ES6 import syntax.
@@ -128,7 +135,7 @@ Sapling will detect React components invoked using JSX tag syntax and React-Rout
128
135
<Navbar></Navbar>
129
136
130
137
// Route and Navbar will be detected as child components of the current file
131
-
<Route component={Navbar} />
138
+
<Route component={Navbar} />
132
139
133
140
// Route and App will be detected as child components of the current file
134
141
<Route children={App} />
@@ -138,7 +145,7 @@ Sapling will detect the names of inline props for JSX components it identifies:
138
145
139
146
```JSX
140
147
// props 'userId' and 'userName' will be listed for Navbar in Sapling
141
-
<Navbar userId={...} userName={...} />
148
+
<Navbar userId={...} userName={...} />
142
149
```
143
150
144
151
Sapling can identify components connected to the Redux store, when 'connect' is imported from 'react-redux', and the component is the export default of the file:
@@ -147,14 +154,14 @@ Sapling can identify components connected to the Redux store, when 'connect' is
147
154
// App.jsx
148
155
importReactfrom'react';
149
156
import { connect } from'react-redux';
150
-
157
+
151
158
constmapStateToProps=...
152
159
constmapDispatchToProps=...
153
-
160
+
154
161
constApp= (props) => {
155
162
return<h1>This is the App</h1>
156
163
}
157
-
164
+
158
165
// Sapling will detect App as connected to the Redux store
<a href="https://github.com/oslabs-beta/sapling/releases"><img alt="GitHub release (latest by date including pre-releases)" src="https://img.shields.io/github/v/release/oslabs-beta/sapling?include_prereleases"></a>
Sapling is a VS Code extension built with React developers in mind. As your codebase grows, your native file structure becomes less and less intuitive. Wouldn't it be nice to have a file structure that represents the actual relationships between the components and containers in your application? Wouldn't you like a quick reference to your available props, and an indication of routes and conditional rendering?
@@ -99,14 +104,16 @@ With Sapling, you don't have to guess at the parent component of your current fi
99
104
100
105
## Installation
101
106
102
-
Installing from VS Code Extension Marketplace (or downloading package from GitHub?).
107
+
Installing from VS Code Extension Marketplace:
103
108
104
109
1. If needed, install Visual Studio Code for Windows (7+), macOS (Sierra+), or Linux (details).
105
110
106
111
2. Install the Sapling extension for Visual Studio Code.
107
112
108
113
3. Once complete, you'll see Sapling appear in your sidebar. You can now begin using Sapling! Check out the Getting Started below for information on how to get started.
109
114
115
+
To install sapling for development, please see the contributing section below.
116
+
110
117
## Getting Started
111
118
112
119
1. After installing VSCode Extension, you will see the extension on your sidebar. Click the "Choose a File" button.
@@ -203,9 +210,9 @@ Sapling prioritizes file dependencies over component dependencies. Consider the
203
210
204
211
Sapling will display Home and Navbar as siblings, both children of App: (image of actual Sapling here)
0 commit comments