0.2.0 • Published 4 years ago
obby-lib v0.2.0
Obby lib
We are using ava for testing and rollup for exporting library and handling dependencies for the tiniest package possible.
Setup
git clone https://github.com/Cikito/obby-lib.git
cd obby-lib
nvm use 10.12.00
yarn
yarn build
yarn link
# go to the app
# npm link obby-lib
# meteor has betrayed us and it does not work currently
# go to obby-components
npm link obby-lib
Dev
cd src
touch yourFunctionName.js
touch yourFunctionName.test.js
# set up test do some coding then:
yarn run test
Deploy
yarn run build
# we need to figure out how we are going to deploy this to npm
Development convetions
- All files go in
src
folder there are no sub folders - A file per lib function.
- Always have seperate test file per lib function (this is we dev the function localy in this package)
- Regular function naming convention:
<name>.js
,<name>.test.js
- Transformer function naming convention:
<TypePassedIn__TypeReturned>.js
,<TypePassedIn__TypeReturned>.test.js
- Any data that needs to be mocked for tests goes in the
mocks
folder.