ericalli / static-site-boilerplate

A better workflow for building modern static websites.
http://staticsiteboilerplate.com
MIT License
1.73k stars 165 forks source link

Easy way to add more JS or SCSS files #18

Closed DESIGNfromWITHIN closed 5 years ago

DESIGNfromWITHIN commented 5 years ago

Is there a way to add more JS files? Would I need to edit a config file to addmore JS files and set the order?

ericalli commented 5 years ago

No config file changes are necessary. Simply "import" your SCSS or JavaScript files from the main styles.scss or scripts.js files respectively.

For example, within the styles.scss file, you can add another stylesheet called example.scss by using the following line of code:

@import "example.scss"

References:

https://sass-lang.com/guide#topic-5 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import