mastilver/module-to-cdn

Have a function that returns additional cdn config

mastilver opened this issue · 0 comments

getCdnConfigs(['react', 'react-dom'])

would returns:

{
    "react": {
    "var": "React",
    "versions": {
      ">= 0.11.0 <= 16.0.0-alpha.6": {
        "development": "https://unpkg.com/react@[version]/dist/react.js",
        "production": "https://unpkg.com/react@[version]/dist/react.min.js"
      },
      ">= 16.0.0-alpha.7 < 16.6.2 || > 16.6.2": {
        "development": "https://unpkg.com/react@[version]/umd/react.development.js",
        "production": "https://unpkg.com/react@[version]/umd/react.production.min.js"
      }
    }
  },
  "react-dom": {
    "var": "ReactDOM",
    "versions": {
      ">= 0.14.0 <= 16.0.0-alpha.6": {
        "development": "https://unpkg.com/react-dom@[version]/dist/react-dom.js",
        "production": "https://unpkg.com/react-dom@[version]/dist/react-dom.min.js"
      },
      ">= 16.0.0-alpha.7 < 16.6.2 || > 16.6.2": {
        "development": "https://unpkg.com/react-dom@[version]/umd/react-dom.development.js",
        "production": "https://unpkg.com/react-dom@[version]/umd/react-dom.production.min.js"
      }
    }
  }
}

so user can make PRs more easily