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

Scaffolder

by whalenut ST2 Missing

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

Details

  • 2015.06.23.07.48.06
  • github.​com
  • github.​com
  • 5 years ago
  • 4 months ago
  • 7 years ago

Installs

  • Total 276
  • Win 147
  • Mac 78
  • Linux 51
Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7
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
Mac 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.