@eaze/eaze-web-scripts

Configuration and scripts for eaze web apps

Usage no npm install needed!

<script type="module">
  import eazeEazeWebScripts from 'https://cdn.skypack.dev/@eaze/eaze-web-scripts';
</script>

README

eaze-web-scripts

As of 04/11/19, the only active project using this package is mc-next

v4.0.0

  • at some point we standardized on using EAZE_ENVIRONMENT instead of ENVIRONMENT, this version now uses that env var

This is an attempt at centralizing all of our frontend javascript build process across all of our applications into one package.

With a few assumptions about application architecture and configuration, we should be able to work off of the same package. This should simplify lots of confusion around where various configuration and environment variables live. Additionally every application will get the same benefits of getting upgrades from one place.

MC's config looks like this:

{
  "name": "mc",
  "port": 9964,
  "dist": "./dist",
  "entry": "./src/index.js",
  "css": {
    "name": "style-[chunkhash].css"
  },
  "output": {
    "path": "./dist/mc",
    "filename": "[name]-[chunkhash].js",
    "publicPath": "/"
  },
  "env": {
    "local": {
      "GMAPS_KEY": "'ABC123!@#'",
      "API_BASE_URL": "'https://api-development.eazeup.com/api'",
      "MC_URL": "'https://mc-development.eazeup.com'",
      "MC_START_PATH": "'http://localhost:9966'",
      "cdn": ""
    },
    ...
  },
  "alias": {
    "api": "src/api.js",
    "assets": "src/assets",
    "src": "src",
    "microcomponents": "src/microcomponents",
    "components": "src/components",
    "helpers": "src/helpers",
    "shared-redux": "src/shared-redux"
  }
}