Component partials

my-component
dist
js-badge Created with Sketch.
my-component.js
_js-partials
js-badge Created with Sketch.
_partial-1.js
js-badge Created with Sketch.
_partial-2.js
js-badge Created with Sketch.
my-component.js

Each .js file that you write in a component will generate a .js file in a sibling dist folder

If you don’t want that for a certain file, you can tell Gulp that a certain file is a partial, by starting it’s filename with an underscore _.

It's then the responsibility of another .js file to include that _[partial-name].js file, otherwise Drupal will never load in the code you've written in that partial.