slush-marklogic-node
slush-marklogic-node copied to clipboard
As a slush-generator user, I'd like to have an easy and automated way of adding brand new html page to my project
Hint: I'd like to have a command-line option which allows me to generate a new html page, wire it wherever it needs to be wired and add a link to it from the main page. It should also include some static content.
Right now, doing this involves editing several files, creating folder(s) and new files and whatnot. It's too complicated for an average Joe, prone to errors and not documented.
Would be nice, but we'd have to reorganize a few things to make this at all possible, most importantly the ui app and folder structure. We would also need to extend the slush generator to allow maintenance on existing projects, rather than just generate new ones..
I had been thinking about taking the states in route.config.js apart, and adding them to xxx.module.js or maybe a xxx.route.js within the folder of each page individually. These files would also append to an some global appModuleDependencies variable that is used as parameter to the actual app module.
If organized that way, adding new pages would mostly be dropping in a new dir with some files that get hooked automatically that way. Header and nav bar should respond automatically too, but if made that way, we can easily add a gulp task to add a new page..
This seems promising. Would this also mean that reusable components could define a routes module that could just be imported and thereby available to the host application?
In theory yes, I think. Sounds appealing, right? The idea of pretty much only needing to bower install analytics-dashboard to have it show up in the menu, for instance..
Yes, that would be very appealing. In general, the easier we can make plugins, the better, I think.