Boilerplate Vue project for creating apps using modules on the HubSpot CMS
- Uses Vue version 2(currently 2.6)
- Supports Vue SFC(Single File Components)
For more information on local development tools, see Local Development Tooling: Getting Started
Set up HubSpot CMS CLI (@hubspot/cms-cli)
- A config file named
hubspot.config.ymlwill also be needed. The config can be at the project level or higher up in the directory tree. - Be sure to set a
defaultPortalin yourhubspot.config.ymlto which you'd like the built app files to sync.
- Run
npm installoryarn installto install needed dependencies.
- Run
npm startoryarn startto automatically upload your project todefaultPortal. - Create a page from default theme, or any drag-and-drop (
dnd_area) enabled template in your portal, and add the module(see snippet below).{% module "cms_vue_boilerplate" path="./cms-vue-boilerplate/modules/app" label="CMS Vue Boilerplate" %}
start: Builds project with webpack, uploads to yourdefaultPortalspecified inhubspot.config.ymland watches for changes via@hubspot/webpack-cms-plugins/HubSpotAutoUploadPlugin.build: Clears/distcontents and builds project into/dist.deploy: Clears/distcontents, builds project into/dist, and uploads to via@hubspot/cms-cli.lint: Lints CSS, JS, and JSON files viaeslint(documentation) and checks for formatting viaprettier(documentation) insrc.- For configs, see
prettier.config.jsandeslintrc.js.
- For configs, see
prettier:write: Formats JS and JSON files insrc.- For configs, see
prettier.config.js.
- For configs, see