Skip to content

Instantly share code, notes, and snippets.

View arcanis's full-sized avatar
:octocat:

Maël Nison arcanis

:octocat:
View GitHub Profile
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);
@arcanis
arcanis / variants.yml
Last active September 14, 2020 17:26
# 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.
#