giles
a next-gen language watcher/compiler for pre-processed languages
Last updated 7 years ago by mikkel .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install giles 
SYNC missed versions from official npm registry.

Into every generation a project is born. One project in all the world, a Chosen One. One born with the strength and skill to fight the vampires, to stop the spread of their evil and swell of their numbers.

Giles wants you to stop writing HTML, CSS, and JS. Whether you are working on a legacy app supporting ie6, a nodejs server, or you are writing the next hottest html5 app, giles can help.

Giles is a project watcher and builder for a variety of useful markup languages. Use Giles to develop with nextgen web tools and increase project momentum.

##Giles supports

  • CoffeeScript - Incredible javascript compiler. Everything just seems to work better with coffeescript.
  • Stylus - Fantastic css compiler. The variable/mixin support is extremely powerful.
  • Jade - Cool HAML-like alternative to writing html.
  • Your favorite language. Add it and issue a pull request.

###Giles is a command line tool and API for:

  • Developing. Watch a directory and build output files when source files change.
  • Releasing. Building static assets for deployment

The goal of Giles is not to advocate a specific framework, rather to provide developers and designers functionality in the languages of their choice.

###To install run sudo npm install -g giles npm is available by installing nodejs

###To get help giles -h If you ever need to run this, file a bug with me.

###To watch the current directory, recursively giles -w Handles new files too. It will work even if you re-arrange your whole project.

###To watch a specific directory, recursively giles directory -w This compiles to the same directory as the asset.

###To ignore a directory, or multiple(will match recursively) giles . --ignore vendor,bin ignore defaults to node_modules,.git

#API These examples are in coffeescript.

Building with .js and giles (works with Jake)

srcDir = PATH_TO_SOURCE
options = 
  #output : __dirname+"/build",#The directory to output to,
  #locals : {} #variables exposed to all compilers which support variables

giles = require('giles')
giles.build(srcDir, options)

To watch with giles using local variables

giles = require('giles')
giles.watch(srcDir, options)

To add a compiler to giles

coffee = false
giles.addCompiler ['.coffee', '.cs'], '.js', (contents, filename, output) ->
  coffee = require 'coffee-script' unless coffee
  output(coffee.compile(contents, {}))

Or for stylus

giles.addCompiler [".styl", ".stylus"], '.css', (contents, filename, output) ->
stylus = require 'stylus' unless stylus
stylus.render contents, {filename: filename}, (err, css) ->
  if err
    console.error "Could not render stylus file: "+filename
    console.error err
  else
    output(css)

Both of these compilers are already in giles and listed here for illustration purposes.

###License Giles is available under the MIT license. We hope you find it useful. Please let us at 255 BITS know if you use it for something cool.

Current Tags

  • 0.5.9                                ...           latest (7 years ago)

24 Versions

  • 0.5.9                                ...           7 years ago
  • 0.5.8                                ...           7 years ago
  • 0.5.7                                ...           7 years ago
  • 0.5.6                                ...           8 years ago
  • 0.5.5                                ...           8 years ago
  • 0.5.4                                ...           8 years ago
  • 0.5.3                                ...           8 years ago
  • 0.5.2                                ...           8 years ago
  • 0.5.1                                ...           8 years ago
  • 0.5.0                                ...           8 years ago
  • 0.4.3                                ...           8 years ago
  • 0.4.2                                ...           8 years ago
  • 0.4.1                                ...           8 years ago
  • 0.3.0                                ...           8 years ago
  • 0.2.1                                ...           8 years ago
  • 0.2.0                                ...           8 years ago
  • 0.1.7                                ...           8 years ago
  • 0.1.6                                ...           8 years ago
  • 0.1.5                                ...           8 years ago
  • 0.1.4                                ...           8 years ago
  • 0.1.3                                ...           8 years ago
  • 0.1.2                                ...           8 years ago
  • 0.1.1                                ...           8 years ago
  • 0.1.0                                ...           8 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dev Dependencies (2)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |