0.8.0 • Published 3 years ago
@codesmithllc/utils v0.8.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/componentsUsage
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/myUtilitywith the following:myUtility.js, the actual utility codemyUtility.test.js, which includes any unit or integration tests formyUtility.jsindex.js, with the following:const baseModel = require('./baseModel.js'); module.exports = baseModel;
Add
myUtilityas an export inindex.js.- Go through the Local Development steps in the root README.md to merge and publish
@codesmithllc/utilswith 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.