henrybuilt-js-library

This is a shared JavaScript library intended to be used by both clients and servers.

Usage no npm install needed!

<script type="module">
  import henrybuiltJsLibrary from 'https://cdn.skypack.dev/henrybuilt-js-library';
</script>

README

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

  1. inside henrybuilt-js-library

    1. set up a working branch and version

      1. determine the new version number, like 1.1.0
      2. git checkout -b v-X-X-X where X-X-X is like 1-1-0 and corresponds to the version
      3. update version: in package.json to the new version number
    2. develop your feature(s)

      1. make your modifications inside /src and keep test coverage at 100%
      2. if you're working with henrybuilt-website
        1. open another terminal tab and run npm run develop
        2. temporarily uncomment line 113 in henrybuilt-website/app/controllers/application_controller.rb
    3. run npm run build until it builds without errors

    4. push and Max will manage deployment

    5. if you have permission to publish

      1. git checkout master and git pull
      2. npm publish
  2. inside henrybuilt-website

    1. update ENV['HENRYBUILT_JS_LIBRARY_VERSION'] inside config/application.rb
    2. restart the server
    3. 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" }