Closed jadjoubran closed 8 years ago
Hi @jadjoubran
of course, i think is great idea.
For configuration option i think to create a multidimensional array like :
return [ 'source' => [ /* * Angular source directory name */ 'main' => 'angular', /* * Angular config directory name */ 'config' => 'config', /* * Angular dialog directory name */ 'dialogs' => 'dialogs', /* * Angular directive directory name */ 'directives' => 'directives', /* * Angular feature directory name */ 'features' => 'app', /* * Angular filter directory name */ 'filters' => 'filters', /* * Angular serivce directory name */ 'services' => 'services' ], 'prefixFileNames' => [ /* * Angular controller */ 'controller' => '.controller.js', /* * Angular directive */ 'directive' => '.directive.js', /* * Angular dialog */ 'dialog' => '.dialog.js', /* * Angular definition */ 'definition' => '.definition.js', /* * Angular service */ 'service' => '.service.js' ] ]
For ng:directive
, the generator will create two js files : one for directive ".directive.js" and one for definition ".definition.js", but i notice the ".definition.js" is the controller for directive just created.
So, why don't use "controller" configuration option for it and remove "definition" option from config?
I hope I explained myself, sorry for bad english =D
Awesome, looks great :D
However the .definition.js is not a controller.. this is where you define the directive and possibly define a controller or assign a controller to it
I agree though that definition
might be a weird name
Hi @jadjoubran,
sorry for late of my reply. Before to start editing, I have to clarify one thing:
when user call artisan command, ex. php artisan ng:config sample
, command generate a config with filename "sample.config.js":
It's correct?
@m33ch 100% :smile: Btw seriously let me know if you need my help in anything, I'd be happy to help as well :D
Hi @jadjoubran
ok i made a commit with change.
Please check it.
Regards
Hi @m33ch Sorry I didn't have time today, I'll check it tomorrow
Thanks :D
@m33ch it's great! I'm going to tag version 1.1 and upgrade the main repository Thanks :smile:
Hi @m33ch
I was thinking for Version 3 of Laravel angular material starter that maybe we change the generated files' names to:
.controller.js
.directive.js
.dialog.js
.definition.js
.service.js
What do you think?
And maybe we can export the configuration option to
config/generators.php
so users can override the default extension (.controller.js
to.js
if they don't like it).Let me know what you think and how you want us to divide the tasks I can help with which ever task you like
Cheers :smile: