Skip to content

erichosick/trkm

Repository files navigation

trkm

A Lerna mono repo which contains:

  • Html Packages
    • @trkm/html-form-apply-ts - Given an object, pulls values from the object (using getFromObject) and sets the value to a form field found via an HtmlElementQuery.
    • @trkm/html-support-ts - A very small typescript library used to find html elements on a webpage.
    • @trkm/html-types-ts - Typescript type and interface definitions for html elements used by different trkm libraries.
  • @trkm/http-context-ts -Aggregates information about a current webpages's context, such as cookies and url parameters, into a single object for easy consumption.
  • @trkm/http-cookies-ts - Converts the Http cookie format (document.cookie) to a javascript object: the cookie name becomes the object property name.
  • @trkm/http-session-deepmerge-ts - Stores a page's context in a session: deep merging existing session context as needed.
  • @trkm/http-url-ts - Support for converting information about an http url contained within the DOM windows and DOM documents, such as the url parameters, to javascript objects for easy consumption.
  • @trkm/http-uuid-generate-v4-ts - Generates a Version 4 uuid within a webpage by pulling the uuid generated by createObjectURL out of the url.
  • @trkm/library-ts - Tracking Madness library.
  • @trkm/library-web - Places the tracking magic library and interface into the globalThis.trkm root.
  • @trkm/object-json-path-ts - Using a small subset of JSONpath features, object-json-path-ts gets or sets a value on a javascript object.
  • @trkm/types - Types shared between @trkm packages.

lerna

Development

Development requirements:

  • Node + Yarn
# init all the projects
yarn

# continuously run tests
yarn test:unit:watch

# build any distributables and run unit tests
yarn test:unit

# build javascript library from typescript library
yarn build

# continuously build javascript library from typescript library
yarn build:watch

# publish all packages that have changed to npmjs.com
yarn publish:all

Pushing Changes

# verify test run
yarn test:unit

# verify build works
yarn build

# make sure everything is commented, checked in and pushed into git
# TODO: Document code review process

# publish all packages that have changed
# you will need to have setup the account with npmjs.com
yarn publish:all

# enter the one-time password generated using 
# select correct version bump

Adding a New Project

# Add a new project
yarn lerna:create {@name/new-package-name}  # Example yarn lerna:create @trkm/http-context

# Link it to other projects
yarn lerna add {@name/existing-module} --scope={@name/new-package-name}

Linking To Another Project

yarn lerna add {@name/existing-module} --scope={@name/new-package-name}
# example
yarn lerna add @trkm/http-cookies-ts --scope=@trkm/http-context

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published