ProjectEvergreen / project-evergreen

Wiki and high level "feature" tracker for Project Evergreen
https://projectevergreen.github.io/
Apache License 2.0
11 stars 1 forks source link

Centralize project configuration and rules (eslint, postcss, babel) #38

Open thescientist13 opened 6 years ago

thescientist13 commented 6 years ago

Type of Change

Summary

Centralizing configuration and styleguides would be useful to help keep all projects in lockstep as these preferences and configurations mature over time with browsers and apps.

Use Case

Not sure, but likely as some sort of "meta" package (e.g. @prjevergreen/build-scripts on NPM) that all projects can install and then reference the configuration files via the CLI / terminal.

Code Sample

TBD

Pros / Cons

At the risk of being too opinionated, at least for Project Evergreen projects having a code styleguide and best practices would be ideal. The configurations are opt-in and in the case where the file can just module.exports an object, the consumer could just require the config and override as needed, programmatically, then consume, i.e.

const webpack = require('webpack');
let commonWebpackConfig = require('@prjevergreen/evergreen-scripts/webpack/webpack.config.common.js');

commonWebpackConfig.entry.index = 'path/to/custom/entry-file.js';

webpack(commonWebpackConfig);