Jekyll + Gulp.js + BrowserSync + PostCSS + Stylelint
Note: Use asdf-vm to install and manage versions of Node.js and Ruby. Alternatives like
NVM
,nodenv
, andrbenv
can be used as long as there’s a.nvmrc
,.ruby-version
, etc. file.
Node.js. Currently developed against Node.js 8.11.4
.
Ruby. Currently developed against ruby 2.5.3
.
Bundler, install with:
gem install bundler
Clone the repository and change into the gulp-jekyll
folder. Run:
bundle
npm install
npm run bower install
Open gulp/config.js
and change settings if needed.
Create development build with live-reload:
npm start
Create production build with preview:
npm run build
Deploy latest production build through rsync:
npm run stage
Deploy latest production build on AWS:
npm run s3:push
Dry-run (preview) a deployment on AWS:
npm run s3:dry
gulp-jekyll uses a 5-1 pattern, which is abstracted from the 7-1 pattern. 5 folders, 1 file to compile them all in a single CSS file.
styles/
|
|- utilities/ # Configuration and helpers
| |- _variables.css # Global variables
| |- _functions.css
| |- _mixins.css
| …
|
|- vendor/ # Third-party CSS
| |- _normalize.css
| …
|
|- base/ # Boilerplate code
| |- _reset.css
| |- _base.css
| |- _typography.css
| …
|
|- layout/ # Global wireframe (macro)
| |- _header.css
| |- _navigation.css
| |- _sidebar.css
| |- _footer.css
| …
|
|- components/ # Modules (micro)
| |- _buttons.css
| |- _cards.css
| |- _tables.css
| …
|
`- main.css # Main file to import everything