Namespace: Commands

Commands

List of lib commands to use with theme

Source:

Methods

(async, static) build()

Build/compile all src CSS/JS/SCSS files

Source:
Example
// run with node
echo "import '@resultify/hubspot-cms-lib/build'" > build.js
node build.js


// run with npm by adding to package.json scripts:
"scripts": {
 "build": "cmslib --build",
}
or
"scripts": {
  "build": "node -e 'import(`@resultify/hubspot-cms-lib/build`)'"
}
npm run build

(async, static) cleanUpload()

Clean Upload theme to HUBSPOT cms portall

Source:
Example
// run with node
echo "import '@resultify/hubspot-cms-lib/cleanUpload'" > cleanUpload.js
node cleanUpload.js


// run with npm by adding to package.json scripts:
"scripts": {
 "cleanUpload": "cmslib --cleanUpload",
}
or
"scripts": {
  "cleanUpload": "node -e 'import(`@resultify/hubspot-cms-lib/cleanUpload`)'"
}
npm run cleanUpload

(async, static) fetchDb()

Fetch HubDB table/s

Source:
Example
// run with node
echo "import '@resultify/hubspot-cms-lib/fetchDb'" > fetchDb.js
node fetchDb.js


// run with npm by adding to package.json scripts:
"scripts": {
 "fetchDb": "cmslib --fetchDb",
}
or
"scripts": {
  "fetchDb": "node -e 'import(`@resultify/hubspot-cms-lib/fetchDb`)'"
}
npm run fetchDb

(async, static) fields()

Compile fields.js to fields.json

Source:
Example
// run with node
echo "import '@resultify/hubspot-cms-lib/fields'" > fields.js
node fields.js


// run with npm by adding to package.json scripts:
"scripts": {
 "fields": "cmslib --fields",
}
or
"scripts": {
  "fields": "node -e 'import(`@resultify/hubspot-cms-lib/fields`)'"
}
npm run fields

(async, static) hubspotFetchAll()

Fetch all theme files

Source:
Example
// run with node
echo "import '@resultify/hubspot-cms-lib/fetch'" > fetch.js
node fetch.js


// run with npm by adding to package.json scripts:
"scripts": {
 "fetch": "cmslib --fetch",
}
or
"scripts": {
  "fetch": "node -e 'import(`@resultify/hubspot-cms-lib/fetch`)'"
}
npm run fetch

(async, static) hubspotFetchModules()

Fetch only modules from HubSpot theme

Source:
Example
// run with node
echo "import '@resultify/hubspot-cms-lib/fetchModules'" > fetchModules.js
node fetchModules.js


// run with npm by adding to package.json scripts:
"scripts": {
 "fetchModules": "cmslib --fetchModules",
}
or
"scripts": {
  "fetchModules": "node -e 'import(`@resultify/hubspot-cms-lib/fetchModules`)'"
}
npm run fetchModules

(async, static) lighthouse()

Get Lighthouse Score for theme

Source:
Example
// run with node
echo "import '@resultify/hubspot-cms-lib/lighthouse'" > lighthouse.js
node lighthouse.js


// run with npm by adding to package.json scripts:
"scripts": {
 "lighthouse": "cmslib --lighthouse",
}
or
"scripts": {
  "lighthouse": "node -e 'import(`@resultify/hubspot-cms-lib/lighthouse`)'"
}
npm run lighthouse

(async, static) upload()

Upload theme to HUBSPOT cms portall

Source:
Example
// run with node
echo "import '@resultify/hubspot-cms-lib/upload'" > upload.js
node upload.js


// run with npm by adding to package.json scripts:
"scripts": {
 "upload": "cmslib --upload",
}
or
"scripts": {
  "upload": "node -e 'import(`@resultify/hubspot-cms-lib/upload`)'"
}
npm run upload

(async, static) uploadDb()

Upload HubDB table/s

Source:
Example
// run with node
echo "import '@resultify/hubspot-cms-lib/uploadDb'" > uploadDb.js
node uploadDb.js


// run with npm by adding to package.json scripts:
"scripts": {
 "uploadDb": "cmslib --uploadDb",
}
or
"scripts": {
  "uploadDb": "node -e 'import(`@resultify/hubspot-cms-lib/uploadDb`)'"
}
npm run uploadDb

(async, static) validate()

Theme Validation

Source:
Example
// run with node
echo "import '@resultify/hubspot-cms-lib/validate'" > validate.js
node validate.js


// run with npm by adding to package.json scripts:
"scripts": {
 "validate": "cmslib --validate",
}
or
"scripts": {
  "validate": "node -e 'import(`@resultify/hubspot-cms-lib/validate`)'"
}
npm run validate

(async, static) watch()

Run watch process with css/js/scss compilation

Source:
Example
// run with node
echo "import '@resultify/hubspot-cms-lib/watch'" > watch.js
node watch.js


// run with npm by adding to package.json scripts:
"scripts": {
 "watch": "cmslib --watch",
}
or
"scripts": {
  "watch": "node -e 'import(`@resultify/hubspot-cms-lib/watch`)'"
}
npm run watch

Table of contents