github-release-notes
github-release-notes copied to clipboard
feat: support rc file from npm package
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
- treat
grenas npm package name if it does not start with 'http' - use npm's api to get the latest package version
a. use
require(child_process).spawnSyncso that async operation could act like sync operation in main process - 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
@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.