@codesmithllc/utils
v0.8.0
Published
A collection of utilities for use in Codesmith applications
Downloads
54
Readme
@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
:
Create a new directory
src/myUtility
with the following:myUtility.js
, the actual utility codemyUtility.test.js
, which includes any unit or integration tests formyUtility.js
index.js
, with the following:const baseModel = require('./baseModel.js'); module.exports = baseModel;
Add
myUtility
as an export inindex.js
.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.