Hubspot Dev Kit is a theme boilerplate and uses TailwindCSS V4 (CSS framework).
Please check documentation and articles for information on Hubspot Local Development.
- Local Development Tooling: CLI Reference
- Quick start guide tp developing on the HubSpot CMS
- Hubl Functions
- Hubl Variables
- Hubl Filters
- HubDB
It is recommended to develop using the Official Hubspot Developer Extension, as it gives you a plethora of tools for your own convenience, such as hsDebug toggle.
- Clone the repository to your local machine
git clone [email protected]:freshjuice-dev/hubspot-dev-kit.git
- Change current directory
cd ./hubspot-dev-kit
- Install Packages
npm install
Run hs init
to connect the tools to your HubSpot account. This command will walk you through the following steps:
- The command will guide you to create a personal CMS access key to enable authenticated access to your account via the local development tools.
- It will prompt you to press "Enter" once you’re ready to open the Personal CMS Access Key page in your default browser. This page will allow you to view or generate your personal access key if necessary. (Note: You’ll need to select at least the "Design Manager" permission to complete this tutorial.)
- Copy your access key and paste it in the terminal.
- Enter a name for the account. This name is only seen and used by you. For instance, you might use "sandbox" if you're using a developer sandbox or "company.com" if you’re using a full customer account. This name will be used when running commands.
Once you've completed this simple init
flow, you'll see a success message confirming that a configuration file, hubspot.config.yml
, has been created in your current directory.
File hubspot.config.yml contains your personal access keys Please be sure you are not track file hubspot.config.yml and its include to .gitignore
prepare
- Initializes husky.fetch:hubspot
- Fetches the current saved files on hubspot.upload:hubspot
- Updates hubspot saved files with local changes.watch:hubspot
- When initialized, watches for changes to local repo, and updates hubspot files on saving.watch:tailwind
- When initialized, watches for changes to tailwind.css and updates the compiled theme's tailwind.css file.build:tailwind
- Updates hubspot compiled tailwind.css file with local changes.watch:js
- When initialized, watches for changes to main.js and updates the compiled theme's main.js file.build:js
- Updates hubspot compiled main.js file with local changes.start
- Initialize local instance of repo.build
- Initialize build of local version repo.
-
Use
npm run fetch:hubspot
to be sure your local files match the contents on hubspot. -
Once changes are done, always commit.
-
To upload your changes:
npm run upload:hubspot
npm run start
Please note that when you execute npm run start
, if you do not terminate the process, it will keep watching for any changes you make and publish said changes on your corresponding hubspot files.