GithubHelp home page GithubHelp logo

monkviper / starterkit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from carloscuesta/starterkit

0.0 2.0 0.0 1.49 MB

A Front End development Gulp.js based workflow. ๐Ÿš€

Home Page: https://starterkit.carloscuesta.me

License: MIT License

JavaScript 41.69% CSS 21.14% HTML 37.17%

starterkit's Introduction

Carlos Cuesta Starter Kit

Build Status Dependency Status GitHub release XO code style

Carlos Cuesta Starterkit

A simple starterkit boilerplate that I use to realize my front end static development projects. If you have comments or suggestions feel free to give me a shout on Twitter! Also checkout the yeoman generator-startekit.

Technologies

  • Gulp - Automate and enhance your workflow
  • Pug - Terse language for writing HTML templates.
  • SASS - CSS with superpowers.
  • Babel - Use next generation JavaScript, today (ES5 => ES6).
  • Flexboxgrid - A grid system based on the flex display property.
  • NodeJS - JavaScript runtime built on Chrome's V8 JavaScript engine.

Requirements and Use

Requirements

$ npm install -g gulp

Use

$ git clone https://github.com/carloscuesta/starterkit.git
$ cd starterkit/ && npm install
$ gulp

Tasks

gulp: Runs the default task (dev) including the following ones :

  • styles: SCSS compiling to CSS, css minification and autoprefixing.
  • templates: Pug compiling and rendering to HTML.
  • scripts: ES6 to ES5 with babel, scripts minification and concatenation into a single file.
  • images: Image compression.
  • beautify: Beautify your preproduction files at ./dist/.
  • serve: Starts a server at ./dist/ with all your compiled files, looking for file changes and injecting them into your browser.

gulp build: Builds your project. runs the following tasks:

  • styles
  • templates
  • scripts
  • images
  • beautify

gulp optimize: Optimizes your project (to improve the pagespeed) runs:

  • uncss: Removes unused CSS from your styles file using uncss.
  • critical: Extract and inline critical-path (above-the-fold) CSS from HTML using critical
  • images

gulp deploy: Deploy your dist folder into your server or surge cloud runs:

If you want to use the deploy task, you will have to edit the gulpfile.js lines between 65-69 with your ftp connection info: host | user | password. If you want to use Surge instead of FTP, just setup a domain name in the surgeInfo.domain

Once you setup ftpCredentials, you will have to choose a directory of your server where the deploy will go: ftpUploadsDir

Now you will be able to use gulp deploy and your /dist/ folder will go up to your ftp server!

Use npm run to list the gulp tasks available. You can run the tasks too using the npm run scriptname that is on the list.

Project Structure

.
โ”œโ”€โ”€ /dist/                   # Minified, optimized and compiled files.
โ”‚   โ”œโ”€โ”€ /assets/             # Assets folder.
โ”‚   โ”‚   โ”œโ”€โ”€ /css/            # CSS style files.
โ”‚   โ”‚   โ”œโ”€โ”€ /files/          # Static files.
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ img/         # Images folder.
โ”‚   โ”‚   โ””โ”€โ”€ /js/             # JS files.
โ”‚   โ””โ”€โ”€ *.html               # Rendered and compiled HTMLs from Pug.
โ”œโ”€โ”€ /node_modules/           # Node modules dependencies and packages.
โ”œโ”€โ”€ /src/                    # Source files.
โ”‚   โ”œโ”€โ”€ /images/             # Images non compressed.
โ”‚   โ”œโ”€โ”€ /scripts/            # JavaScript files.
โ”‚   โ”œโ”€โ”€ /styles/             # SCSS style files.
โ”‚   โ”‚   โ””โ”€โ”€ _includes/       # Styles SCSS partials.
โ”‚   โ”œโ”€โ”€ /templates/          # Templating Pug files.
โ”‚   โ”‚   โ””โ”€โ”€ _includes/       # Templating Pug partials.
โ””โ”€โ”€ gulpfile.js              # Gulp automatization file.

Demo

starterkit-terminal

License

The code is available under the MIT license.

starterkit's People

Contributors

carloscuesta avatar greenkeeperio-bot avatar revod avatar

Watchers

 avatar  avatar

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.