Skip to content

Conversation

donaldshen
Copy link

@donaldshen donaldshen commented Dec 27, 2019

Why

Sometimes we want to share the same .grenrc.js among many projects, and manage it using npm package, just like what prettier did.
This is a job finishing pr #230 .

How

  1. treat gren as npm package name if it does not start with 'http'
  2. use npm's api to get the latest package version
    a. use require(child_process).spawnSync so that async operation could act like sync operation in main process
  3. use jsdelivr to get the config file

Test

  • Every broken test instances have been changed or removed;
  • We have made this change in this fork, and using it among our projects such as el-data-table, just works

@alexcanessa
Copy link
Member

@donaldshen that's great! thanks.

The only thing is that we should probably have a mock for the remote configuration or at least a @gren/recommended sort of thing that at this point we should have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants