Skip to content

feat(pkg): improve package editing#211

Merged
nikoksr merged 9 commits intomasterfrom
improve-package-editing
Dec 17, 2020
Merged

feat(pkg): improve package editing#211
nikoksr merged 9 commits intomasterfrom
improve-package-editing

Conversation

@nikoksr
Copy link
Copy Markdown
Collaborator

@nikoksr nikoksr commented Dec 17, 2020

Summary

Improve editing of proji packages. Instead of exporting, editing, removing an importing the edited config, you now only have to execute the edit command and the os will open the packages config file in the default editor. After editing you only need to confirm your edits to proji by pressing the 'Enter' key and you're done.

Example commands:

proji package edit <Package Name>

or the short version

proji p e <Package Name>

Proposed Changes

  • Change short version of export command from e to x
  • Add the edit command (short: e)
  • Add functions to smartly open config files in os' editor

Resolved Issues

Closes #137

There's currently a bug (pelletier/go-toml#450) in the toml library
proji is using and its affecting our package export. In some cases the
name field of a package is missing and sometimes its duplicate. The
problem is backtrackable to the order command which makes it so packages
exports always look the same and in their intended order. Until the fix
is out we'll just take out the order command. Export works fine; just
isn't ordered anymore as originally wanted.
Package editing has just become much simpler. Instead of the old and
cumbersome way (as described in issue #137) there is now the 'edit'
command which will export the chosen packages config to a temporary
file, open that file in your systems prefered graphical text editor,
wait for you to edit and save the config file and replace the old
package with the freshly edited one.
@nikoksr nikoksr merged commit ae43ca6 into master Dec 17, 2020
@nikoksr nikoksr deleted the improve-package-editing branch December 17, 2020 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve package editing

1 participant