-
-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[make:stimulus-controller] Add
classes
support, generate usage code…
…, fix doc, add tests (#1631) * Replace StimulusBridge with StimulusBundle in docblock * Add methods initialize, connect and disconnect with code comment * Add line break before "stimulusFetch: lazy" to emphasis line and help UX parsers * Update tests for lazy doc changes * Update tests for empty line before lazy * Update tests with base methods * Use 'JavaScript' as default extension * Add `--typescript` / `--ts` (non interactive) option (default false) * Update Maker documentation link displayed after code generation * Define classes interactively * Generate an example usage * phpstan happiness
- Loading branch information
Showing
9 changed files
with
534 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
The <info>%command.name%</info> command generates new Stimulus Controller. | ||
The <info>%command.name%</info> command generates a new Stimulus controller. | ||
|
||
<info>php %command.full_name% hello</info> | ||
|
||
If the argument is missing, the command will ask for the controller name interactively. | ||
If the argument is missing, the command will ask for the controller name interactively. | ||
|
||
To generate a TypeScript file (instead of a JavaScript file) use the <info>--typescript</info> | ||
(or <info>--ts</info>) option: | ||
|
||
<info>php %command.full_name% hello --typescript</info> | ||
|
||
It will also interactively ask for values, targets, classes to add to the Stimulus | ||
controller (optional). | ||
|
||
<info>php %command.full_name%</info> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.