Skip to content
This repository has been archived by the owner on Dec 18, 2022. It is now read-only.

Boilerplate for a working Typescript project with SCSS and Rollup for bundling

License

Notifications You must be signed in to change notification settings

franklin-ross/typescript-scss-rollup-boilerplate

Repository files navigation

typescript-scss-rollup-boilerplate

A boilerplate project using Typescript and SCSS, with Rollup for bundling and minifying.

Design Decisions

Multi-stage Build over full Rollup pipeline

Build is multi-stage in that it uses individual compilers like tsc and node-sass for compiling ts and scss source from src/ into js and css in dist/compiled, then uses Rollup for bundling and minifying. Reasons:

SCSS over CSSNext

I chose to use SCSS because many editors have syntax support for it. I'd love to use the CSSNext PostCSS plugin, but having good editor tooling wins out. PostCSS is still used by Rollup for wrangling CSS.

Rollup over Browserify et al.

Rollup seems really clean and easy to get going, and also produces very efficient results through tree-shaking. I also really like being able to import non-js dependencies and have them included during bundling.

We'll see if I miss some of the fancy stuff in the others.

Mocha and Chai

They're popular, but that's pretty much my only attachment.

File locality

I'm a big fan of co-locating related files, so source.ts will have source.scss and source.test.ts next to it.

About

Boilerplate for a working Typescript project with SCSS and Rollup for bundling

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published