Load config from NPM package

Abierto
#183 1 comentario 4 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
javascript
Área
cli, tooling

Línea de trabajo

Start by reading the current config-loading entry point and how the --config option is handled. Compare the proposed package-name and package.json forms, including scoped packages and nested config paths. Done means shared configurations can be resolved through the requested CLI and package.json syntax with behavior consistent with module resolution.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

priority: medium semver: minor type: feature

Sharing a preset across teams or packages is a great way to reduce complexity. It surprises me that PostCSS forces me to use a postcss.config.js file rather than giving me the option to point to a shared package.

Passing a package name instead of a simple path is easy to integrate with existing options. An intuitive command line syntax might look like this:

postcss --config myPackage
postcss --config myPackage/path/to/config.js
postcss --config @myOrg/myPackage/...

Although, the preferred option would clearly be referencing it in package.json:

  "postcss": "myPackage"
  "postcss": "@myOrg/myPackage/path/to/config.js"

  "postcss": {
    "config": "@myOrg/myPackage/path/to/config.js"
  }

Prettier implements sharing configs quite beautifully with its package.json option.

To minimize friction for the user, the path string should optimally be resolved in the same way module paths are resolved in Parcel or Webpack.

Lenguaje dominante
JavaScript
Estrellas
661
Forks
76
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de postcss/postcss-load-config

Todos los issues de postcss/postcss-load-config

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.