Starter kit for automating tasks in everyday front-end development. π¨π»βπ» β‘οΈ π β¨ π€
1. Make sure you have a recent version of node.js installed.
2. Install yarn.
Yarn is a new, modern dependency management tool for JavaScript. It caches every package it downloads so it never needs to download it again. The easiest way to install:
β― $ npm install -g yarn
3. Clone repository either with SSH or with HTTPS.
β― $ git clone [email protected]:RamilMamedo/bb8.git
β― $ git clone https://github.com/RamilMamedo/bb8
4. Install gulp.
Gulp is a toolkit for automating painful or time-consuming tasks in your development workflow, so you can stop messing around and build something. The easiest way to install:
β― $ yarn global add gulp-cli
5. Go to the downloaded folder.
β― $ cd bb8
6. To get start immediately.
β― $ yarn start
If you donβt want to install or configure tools, plugins or any other dependencies. So that you can focus on the code, just create a project, and youβre good to go.
You can custom setup the project at any time and specify the dependencies that you need in the file package.json
1. To install dependencies manually.
β― $ yarn
2. To start development.
β― $ yarn dev
If you did everything correctly, it should open a browser with a local server on port 2020 and a working browser-sync.
3. To finalize the project for production.
β― $ yarn build
The last command will create a directory called build
inside the current folder.
No configuration or complicated folder structure, just the ready files you need for production:
./build/
βββ css
β βββ main.min.css
βββ fonts
β βββ Fontello
β β βββ *.{eot,svg,ttf,woff,woff2}
β βββ StarJedi
β βββ *.{woff,woff2}
βββ img
β βββ icons
β βββ *.svg
βββ js
β βββ core.js
β βββ vendors.min.js
βββ index.html
βββ robots.txt
βββ service-worker.js
7 directories, 16 files
- del β for deleting files and folders;
- browser-sync β time-saving synchronized browser testing and live webpage reload when making changes to your project files;
- merge-stream β for merging multiple streams into one interleaved stream;
- gulp-size β Logs out the total size of files in the stream and optionally the individual file-sizes;
- gulp-newer β for passing through only those source files that are newer than corresponding destination files;
- gulp-debug β debug Vinyl file streams to see what files are run through your Gulp pipeline;
- gulp-rename β for renaming files easily, adding suffixes and prefixes;
- gulp-filter β enables you to work on a subset of the original files by filtering them using glob patterns;
- gulp-concat β for concating files in the order that they are specified in the gulp.src function;
- gulp-plumber β prevent pipe breaking caused by errors from gulp plugins;
- gulp-load-plugins β loads gulp plugins from package dependencies and attaches them to an object of your choice;
- gulp-batch-replace β for replacing a batch of strings in the stream;
- gulp-nunjucks-render β is a build time HTML templating engine based on Python Django syntax;
- gulp-htmllint β linter for identifying and reporting on HTML code;
- for more: htmllint;
- gulp-htmlmin β for minifying HTML files;
- gulp-html-beautify β for beautifying HTML files;
- gulp-w3c-html-validator β plugin to validate HTML using the W3C Markup Validation Service;
- csso β CSS minifier, cleaner, compressor, and restructurer;
- cssnano β is a modern, modular compression tool written on top of the PostCSS ecosystem, which allows us to use a lot of powerful features in order to compact CSS appropriately;
- gulp-sass β SCSS to CSS compiler;
- css-mqpacker β packing same CSS media query rules into one using PostCSS;
- css-declaration-sorter β sorting CSS declarations based on their property names;
- gulp-postcss β gulp plugin to pipe CSS through several plugins, but parse CSS only once;
- for more: postcss;
- gulp-stylelint β a mighty, modern linter that helps you avoid errors and enforce conventions in your styles;
- for more: stylelint;
- gulp-purifycss β for removing unused styles;
- for more: purifycss;
- gulp-autoprefixer β automatically places vendor prefixes in CSS according to the Can I Use service;
- for more: autoprefixer;
- gulp-uglify β for minifying JavaScript with UglifyJS3;
- gulp-babel β to support modern JS (ES6) in browsers;
- for more: babel;
- gulp-eslint β identifying and reporting on patterns found in ECMAScript/JavaScript code;
- for more: eslint;
- gulp-webp β converting images into a modern format WebP.
- gulp-favicons β favicons generator based on node.js;
- gulp-imagemin β image compression PNG, JPG, GIF and SVG (including additional plugins for optimization);
- for more: imagemin;
- gulp-svg-sprites β for creating SVG sprites;
Read more about image optimization here: [imagemin-to-compress-images, imagemin-plugins-difference];
Read more about webfont optimization here: Web Font Optimization;
Simple online tool for generating CSS @font-face and transforming difference font formats;
At present, BB8 supports the last two versions of the following browsers:
- Chrome
- Edge
- Firefox
- Safari
- Opera
- Internet Explorer
This doesn't mean that BB8 cannot be used in older browsers, just that it's focus ensure compatibility with the ones mentioned above.
Contributions, questions, and comments are all welcome and encouraged.
If you find yourself running into issues during installation or running the tools, please open an issue. BB8 would be happy to discuss how they can be solved.
The code is available under the MIT license Copyright Β© 2019.