Giter Site home page Giter Site logo

html5-template-engine's Introduction

Html5 Template Engine Build Status

Features

Install develop tool

$ ./build/build.sh

or

$ curl https://raw.github.com/appleboy/html5-template-engine/master/build/build.sh | bash

Setup Environment

Download source code.

$ git clone https://github.com/appleboy/html5-template-engine.git

Install vendor library and npm library.

$ npm install
$ bower install

Develop a project manually

Use Compass CSS Framework

Compass is an open-source CSS Authoring Framework. http://compass-style.org/

$ compass watch .

Use CoffeeScript

CoffeeScript is a little language that compiles into JavaScript. http://coffeescript.org/

$ coffee -b -w -c -o assets/js assets/coffeescript

Minify Javascript using RequireJS

Using Makefile.

$ make

or command line.

$ r.js -o build/self.build.js

Testing minified javascript file. Please modify index.html and find the following text.

<script data-main="assets/js/main" src="assets/js/vendor/requirejs/require.js"></script>

Replace with:

<script data-main="assets/js/main-built" src="assets/js/vendor/requirejs/require.js"></script>

Run local server (use root permission)

$ node build/server.js

Using Makefile.

$ make server

open the following URL on browser.

http://your_host_name:4000/

Develop a project automatically

Before using GruntJS tool, please make sure excute the following command.

$ npm install

Using GruntJS tool to setup develop environment.

$ ./node_modules/.bin/grunt

You will get the following messages.

Running "init" task
Initial project

Running "livereload-start" task
... Starting Livereload server on 35729 ...

Running "connect:livereload" (connect) task
Starting connect web server on localhost:3000.

Running "regarde" task
Watching */*.html,**/.htm
Watching **/*.scss
Watching **/*.css
Watching **/*.js
Watching **/*.coffee

Please install livereload plugin depend on your browser. ex: Safari extension, Firefox addon, or Chrome extension

Deploy Web App

Using Makefile

$ make release

or defined your build output path. (default: output)

$ make -m output_path=output2 release

Using GruntJS

$ ./node_modules/.bin/grunt release

Copy output folder to your root document path.

$ cp -r output /var/www/html5

open the following URL on browser.

http://your_host_name/html5/

Clean Your Project

Using Makefile

$ make clean

Using GruntJS

$ ./node_modules/.bin/grunt clean

Test Your Project

Using Makefile

$ make test

Using GruntJS and Mocha test command

$ ./node_modules/.bin/grunt release && mocha --reporter spec

Author

Bo-Yi Wu, Twitter: @appleboy, Blog: http://blog.wu-boy.com

html5-template-engine's People

Contributors

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