Coder Social home page Coder Social logo

frontend-template's Introduction

Gulp-Frontend-Start

Help a front-end-developer do better and construct his/her code

QUICK START

$ sudo npm stall

build sass , js

$ gulp

build hbs to html, and watch

$ ./bin/build -w

About Frontend Template

It helps you to construct and orginize your static code , quickly minify html , css , js , img.

Use gulp and canner-core ( The html's template is hbs )

  • gulp
  • gulp-compass
  • gulp-concat
  • gulp-imagemin
  • gulp-minify-css
  • gulp-plumber
  • gulp-rename
  • gulp-uglify
  • gulp-clean-css
  • gulp-watch
  • canner-core
  • minist

Developer

gulp

build sass , js , then watch

$ gulp

minify css , js

$ gulp minify-css
$ gulp minify-js

concate all lib js or css file to one file , reduce request

$ gulp concate-css
$ gulp concate-js

compress img ( It's usually use on final in your project)

$ gulp image

canner-core

build hbs to html

$ ./bin/build 

parameters

  • -w : watch
  • -m : minify code

Intro every dirname

./sass

puts sass / scss code

  • input : sass /
  • output : dist / css /

./js

puts js code

  • input : js /
  • output : dist / js

./dist

puts minify's code (css , js , img , bgm)

./src

put some library code ( js , css ) ex: normalize.css

./lib

puts minify's library code

./layout

puts hbs template ( include partial )

./bin

A build file to control hbs transforming.

./route.js

control the data to transform hbs's template

  • data : hbs's data
  • partials : partial.js
  • layout : input file
  • filename : output file
var route = [
{
  data: {
	path: './',
	title: 'Hello guys',
	first_word: 'It is a good template'
  },
  partials: './partial.js',
  layout:  "./layout/index.hbs", 
  filename: "./index.html" 
}
];
module.exports = route;

./partial.js

partial hbs     ex: {{> head}}

./gulpfile.js

control gulp

./config.rb

a config.rb for compass

frontend-template's People

Contributors

tsehang 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.