bit101 / ProjectMaker

A Sublime Text 2/3 plugin to allow creating any kind of project from your own custom templates
MIT License
233 stars 36 forks source link

Base task system on inbuilt exec function #47

Closed pykong closed 6 years ago

pykong commented 6 years ago

The ability to run a sequence of tasks is one of the differentiating features of this package.

However the current implementation is rather limited, allowing only the download of files. A wide range of command calls would immediately be available, by simply running the config.json against Sublime Text's inbuilt exec system.

This would allow the user to run an arbitrarily long sequence of tasks after project creation, where each task either comprises:

The config.json could look like this:

[
    {
        "cmd": "wget https://www.supercool.package.com",
        "shell": true
    },
    {
        "name": "I am optional and could well be a comment.",
        "target": "my_super_cool_window_command"       
    }
]

Order of execution would be from top to bottom.

The exact argument to allow, I still need to work out. However it makes sense to set the working dir to the path of the newly created project.

The current file downloader function could be simple refactored into its own package and, from now called as a window command.