adamralph / scriptcs-nancy

Nancy Script Pack for scriptcs
MIT License
34 stars 5 forks source link

Add folder bootstrapping #14

Open adamralph opened 11 years ago

adamralph commented 11 years ago

Executing: > scriptcs -install ScriptCs.Nancy

creates:

modules
  home.csx
views
  home.html
nancy.csx

home.csx contains:

public HomeModule : NancyModule
{
    public HomeModule()
    {
        Get["/"] = _ => View["index"];
    }
}

home.html contains something which looks :cool:.

nancy.csx contains:

#load "modules\home.csx"
Require<NancyPack>.Host();

(The #load can be ommitted if https://github.com/adamralph/scriptcs-nancy/issues/13 is closed.)

Quickstart becomes:

> scriptcs -install
> scriptcs nancy

:sunglasses:

adamralph commented 11 years ago

Needs spiking, not sure if feasible.

adamralph commented 11 years ago

Can also consider making this happen on demand, either with a REPL command or by invoking a bootstrapping script which comes with the pack.