[NPMCLI-21] create-light-module command creates module in current folder Created: 08/Jul/16  Updated: 22/Aug/16  Resolved: 19/Jul/16

Status: Closed
Project: Magnolia CLI
Component/s: None
Affects Version/s: None
Fix Version/s: 0.0.1

Type: Improvement Priority: Neutral
Reporter: Tomáš Gregovský Assignee: Federico Grilli
Resolution: Not an issue Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File package.json     PNG File package_json_-_gruenthalPOC_-____Magnolia_git_repo_user_miruela_gruenthalpoc_.png    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Sprint: Basel 53
Story Points: 3

 Description   

I am using npm cli to create light module. my project directory is ~/Magnolia/git_repo/user/miruela/gruenthalpoc.
I did full new npm install of cli. Did "mgnl setup", exported MGNCLI_HOME.
Edited package.json (set lightModuleName and few others, "outputhPath" is still there).
Then I run command "mgnl create-light-module gruenthal" and what I would expected (and was happening before) that light module "gruenthal" will be created in "light-modules" folder (which will be also created same time. But is not and "gruenthal" is created directly in project folder.
Maybe I am just doing wrong some steps i configuration. Can somebody please double check and let me know. thank you!



 Comments   
Comment by Tomáš Gregovský [ 08/Jul/16 ]

screenshot of log

Comment by Tomáš Gregovský [ 08/Jul/16 ]

or is "light-modules" folder created only during "jumpstart" ?

Comment by Federico Grilli [ 18/Jul/16 ]

Right, the 'light-modules' folder is created only by jumpstart command.
Otherwise, you need to specify a path option as per create-light-module command help. The path to the light modules root folder. If no path is provided, then the current directory is assumed to be the light modules root folder and the module will be created here.

Comment by Federico Grilli [ 19/Jul/16 ]

Feel free to reopen if you think this should work without the -path option. However, I'd tend to keep it as is for consistency reasons, since other commands too use either the -path option (they can be run from anywhere on the file system, cli being a global tool) or assume the current folder is where the artefacts should be created.

Generated at Mon Feb 12 04:45:45 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.