9amHealth HubSpot Theme
A theme for HubSpot, built with the 9amHealth web component library.
How it Works
Webpack bundles all dependencies and assets into a dist
folder that can be published to the HubSpot environment; there are scripts available to build and deploy in the package.json
file. Template layouts reference the bundled CSS and JS main
files necessary to run the site properly. This theme leverages the web component library throughout the template's markup, and the HubSpot modules are tightly coupled to their corresponding web components.
Development
yarn
yarn hs:init
yarn dev
yarn deploy:develop
The yarn dev
command starts Webpack in development mode. This will watch for changes to the src
folder, and rebuild the dist
folder when changes are made. When the yarn dev
command is run, the dist
folder will be deleted, and the src
folder will be bundled into the dist
folder. Changes to templates and modules will be visible in the HubSpot webpages.
Production
yarn deploy
Note: in order to properly manage a development and production environment, ensure that the hubspot.config.yml
file generated via hs:init
contains access tokens for each portal.
File Structure
├── src
│ ├── assets
│ │ ├── fonts
│ │ └── images
│ ├── css
│ │ ├── fonts.css
│ │ └── main.css
│ ├── js
│ │ ├── main.ts
│ │ └── globals.ts
│ ├── modules
│ ├── templates
│ ├── fields.json
│ └── theme.json
├── dist
├── node_modules
├── package.json
├── README.md
├── tsconfig.json
├── webpack.config.js
├── yarn.lock
└── .gitignore