This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
name: `yarn-plugin-license`, | |
factory: require => { | |
const {BaseCommand} = require(`@yarnpkg/cli`); | |
const {Cache, Configuration, Manifest, Project, StreamReport, miscUtils, structUtils} = require(`@yarnpkg/core`); | |
class LicenseCommand extends BaseCommand { | |
async execute() { | |
const configuration = await Configuration.find(this.context.cwd, this.context.plugins); | |
const {project, workspace} = await Project.find(configuration, this.context.cwd); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The general idea is that maintainers would publish "meta-packages" that would describe | |
# where to find the specific implementations for a given set of parameters (defined by a | |
# template string). The template string would be resolved based on the known parameter (after | |
# checking that the active parameters are compatible with the supported ones), and the package | |
# used instead of the original one. | |
# | |
# One nice thing is that it would degrade nicely on package managers that wouldn't support this | |
# spec: they would simply ignore the `variants` field, and thus would use the package itself, | |
# with everything it contains - including a potential fallback. | |
# |
OlderNewer