We are extremely excited to introduce a new way to develop using your preferred workflows on the HubSpot CMS! This new workflow supports all Design Manager assets being represented as a true project of files (DnD templates, HTML template, CSS files, JS files & Modules), unlocking local development, code living in GitHub/version control, build stages, and more.
Please note this functionality is in BETA and subject to change. We have lots of plans to expand on the local development experience but want to craft it with your feedback, which is why we are so excited to get it in the hands of developers. This is only the beginning 🙂
Any feedback/support for this functionality should be posted in the #local-dev-beta channel in the HubSpot Developer Community Slack.
PS. We plan to open-source this tooling so you can contribute and file issues.
HubSpot hosted a CMS Developer AMA on July 25th 2018. This question was submitted and the first reply is what the panelist and audience chat responded with. (view the full AMA here)
We are extremely excited to introduce a new way to develop using your preferred workflows on the HubSpot CMS! This new workflow supports all Design Manager assets being represented as a true project of files (DnD templates, HTML template, CSS files, JS files & Modules), unlocking local development, code living in GitHub/version control, build stages, and more.
Please note this functionality is in BETA and subject to change. We have lots of plans to expand on the local development experience but want to craft it with your feedback, which is why we are so excited to get it in the hands of developers. This is only the beginning 🙂
Any feedback/support for this functionality should be posted in the #local-dev-beta channel in the HubSpot Developer Community Slack.
PS. We plan to open-source this tooling so you can contribute and file issues.
We are extremely excited to introduce a new way to develop using your preferred workflows on the HubSpot CMS! This new workflow supports all Design Manager assets being represented as a true project of files (DnD templates, HTML template, CSS files, JS files & Modules), unlocking local development, code living in GitHub/version control, build stages, and more.
Please note this functionality is in BETA and subject to change. We have lots of plans to expand on the local development experience but want to craft it with your feedback, which is why we are so excited to get it in the hands of developers. This is only the beginning 🙂
Any feedback/support for this functionality should be posted in the #local-dev-beta channel in the HubSpot Developer Community Slack.
PS. We plan to open-source this tooling so you can contribute and file issues.
This is a little gulp environment that allows you to save a running a list of files that you work with, and use Hubspot's API to publish them, or save them to the buffer as a draft. It compiles your SASS for you with sourcemaps for debugging. I also included a little script called 'Get' that will update your local file with whatever Hubspot has as the latest published revision.
I work alone, so nobody is here to tell me my scripts are terrible. Make sure to contribute if you like it, any constructive criticism is welcome.
I'm gonna work on getting my code nice enough to put on a repo for you guys and start using a .env file so I can obscure my HAPI key. But Luke encouraged me to pop on here and post about my local dev environment. From my post on the developers slack:
"i’ve had bad results trying FTP stuff from my gulp taskrunner into the CMS - but recently i’ve cooked up a gulp recipe that allows me to compile my sass and shoot it to CMS API instead. makes my life so much easier."
Right now I'm only using my local environment to do SASS. I'm working on a VSCode Language Extension for HTML + HubL as I have time for it, but I still use the web editor for my HTML and HubL since I can't stand not having syntax highlighting.
For this Gulp recipe, you need these npm or yarn packages:
'gulp-sass'
'request'
'fs'
'prompts'
I load in the path and hubspot ID for each asset I'm working with into some JSON. I have Gulp compile down anything it sees changed and then I use the 'prompt' package to allow me at any point while I'm running Gulp to choose any file I'm working with and initiate an API call to replace the source code of that resource with what I have in my local environment. I only really use this when I am creating something that isn't in production yet.
As I improve my recipe, I'll add it to this thread in Git so you may be able to set it up yourself.
Its just something I have made on the side so hasnt had to omuch put into it but it allows for deployment of Sass and Es6 to hubspot design manager via gulp. I have also added a browsersync proxy to test out pages as you are developing. Not sure if its any help but thought I would just drop it off incase anyone found it useful.
I'm new to hubspot and I'm messing with HUBL and the local env setup. This is really awesome. Thank you so much for sharing this. I will SPEAK YOUR NAME in the custom theme I create.
Glad you're finding this helpful @droppr ! We're actually exploring how to take local development to the next level in 2019. More to come... stay tuned.
nice @RyanAbsalom! That's awesome to see. Thanks for sharing on GitHub! ... would it be possible for you to record a short video walkthrough of you making some updates via your local setup? ... I know folks love seeing real examples of usage.
I have recorded a small clip showing how to work with this environment. I dont really have a lot of time to make such more than that but I hope it helps 🙂
Thanks so much @RyanAbsalom! This is great. I know the folks following/viewing this thread will find this stuff helpful. I"m working on getting a few more examples over the next month... so make sure to keep an eye here for more ideas.
No problem @lukesummerfield. Its looking likely I will be working a lot more on some hubspot development in the coming months so If I add improvements I will make sure to keep it updated!
For those watching the CMS Developer AMA video that @anthonypizzurro posted on this thread - Anthony was nice enough to share the HubL Macro Helper sheet he walked through in his answer.
Please keep in mind - this is a community-created resource and is not officially supported by HubSpot -and- might be a bit dated. But still super helpful. Enjoy!