Giter Site home page Giter Site logo

rmariuzzo / config-webpack-plugin Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 6.0 2.85 MB

๐Ÿ’ซ Merge one or more configuration files together with environment variables too.

License: MIT License

JavaScript 100.00%
configuration configuration-by-environment javascript webpack webpack-plugin

config-webpack-plugin's Introduction

StackOverflow Reputation: 28.9k Last updated: less than 1 hour*

Hi there ๐Ÿ‘‹ โ€“ I'm Rubens!

On 2016, I was diagnosed with Hodgkin's Lymphoma a blood cancer, and I underwent chemotheraphy. On March 1st, the cancer returned, and I've started another chemotheraphy treatment on March 23rd, 2021. This can explain my slow response in some cases. If you would like more details, I have a blog for it. Happy coding!

config-webpack-plugin's People

Contributors

rmariuzzo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

config-webpack-plugin's Issues

Add CI integration

Current situation

We don't have continuous integration...

Requirements

Configure the project to use Travis CI in different NodeJS env.

Details

  • We should complete #4 to have some test in places.
  • Configure a .travis.yml file.
  • Add a gulp task for testing.

Create a landing page `config-webpack-plugin`

Current situation

We don't have any landing page to show off config-webpack-plugin. ๐Ÿ˜ญ

Requirements

While the README does a decent job, we would like to enhance the user experience providing a simple landing page which transmit in a clear way how config-webpack-plugin works.

Details

No details for the creative one. ๐Ÿ˜‰

Add test cases

Current situation

We. Don't. Have. Tests. ๐Ÿ˜ฑ (I'm stupid brave enough to publish a plugin without any automated tests).

Requirements

We want to use a framework that can be plugged in our current build system.

Details

  • Research for a suitable framework (maybe a framework that webpack use to test their official plugins).
  • Test the merging of one file as is (with no changes).
  • Test the merging of one file with changes due to one matching environment variable.
  • Test the merging of multiple file with no matching environment variable.
  • Test the merging of multiple file with one matching environment variable.

Support multiple configuration files

Current situation

The plugin can be configured with only one configuration file, which is fine to demonstrate that the plugin actually works.

webpack.config.js

const ConfigPlugin = require('config-webpack-plugin');
module.exports = {
    plugins: [ new ConfigPlugin('./config.js') ]
}

Requirements

We want to allow devs to specified more than one configuration file instead.

webpack.config.js

const ConfigPlugin = require('config-webpack-plugin');
module.exports = {
    plugins: [ new ConfigPlugin(['./config.default.js', './config.js']) ]
}

That way developers can merge configuration values from one or more files + environment variables.

Details

  • The first parameter of config-webpack-plugin constructor should accept both a string and an Array.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.