1.1.1 • Published 3 years ago
@tollbrothers/isstring v1.1.1
isString package
Is the string a string?
const isString = require('isstring')
console.log('isString', isString(3))
console.log('isString', isString([3]))
console.log('isString', isString('test'))How was this package created?
- Created the
isStringproject on Github as an empty repo for thetollbrosGithub org. - Locally created a
packagesdirectory. - Checked out the
isStringrepo in thepackagesdirectory. - Within the
packages/isStringdirectory, runnpm init --scope=tollbrothersand chose all the defaults. - Created the
index.jsfile inpackages/isString, this matches the defaultpackage.json(seemainkey).
How was this package tested locally?
- Within the
packages/isStringdirectory, runnpm link. This created thepackage-lock.jsonfile. - Went back to the
packagesdirectory and created aisStringTESTdirectory. - Created the
script.jsfile inpackages/isStringTEST. - Within the
packages/isStringTESTdirectory, runnpm link isstring. This linked theisStringpackage to the test script. - Run the script via
node script.js
How do we publish changes?
- Publishing has been automated by the Semantic Release Workflow
Semantic Release Workflow
Basically, follow the commit message format below. Then when the commit is posted on the main branch semantic-release will do its thing and publish a new version on merge to main or a direct commit to main.
Things to consider
- You can publish code without commiting it. Not sure why you would but there are no guards to prevent you from doing so.
- On github, the org is
tollbros - On npm, the org is
tollbrothers