Giter VIP home page Giter VIP logo

asteroids's Introduction

Asteroids

GitHub package.json version (branch) Contributor Covenant

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.

Required steps: Installing Node and Gulp

To run Asteroids you'll need to have Node and Gulp installed:

  • NodeJS LTS version should be okay.
  • Gulp globally installed.

๐Ÿค“ Running on Windows? Just remember to use the Git Bash console instead of that horrible thing called PowerShell.

NodeJS

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

Gulp

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

Quickstart

Once you've installed both NodeJS and Gulp, let's run this starter kit:

  1. Download or clone the repository.
  2. Install the local dependencies with $ npm i.
  3. Run the kit development stuff with $ npm start.

Tasks

Launch a web server for development

$ 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

Process a production-ready distribution

$ npm run build:pro

Delete and reprocess the dist folder with optimized versions of your HTML/CSS/JS files.

Compress a production-ready distribution

$ 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

Folder structure

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

CSS

Asteroids do not include a CSS reset stylesheet anymore, but we have added two awesome tools:

  • A csscomb JSON file to use with your code editor as your own risk :)
  • The media query combiner tool from @hail2u css-mqpacker.

LINTERS AND STUFF

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.

Browser Support

That's up to you :), although you can find a "browserlist" property for the autoprefixer in the package.json file.

TODO

So, what is next?

  • Use SASS Dart.
  • Process JS files: minify and obfuscate?
  • Add a GitHub Pages action.
  • Mobile icons + PSD source file.
  • Gulp task to generate a timestamped deploy folder. @done
  • Add CSS Linters. @done
  • Add JS Linters. @done
  • Use EJS/Nunjucks instead of PUG. @done
  • Quit using Jquery. @done
  • Migrate to 11ty. @done
  • Update modernizr checkers. @wontDoIt
  • Fix PUG/HTML reload loop. @wontDoIt

Request a feature

Do you miss anything? Feel free to request a feature or contribute to making it better ;)

asteroids's People

Contributors

cabans avatar dependabot[bot] avatar oneeyedman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

asteroids's Issues

Redo & Review the readme file

  • Explain more clearly that Gulp is needed for the project to work.
  • Add links to the latest versions of node and gulp.
  • Also add a point about the gitbash console on Windows.

Update CSSCOMB

Add:

  • gap
  • grid
  • Extends position
  • includes position
  • filter

Use SASS DART!!!

I hate it, but let's not be that guy and start using SASS Dart.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.