JSPM

deverhood-react

1.5.59
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 32327
    • Score
      100M100P100Q72910F
    • License MIT

    React-Redux Deverhood Frontend Developer to connect with Deverhood's Micro services

    Package Exports

    • deverhood-react

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (deverhood-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Deverhood Package Manager Webpack library starter

    Webpack based boilerplate for producing libraries (Input: ES6, Output: universal library)

    Features

    • Webpack 4 based.
    • ES6 as a source.
    • Exports in a umd format so your library works everywhere.
    • ES6 test setup with Mocha and Chai.
    • Linting with ESLint.

    Process

    ES6 source files
           |
           |
        webpack
           |
           +--- babel, eslint
           |
      ready to use
         library
      in umd format

    Have in mind that you have to build your library before publishing. The files under the lib folder are the ones that should be distributed.

    Getting started

    1. Open package.json and change package name and version
    2. Build your library
    • Run npm install to get the project's dependencies
    • Run npm build to build webpack,test and publish npm (don't for get to change version before uploading)
    1. Development mode
    • Having all the dependencies installed run npm run dev. This command will generate an non-minified version of your library and will run a watcher so you get the compilation on file change.
    1. Running the tests
    • npm run test

    Scripts

    Readings

    Misc

    An example of using dependencies that shouldn’t be resolved by webpack, but should become dependencies of the resulting bundle

    In the following example we are excluding React and Lodash:

    {
      devtool: 'source-map',
      output: {
        path: '...',
        libraryTarget: 'umd',
        library: '...'
      },
      entry: '...',
      ...
      externals: {
        react: 'react'
        // Use more complicated mapping for lodash.
        // We need to access it differently depending
        // on the environment.
        lodash: {
          commonjs: 'lodash',
          commonjs2: 'lodash',
          amd: '_',
          root: '_'
        }
      }
    }