henrybuilt-js-library
This is a shared JavaScript library intended to be used by both clients and servers.
Do not add code that is client-or-server-only.
Instructions
Setup
git clone https://github.com/henrybuilt/henrybuilt-js-library
npm install
npm test
- verify that tests are passing - don't worry about code coverage for now- checkout a branch
Modifying the library
-
inside henrybuilt-js-library
-
set up a working branch and version
- determine the new version number, like 1.1.0
git checkout -b v-X-X-X
where X-X-X is like 1-1-0
and corresponds to the version- update
version:
in package.json
to the new version number
-
develop your feature(s)
- make your modifications inside
/src
and keep test coverage at 100% - if you're working with
henrybuilt-website
- open another terminal tab and run
npm run develop
- temporarily uncomment line 147 in
henrybuilt-website/app/controllers/application_controller.rb
-
run npm run build
until it builds without errors
-
push and Max will manage deployment
-
if you have permission to publish
git checkout master
and git pull
npm publish
-
inside henrybuilt-website
- update
ENV['HENRYBUILT_JS_LIBRARY_VERSION']
inside config/application.rb
- restart the server
- verify your update worked via chrome console by typing
lib
, pressing enter, and reviewing it or actually using it
TODO
- JSFiddle with access
- CI
- any general classes
- make it so henrybuilt-website doesn't need to be restarted
,
"_moduleAliases": {
"@src": "./src"
}