Yep, a gulp-ready-nunjucks-lover-sass-powered-and-humanstxt-included html starter kit!
Ahoy! This kit is my all-new/all-old web starter kit. Use it well!
With the help of Gulp and 11ty, Asteroids includes SCSS processing, JS minification and Nunjucks, a super cool template engine created by Mozilla.
To run Asteroids youβll need to have Node and Gulp installed:
π€ Running on Windows? Just remember to use the Git Bash console instead of that horrible thing called PowerShell.
Go to the official NodeJS website and download the version that best suits you. The LTS version should work fine. Install it, and your done π
You can check if everything went okay by opening a terminal window and typing:
node -v
Weβll need Gulp to process our SCSS and JS files because Eleventy doesnβt do this.
Go to the official Gulp website and follow the installing instructions. They should be something like open a terminal and type:
npm install --global gulp-cli
But itβs best to check it out π
You can also check that everything went the way it was supposed to by opening a new terminal window and typing:
gulp -v
Once youβve installed both NodeJS and Gulp, letβs run this starter kit:
$ npm i
.$ npm start
.$ npm start
Launch Eleventy in serve mode and run some Gulp tasks to keep an eye on your SCSS/JS files to process and reload your project on port 8080
$ npm run build:pro
Delete and reprocess the dist folder with optimized versions of your HTML/CSS/JS files.
$ gulp zipit
Delete and reprocess the public folder with optimized versions of your HTML/CSS/JS files and compress it in a .zip file.
The task picks the name of the project from the package.json βnameβ property.
It will generate an ignored DDMMYY-hm-project-name.zip
file
The gulpfile.js uses a configuration JSON file to set source and destination files of the project.
Check config.json out and edit what you need.
The project folder structure looks like this:
/.
βββ _src/
βΒ Β βββ _data/
βΒ Β βΒ Β βββ settings.js
βΒ Β βββ _templates/
βΒ Β βΒ Β βββ layouts/
βΒ Β βββ assets/
βΒ Β βΒ Β βββ _domain/
βΒ Β βΒ Β βββ _icon/
βΒ Β βΒ Β βββ _scripts/
βΒ Β βΒ Β βββ _scss/
βΒ Β βΒ Β βββ css/
βΒ Β βΒ Β βββ fonts/
βΒ Β βΒ Β βββ images/
βΒ Β βΒ Β βββ js/
βΒ Β βββ index.njk
βββ dist/
βββ CNAME
βββ assets/
βΒ Β βββ css/
βΒ Β βββ fonts/
Β Β βΒ Β βββ images/
Β Β βΒ Β βββ js/
Β Β βββ favicon.ico
Β Β βββ humans.txt
Β Β βββ index.html
Asteroids do not include a CSS reset stylesheet anymore, but we have added two awesome tools:
A few linter configurations are also included in Asteroids: Eslint, Stylelint and Markdown lint. You may need certain plugins or extensions for your code editor in order to use them.
π There is no such thing as a pre commit configuration or autoformat setting, these linters are only meant to show βproblemsβ as you edit any JS/SCSS/MD file.
Thatβs up to you π, although you can find a βbrowserlistβ property for the autoprefixer in the package.json file.
So, what is next?
Do you miss anything? Feel free to request a feature or contribute to making it better π