Open adamralph opened 11 years ago
We need to think if we really want to do this. This is going to take a lot of rework.
What we could do, which we do not today is allow you to dynamically inject script / files from a script pack. Then you could implement in the script pack your own convention based scanning logic, find the files you want by reading your yml file and matching on conventions. Then you can pass in those filenames similar to the way you pass references or using statements.
Would that work for you?
I prefer to do it this way and not bake any convention based mechanism in.
I never thought this would be something for scriptcs... This would be something purely existing within the nancy script pack. All I need is for https://github.com/scriptcs/scriptcs/issues/243 to implemented
I.e. exactly what you said two comments back
OK, I guess the snippets were throwing me off.
so I think what we could do is expose a collection of scripts on the script pack context. The collection could either be filenames or loose script.
Then during initialization when we import the usings and add references we also merge in the scripts.
It would just be a flat merge in that case as you can add references and usings programatically.
Does that work?
Moved the thread to https://github.com/scriptcs/scriptcs/issues/243#issuecomment-17783108
Require<NancyPack>().Host();
picks up and registers the modules.Conventions, including host prefix etc., can be overridden/extended with
nancy.yml
.Think
> rails server
/> scriptcs nancy
:wink:.Goodbye IIS and windows services, hello write code and xcopy.