Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support rc file from npm package #252

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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