npm.io
0.8.0 • Published 3 years ago

@codesmithllc/utils

Licence
ISC
Version
0.8.0
Deps
2
Size
156 kB
Vulns
0
Weekly
0

@codesmithllc/utils

@codesmithllc/utils is a collection of utilities used in Codesmith applications.

Installation

You can install @codesmithllc/utils by running the standard NPM install command.

npm install @codesmithllc/components

Usage

Once you have propertly installed @codesmithllc/utils, every module in this library can be imported as a named import:

const { envCheck, logger } = require('@codesmithllc/utils');

// ...

Development

All utilities should live in the src/ directory.

Adding a New Utility

To add a new utility, such as myUtility:

  1. Create a new directory src/myUtility with the following:

    • myUtility.js, the actual utility code

    • myUtility.test.js, which includes any unit or integration tests for myUtility.js

    • index.js, with the following:

      const baseModel = require('./baseModel.js');
      
      module.exports = baseModel;
  2. Add myUtility as an export in index.js.

  3. Go through the Local Development steps in the root README.md to merge and publish @codesmithllc/utils with the new utility. You must have Codesmith GitHub access to view the linked document.

Questions?

Please reach out to Codesmith for any questions about this package.