slush-marklogic-node icon indicating copy to clipboard operation
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

Open sashamitrovich opened this issue 7 years ago • 5 comments

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.

sashamitrovich avatar Mar 20 '17 07:03 sashamitrovich

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..

grtjn avatar Mar 20 '17 12:03 grtjn

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..

grtjn avatar Aug 29 '17 09:08 grtjn

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?

patrickmcelwee avatar Aug 29 '17 16:08 patrickmcelwee

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..

grtjn avatar Aug 29 '17 17:08 grtjn

Yes, that would be very appealing. In general, the easier we can make plugins, the better, I think.

patrickmcelwee avatar Aug 29 '17 17:08 patrickmcelwee