ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Scaffolder

by whalenut ST2

A plugin to create projects based on user-defined scaffolds.

Details

  • 2015.06.23.07.48.06
  • github.​com
  • github.​com
  • 4 years ago
  • 2 hours ago
  • 6 years ago

Installs

  • Total 276
  • Win 147
  • OS X 78
  • Linux 51
Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
OS X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

SublimeScaffolder

What is sublime scaffolder?

It is a tool for you to quickly setup a project that you want to start on that usually have several files in common. Like a webproject or something similar. With SublimeScaffolder you simply define the folders and files in your project that you know that you will use, if you want to download a file from the internet or copy the contents of a file on your harddrive you can do that aswell.

How do I use SublimeScaffolder?

It's simple just press ctrl+shift+k followed by ctrl+shift+s and a menu with your defined scaffolds will show up, select the one you want to run and press enter, after that you specify where you want it to be created. When SublimeScaffolder is done setting up your scaffold it will create a new Sublime-project file for you which you can edit and save where you want.

How do i configure SublimeScaffolder?

It's super easy, first you need to define a default folder in the settings Preferences -> Package Settings -> SublimeScaffolder -> Settings - User. there you define the default_folder (This is just so that you dont have to type in the whole path all the time, which you could do if you want). Then you define your scaffolds.

Defining a scaffold:

Each scaffold has a name, so that you have something pretty and identifiable in the list of scaffolds. And each scaffold has a contents object, within the contents objects you can define folders and files

FILES

A file looks like this:

{'file':'filename.extension'}

You can also specify if the file should have contents copied from somewhere on your harddrive like this:

{'file':'filename.extension', 'copy_from': "path_to_file_to_copy_contents_from"}

Or if you want to download contents from the web and put in your file you do like this:

{'file':'filename.extension', 'url': "url-to-file"}

FOLDERS

Folders look pretty much like the whole scaffold, they have two attributes: folder - which is the folder name contents - what the folder should contain

So a folder could look something like this:

{
    "folder":"src",
    "contents": [
        {'file':'filename.extension'}
] }

Copying Directories(Folders)

Sometimes you might have a large setup, containing many default files and a default structure, in those cases the scaffolds might become very large to write and thus errorprone, in those cases it might be better to copy a whole folder directly into your scaffold, to do this use the copydir command:

{
    "folder":"css",
    "contents": [
        {"copydir": "/home/username/default", "name":"awesomeness"}
    ]
}
This will create a directory named awesomeness" and put the contents from */home/username/default into that directory.

If you get stuck you can always have a look in: Preferences -> Package Settings -> SublimeScaffolder -> Settings - Default where there is an example scaffold for you to use.