GithubHelp home page GithubHelp logo

scaffolding's Introduction

Scaffolding

Scaffolding is a package used to create a project folder and file hierarchy with the click of a button.

Scaffolding

Added a separate file hierarchy system for splitting the main file up into smaller files for better management.

I still need to actually develop some unit testing

Structure

Edit the scaffolding.cson file to include your folder file hierarchy:

You can edit this by using the command:

"ctrl-alt-o": "scaffolding:edit"

or by clicking the edit button in the scaffolding panel.

When you click on your scaffolding name in the list the hierarchy is built in the current project root directory.

[
  {
    name: "Scaffolding"
    root: [
      {
        type: "dir"
        name: "folder"
        root: [
          {
            type: "file"
            name: "file.txt"
          }
        ]
      }
      {
        type: "dir"
        name: "empty"
      }
      {
        type: "file"
        name: "file_with_stuff.txt"
        contents: "stuff"
      }
      {
        type: "file"
        name: "file_with_multi-line_stuff.txt"
        contents: '''
          stuff
          more stuff
        '''
      }
    ]
  }
  {
    name: "item 2"
    rootUrl: './file.txt'
    ...
  }
]

Separate file structure

You can setup an external root file using the rootUrl option instead of using root, this is a relative path to the file from the default scaffolding.cson file. This is designed to store the other files in the same directory as the main scaffolding file.

You can optionally link a plain text hierarchy file .txt, .cson, or .json file

CSON

{
    name: "name"
    root: [
        {
            name: "name"
            type: "file|dir"
            root: [

            ]
        }
    ]
}

JSON

{
    "name": "name",
    "root": [
        {
            "name": "name",
            "type": "file|dir",
            "root": [

            ]
        }
    ]
}

Plain text

#Name
folder/
    file.txt
        content
        content
            indented content
    folder2/

The first line is optionally the name of the hierarchy denoted by starting the line with #.

Folders require a / at the end of the line to denote a folder.

The structure is indent sensitive. The file needs to be indented by 4 spaces , or a tab \t. Indenting inside a file, such as the example file.txt is ignored past the first indent and will show up in the contents of the file:

file.txt:

content
content
    indented content

keymapping

This package uses the default keymapping from package generation:

Toggle scaffolding panel:

"ctrl-alt-o": "scaffolding:toggle"

scaffolding's People

Contributors

drew-s avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.