All Projects → oslabs-beta → sapling

oslabs-beta / sapling

Licence: MIT license
Sapling - A convenient way to traverse your React app in VS Code

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
CSS
56736 projects
SCSS
7915 projects
HTML
75241 projects

Projects that are alternatives of or similar to sapling

Nim
Streamline Your Node.js Debugging Workflow with Chromium (Chrome, Edge, More) DevTools.
Stars: ✭ 168 (-61.82%)
Mutual labels:  devtools, vscode-extension
Vscode Browse Lite
🚀 An embedded browser in VS Code
Stars: ✭ 134 (-69.55%)
Mutual labels:  devtools, vscode-extension
vscode-theme-github-light
Try this theme if others don't meet your needs.
Stars: ✭ 49 (-88.86%)
Mutual labels:  vscode-extension
cargo-testify
Watches changes in a rust project, runs test and shows friendly notification
Stars: ✭ 76 (-82.73%)
Mutual labels:  devtools
vue-snippets
Visual Studio Code Syntax Highlighting For Vue3 And Vue2
Stars: ✭ 25 (-94.32%)
Mutual labels:  vscode-extension
vscode-liquid-snippets
Shopify Liquid Template Snippets
Stars: ✭ 22 (-95%)
Mutual labels:  vscode-extension
vscode-languagetool-linter
A from scratch redesign of LanguageTool integration for VS Code.
Stars: ✭ 72 (-83.64%)
Mutual labels:  vscode-extension
vscode-endwise
Wisely add "end" in Ruby.
Stars: ✭ 75 (-82.95%)
Mutual labels:  vscode-extension
InAppDevTools
Android library with a collection of tools for debugging, inspecting and reporting from within your own app
Stars: ✭ 26 (-94.09%)
Mutual labels:  devtools
vscode-react-javascript-snippets
Extension for React/Javascript snippets with search supporting ES7+ and babel features
Stars: ✭ 782 (+77.73%)
Mutual labels:  vscode-extension
logitech-craft-vscode
Logitech Craft VS Code extension and Logitech Options plugin
Stars: ✭ 41 (-90.68%)
Mutual labels:  vscode-extension
vscode-iot-utility
IoT Utility for Visual Studio Code: Arduino, Espressif, Raspberry Pi, mbed and more
Stars: ✭ 61 (-86.14%)
Mutual labels:  vscode-extension
pyenvdiff-lib
Python environment comparison tool
Stars: ✭ 23 (-94.77%)
Mutual labels:  devtools
react-maker
VSCode extension for creating functional components.
Stars: ✭ 15 (-96.59%)
Mutual labels:  vscode-extension
wordup-code
Visual Studio Code extension for wordup that makes it easy to develop, manage and export WordPress plugins or themes.
Stars: ✭ 12 (-97.27%)
Mutual labels:  vscode-extension
bazel-vscode
Proof-of-concept (POC) of a Bazel Java development extension for VS Code
Stars: ✭ 16 (-96.36%)
Mutual labels:  vscode-extension
fast-sfdc
A VSCode plugin to develop Salesforce projects in vscode
Stars: ✭ 16 (-96.36%)
Mutual labels:  vscode-extension
angular-extension-pack-vsce
This extension pack packages some of the most popular (and some I find very useful) VS Code Angular extensions.
Stars: ✭ 25 (-94.32%)
Mutual labels:  vscode-extension
debug.js
Debugger of JavaScript, by JavaScript, for JavaScript
Stars: ✭ 19 (-95.68%)
Mutual labels:  devtools
AutoIt-VSCode
AutoIt Extension for Visual Studio Code
Stars: ✭ 51 (-88.41%)
Mutual labels:  vscode-extension

Logo

Sapling

A convenient way to traverse your React application.
Explore the docs »

Report Bug · Request Feature

Visual Studio Marketplace Version Visual Studio Marketplace Installs GitHub Repo stars GitHub forks
master CI/CD workflow status dev CI workflow status Vercel Web deployments


Table of Contents
  1. About The Project
  2. Installation
  3. Getting Started
  4. Usage
  5. Extension Settings
  6. Contributing
  7. License
  8. Creators
  9. Contact
  10. Acknowledgements

About The Project



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?

With Sapling, you don't have to guess at the parent component of your current file. Sapling is an interactive hierarchical dependency tree that lives directly within your VS Code IDE, as accessible as the native file system. You can build your tree by selecting any component file as the root and get information about the available props at any level. It also provides visual indication of Javascript syntax or import errors in your files, and shows you which components are connected to your Redux store.

Built With

Installation

Installing from VS Code Extension Marketplace:

  1. If needed, install Visual Studio Code for Windows (7+), macOS (Sierra+), or Linux (details).

  2. Install the Sapling extension for Visual Studio Code. Search for 'sapling' in the VS Code extensions tab, or click here.

  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.

To install sapling for development, please see the contributing section below.

Getting Started

  1. After installing VSCode Extension, you will see the extension on your sidebar. Click the "Choose a File" button.

  2. Your file explorer window will launch. Select an entrypoint, a file where the parent component for the rest of your application is rendered.

  3. Your sidebar will now display a component tree.

Usage

After installing, click the Sapling tree icon in your extension sidebar (image of icon here). From there, you can either click "Choose a file" to select your root component, or build your tree directly from a file open in your editor with the "Build Tree" button on the right hand side of your status bar. Click the + and - buttons to expand and collapse subsets of your tree, and hover over the information icon (image of icon here) to get a list of props available to that component. You can also press the view file icon (image of icon here) to open the file where the component is defined in your editor window. Below is a quick-reference legend for icon and text format meanings. If you prefer not to view React Router or other third-party components imported to your app, you can disable either of these in the VS Code Extension Settings.

Icon Legend in Sapling Tree View:

  • available props (hover)
  • open file (click)
  • Redux store connection
  • Navbar: error in file (matches the error color of your theme)
  • Navbar: currently open file

Sapling can currently display React apps made with TSX/JSX and ES6 import syntax.

Sapling will detect React components invoked using JSX tag syntax and React-Router component syntax, where React is imported in a file:

    // Navbar will be detected as a child of the current file
    <Navbar />

    // As above
    <Navbar></Navbar>

    // Route and Navbar will be detected as child components of the current file
    <Route component={Navbar} />

    // Route and App will be detected as child components of the current file
    <Route children={App} />

Sapling will detect the names of inline props for JSX components it identifies:

    // props 'userId' and 'userName' will be listed for Navbar in Sapling
    <Navbar userId={...} userName={...} />

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:

    // App.jsx
    import React from 'react';
    import { connect } from 'react-redux';

    const mapStateToProps = ...
    const mapDispatchToProps = ...

    const App = (props) => {
      return <h1>This is the App</h1>
    }

    // Sapling will detect App as connected to the Redux store
    export default connect(mapStateToProps, mapDispatchToProps)(App);

Note

Sapling prioritizes file dependencies over component dependencies. Consider the following JSX contained in the file App.jsx:

    //App.jsx
    import React from 'react';
    import Home from './Home';
    import Navbar from './Navbar';

    class App extends Component {

      render (
        return {
          <Home>
            <Navbar />
          </Home>
        })
    }

Sapling will display Home and Navbar as siblings, both children of App:


Contributor Usage

  1. Download/clone the project from Github
  2. Open the 'sapling' folder in your VS Code IDE. The outer 'sapling' folder must be the root folder in the workspace.
  3. Open sapling/src/extension.ts
  4. To view the webview, in your terminal navigate into the inner 'sapling' folder and run the following command: npm run watch
  5. Press F5. A new VSCode window will open with the Sapling Extension.
  6. Click the Sapling icon on the left to see the Sapling sidebar.

Note: Ctrl+R (or Cmd+R on Mac) will refresh the extension development host

Extension Settings

This extension contributes the following settings:

  • sapling.view.reactRouter: enable/disable React Router component nodes
  • sapling.view.thirdParty: enable/disable all third party component nodes

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Creators

Contact

Twitter: @TeamSapling | Email: [email protected]

GitHub: https://github.com/oslabs-beta/sapling/

Acknowledgements

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].