Closed jdonaghue closed 7 years ago
@@ Coverage Diff @@
## master #89 +/- ##
==========================================
+ Coverage 99.24% 99.45% +0.21%
==========================================
Files 12 15 +3
Lines 264 368 +104
Branches 23 43 +20
==========================================
+ Hits 262 366 +104
Partials 2 2
Impacted Files | Coverage Δ | |
---|---|---|
src/npmInstall.ts | 100% <100%> (ø) |
|
src/commands/eject.ts | 100% <100%> (ø) |
|
src/bin/dojo.ts | 100% <ø> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 0f70f43...eab70b1. Read the comment docs.
@Tomdye thanks for the review! I will make these changes today
@jdonaghue how are these updates coming?
@tomdye I have changed the npm helper to use reduce
@jdonaghue this now has a conflict in src/interfaces.ts
, I would imagine as a result of #85 having been merged.
OK @agubler thanks I will resolve the conflict today.
Putting this out now for initial review. The basic idea is that each command will optionally implement an
eject
method. The base cli will call into thateject
method with two helpersnpm
andfiles
which respectively add to the current projectspackage.json
and copies important files over to the current project.npm
is capable of assigningdependencies
,devDependencies
, andscripts
to the current projectspackage.json
. It will runnpm install
after it has finished assignments but only if there were no collisions.files
takes an array of fully-qualified file paths and copies them into the current project creating the necessary folders to do so, as long as there are no collisions.Keep in mind this is still a WIP and needs better collision checking/messaging as well as a prompt to ensure the user understands the finality of this commands execution.
It can be run in the following way:
dojo eject
- will run through all commands and attempt to eject if the method is defined. Right now it will fail if a command doesn't have aneject
defined but that should probably only be the case when there is a specific command specified and not for this generic execution pattern.dojo eject -g groupName
- will run through all commands within a group and attempt to eject if the method is defined. Again it will fail if a command doesn't define aneject
method, but that behavior should probably be reserved for when a specific command is specified.dojo eject -g groupName -c commandName
- will try to eject this command. If aneject
method is not implemented on the command it will fail.Also, tests are still needed.