Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Parse configuration files #47

Merged
merged 12 commits into from
Dec 28, 2015
Merged

Parse configuration files #47

merged 12 commits into from
Dec 28, 2015

Conversation

anaisbetts
Copy link
Contributor

This PR sets up methods to initialize a CompilerHost based on either a .babelrc file, or an electron-compile .compilerc which is similar to babelrc except instead of a list of options, it’s a list of MIME types and the options to set.

Without an environment:

{
  "text/javascript": {
    "presets": ["stage-0", "es2015", "react"],
    "sourceMaps": "inline"
  }
}

With environments:

{
  "env": {
    "production": {
      "text/javascript": {
        "presets": ["stage-0", "es2015", "react"],
        "sourceMaps": false
      }
    },
    "development": {
      "text/javascript": {
        "presets": ["stage-0", "es2015", "react"],
        "sourceMaps": "inline"
      }
    }
  }
}

/cc #31

anaisbetts added a commit that referenced this pull request Dec 28, 2015
@anaisbetts anaisbetts merged commit 3b8c2bb into electron-compile-2 Dec 28, 2015
@anaisbetts anaisbetts deleted the configuration branch December 28, 2015 06:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant