# Gulp CSS compilation

**URL:** <https://community.hubspot.com/t/gulp-css-compilation/3103>\
**Category:** CMS Development\
**Created:** [August 21, 2017, 5:41pm UTC](https://community.hubspot.com/t/gulp-css-compilation/3103 "2017-08-21T17:41:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bruno-ebanx](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bruno-ebanx/32/61905_2.png) [@bruno-ebanx](https://community.hubspot.com/u/bruno-ebanx)\
**Post date:** [August 21, 2017, 5:41pm UTC](https://community.hubspot.com/t/gulp-css-compilation/3103/1 "2017-08-21T17:41:34Z")

</div>

Hi, I’m using the FTP connection to manipulate the css of my hubspot’s website and I notice that inside the css file there are some hubspot include like this one

`{% include "custom/page/theme/style.css" %}`

My doubt is about how to compilate the css file using gulp. Do you have any suggestion about plugins to ignore this piece of code in the development step but compile this piece of code for the production without any error? I’m doing the compilation normally with CSS files without the include, but files with this include isn’t generated.

---

<div class="post-metadata">

**Author:** ![dessery](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dessery/32/92851_2.png) [@dessery](https://community.hubspot.com/u/dessery)\
**Post date:** [August 22, 2017, 8:36am UTC](https://community.hubspot.com/t/gulp-css-compilation/3103/2 "2017-08-22T08:36:23Z")

</div>

Hi Bruno

Are you using the local hubl server? Or are you compiling and uploading using the standard design manager tools?

I use Gulp in our local setup but I don’t make use of the standard hubl style includes, I just use normal SASS includes and compile using compass. My setup in my gulpfile is as follows:

`gulp.task('compass', function() { gulp.src('./sass/*.scss') .pipe(compass({ config_file: 'config.rb', css: 'custom/system/css', sass: 'sass', sourcemap: true })) .pipe(browserSync.stream()) .on('error', swallowError);});`

If your not using compass or browserSync, yours will likely ned to be different. In my sass folder I have a themename.scss file which is then complied out to custom/system/css/themename.css.

Then in the header of my pages I have:

`{{ standard_header_includes }}<link rel="stylesheet" href="{{ get_public_template_url('custom/system/css/themename.css') }}">`

Lastly in my config.yaml file I have:

`extensionResourceMappings: "1": "" `

The last step mimics the fact that I don’t have the stylesheet included globally in the HubSpot Content Settings, if you did want to include it globally though you can just change

`"1": "" : `

to:

`"1": "custom/system/css/themename.css"`

And remove the \<link\> from the header.

This way I have never had to worry about the HubL style includes.

I hope this is of some help, my apologies if it is not quite what you are looking for.

All the best

David

---

<div class="post-metadata">

**Author:** ![bruno-ebanx](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bruno-ebanx/32/61905_2.png) [@bruno-ebanx](https://community.hubspot.com/u/bruno-ebanx)\
**Post date:** [August 22, 2017, 2:50pm UTC](https://community.hubspot.com/t/gulp-css-compilation/3103/3 "2017-08-22T14:50:37Z")

</div>

Hey Dessery, thanks for the answer 😄

I’m not using hubl server, only standard design manager tools with local CSS that I create. I’m still using hubspot’s include because I’m organizing the archtecture of my website.

I’ll search more about how to use the hubl server.

Thanks.

---

<div class="post-metadata">

**Author:** ![nicolebrenner](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/nicolebrenner/32/64853_2.png) [@nicolebrenner](https://community.hubspot.com/u/nicolebrenner)\
**Post date:** [August 22, 2017, 5:30pm UTC](https://community.hubspot.com/t/gulp-css-compilation/3103/4 "2017-08-22T17:30:02Z")

</div>

Hi @bruno-ebanx you can find our HubL Resources here: [HubL Syntax - HubSpot docs](http://designers.hubspot.com/docs/hubl/intro-to-hubl)

I hope this helps!

Thank you @dessery for sharing your contributions!

---

<div class="post-metadata">

**Author:** ![dessery](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dessery/32/92851_2.png) [@dessery](https://community.hubspot.com/u/dessery)\
**Post date:** [August 23, 2017, 9:41am UTC](https://community.hubspot.com/t/gulp-css-compilation/3103/5 "2017-08-23T09:41:34Z")

</div>

Hi Bruno

That makes sense then, unfortunately I think you are probably going to have a hard time trying to use gulp to compile using the HubSpot include statements. I completely get why you are trying to do it though if you are using the design manager.

In the past I have tried building sites all in the design manager and I have just had one main css file, that includes lots of individual files using hubl but in the exact same architecture as I do with a SASS setup, it does work quite well substituing hubl variables for SASS variables but it is a pain in the ass having to publish both stylesheets everytime you want to make a change.

The local hubl server is well worth checking out, its far from perfect but being able to use my own IDE and normal development workflow makes developing for HubSpot a much more pleasurable experience.

Good luck with your investigations

All the best

David
