dojo / cli

:rocket: Dojo - command line tooling.
http://dojo.io
Other
25 stars 34 forks source link

Adding support for reading/writing config from package.json #236

Closed rorticus closed 6 years ago

rorticus commented 6 years ago

Type: feature

The following has been addressed in the PR:

Description:

Adding the ability to read from .dojorc configuration from package.json. If the dojo key exists in your package.json...

{ 
  "dojo" : {
    "build-app": {
    }
  }
}

And .dojorc does not exist, the config will be read from package.json. When you try to write config, and it's stored in package.json, you get a confirmation.

You are using a "dojo" configuration in your package.json. Saving the current settings will update your package.json. Continue? [ (N)o / (Y)OLO ]:

Additionally, you can now pass a command name into the get() method in order to read configuration that belongs to another command. Note that this applies to read only. You still cannot write to another command's config.

All of this is to support future work on @dojo/cli-create-theme to read a list of themeable elements that will be stored in package.json.

codecov[bot] commented 6 years ago

Codecov Report

Merging #236 into master will decrease coverage by 0.1%. The diff coverage is 93.1%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #236      +/-   ##
==========================================
- Coverage   94.12%   94.02%   -0.11%     
==========================================
  Files          20       20              
  Lines         596      619      +23     
  Branches       95      101       +6     
==========================================
+ Hits          561      582      +21     
- Misses         17       18       +1     
- Partials       18       19       +1
Impacted Files Coverage Δ
src/configurationHelper.ts 93.87% <93.1%> (-2.28%) :arrow_down:

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 ae3bf3a...a3ffd8d. Read the comment docs.

codecov-io commented 6 years ago

Codecov Report

Merging #236 into master will increase coverage by 0.19%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #236      +/-   ##
==========================================
+ Coverage   94.16%   94.36%   +0.19%     
==========================================
  Files          20       20              
  Lines         600      621      +21     
  Branches       95      100       +5     
==========================================
+ Hits          565      586      +21     
  Misses         17       17              
  Partials       18       18
Impacted Files Coverage Δ
src/configurationHelper.ts 98.03% <100%> (+1.37%) :arrow_up:

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 14f3c88...916aa36. Read the comment docs.

rorticus commented 6 years ago

Closing in favor of https://github.com/dojo/cli/pull/260