8.1.0 • Published 1 month ago

@xh/hoist-dev-utils v8.1.0

Weekly downloads
251
License
Apache-2.0
Repository
github
Last release
1 month ago

Hoist Dev Utils

Tooling for building and deploying web applications built on the Hoist React platform. This repository is made available as the @xh/hoist-dev-utils package on npm for import and use by applications.

Shared development dependencies

The package.json file in this repository specifies a set of development dependencies required for building Hoist React applications. Those applications can specify @xh/hoist-dev-utils as a dev dependency and transitively bring in libs for Webpack and all associated plugins used in app builds, including Webpack Dev Server, Babel, and other essential loaders.

In most cases it is expected that this can be the only dev dependency required by Hoist React apps.

Webpack configuration

The configureWebpack.js module exports a single configureWebpack() method that can be used to output a complete Webpack configuration. This includes support for transpiling and bundling multiple client application entry points with preconfigured loaders for JS code (Babel), styles (CSS/SASS/PostCSS) and HTML index file generation. See the docs within that file for further details.

The generated Webpack configuration also sets the value of several XH globals within the built JS code, via the Webpack DefinePlugin. These include XH.appCode and XH.appName (both required), XH.appVersion (typically set as part of the build) and similar.

The intention is to reduce application webpack config files to a minimal and manageable subset of options. An example of such a file would be:

const configureWebpack = require('@xh/hoist-dev-utils/configureWebpack');

module.exports = (env = {}) => {
    return configureWebpack({
        appCode: 'myApp',
        appName: 'My Application',
        appVersion: env.appVersion || '1.0-SNAPSHOT',
        agGridLicenseKey: 'myOrgsAgGridLicenseKey',
        favicon: './public/favicon.png',
        devServerOpenPage: 'app/',
        ...env
    });
};

Note that additional env variables can be provided at build time, so the application file can specify initial defaults (such as appVersion above, checked in as a SNAPSHOT) that are then overridden for particular builds (e.g. via webpack --env.prodBuild --env.appVersion=1.2.3 to cut a versioned 1.2.3 release).

See the Hoist React readme for step-by-step details on the build process.

ESLint Configuration

✨ This package includes a development dependency on the @xh/eslint-config package. That package exports an eslint configuration object with ExHI's coding conventions and best practices for Hoist React based development.

Applications that already have @xh/hoist-dev-utils as a dependency can use these rules for their own ESLint config by specifying their .eslintrc file as simply:

{
  "extends": ["@xh/eslint-config"]
}

If required, rules and other settings extended from this base configuration can be overridden at the app level.


📫☎️🌎 info@xh.io | https://xh.io/contact

Copyright © 2018 Extremely Heavy Industries Inc.

8.1.0

1 month ago

8.0.0

1 month ago

7.2.0

2 months ago

7.1.0

3 months ago

7.0.0

9 months ago

6.2.0

11 months ago

6.3.0

11 months ago

6.1.2

1 year ago

6.0.0

2 years ago

6.1.0

1 year ago

6.1.1

1 year ago

5.14.0

2 years ago

5.12.0

2 years ago

5.13.0

2 years ago

5.11.1

3 years ago

5.11.0

3 years ago

5.10.0

3 years ago

5.9.3

3 years ago

5.9.2

3 years ago

5.9.1

3 years ago

5.8.0

3 years ago

5.9.0

3 years ago

5.7.0

3 years ago

5.6.0-nofavicons

3 years ago

5.6.0

3 years ago

5.5.0

3 years ago

5.4.0

4 years ago

5.3.0

4 years ago

5.2.2

4 years ago

5.2.1

4 years ago

5.2.0

4 years ago

5.1.0

4 years ago

5.0.0

4 years ago

4.6.0

4 years ago

4.5.0

4 years ago

4.4.1

4 years ago

4.4.0

4 years ago

4.3.7

4 years ago

4.3.6

4 years ago

4.3.5

4 years ago

4.3.4

5 years ago

4.3.3

5 years ago

4.3.2

5 years ago

4.3.1

5 years ago

4.3.0

5 years ago

4.2.0

5 years ago

4.1.2

5 years ago

4.1.1

5 years ago

4.1.0

5 years ago

4.0.0

5 years ago

3.8.1

5 years ago

3.8.0

5 years ago

3.7.7

5 years ago

3.7.6

5 years ago

3.7.5

5 years ago

3.7.4

5 years ago

3.7.3

5 years ago

3.7.2

5 years ago

3.7.1

5 years ago

3.7.0

5 years ago

3.6.0

5 years ago

3.5.0

5 years ago

3.4.1

5 years ago

3.4.0

5 years ago

3.3.0

5 years ago

3.2.0-rc1

5 years ago

3.2.0

5 years ago

3.1.2

6 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.3.0

6 years ago

2.2.3

6 years ago

2.2.2

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago