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
  • 9 years ago
  • 5 years ago
  • 11 years ago

Installs

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