Skip to content
This repository has been archived by the owner on Jun 13, 2022. It is now read-only.

Need to be able to include different files in production vs debug mode #9

Open
charlesjolley opened this issue Aug 8, 2011 · 0 comments
Labels

Comments

@charlesjolley
Copy link
Contributor

Take https://github.com/PaulKinlan/WebIntents as an example. He has a debug.js file in the src directory that should only be included when doing a build in debug mode. Currently this is not possible because you would define the build like this:

"bpm:build": {
   "bpm_libs.js": {
    "directories": ["src"],
    "modes": ["production"]
  }
}

Problem is - there is no way to make the debug.js file build separately. I propose we allow you to define multiple options for a a build target. We would merge the options based on the modes option. For example I could move the debug.js file from the src directory into a debug directory in this project and then define a build option like:

"bpm:build": {
   "bpm_libs.js": [
    {
       "directories": ["src"],
       "modes": ["production", "debug"]
    },
    {
        "directories": ["debug"],
        "modes": ["debug"]
    }]
}

When processing in debug mode, we would merge these options so we end up including both the src and debug directories in the build. In production mode builds, the bottom set of options would be ignored causing us to build src only.

There are other ways we could approach too but we do need to solve this somehow as having a debug and a production build of a project is a very common pattern in projects.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant