Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v0.0.8
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 59 lines (47 sloc) 1.424 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
async = require "async"

cakepop = require "./cakepop.js"
pkg = require "./package.json"
utils = cakepop.utils
builder = new cakepop.CoffeeBuild()
style = new cakepop.Style
  coffee:
    config: "/Users/rye/scm/sd/atalanta/dev/coffeelint.json"
  js:
    config: "dev/jshint.json"

CS_SOURCE = [
  "Cakefile"
  "cakepop.coffee"
]

JS_SOURCE = [
  "cakepop.js"
]

BUILD = [
  "cakepop.coffee"
]

codo = (cb) ->
  title = "CakePop v#{pkg.version}"
  utils.exec "codo -r README.md
-o doc
--title '#{title}'
cakepop.coffee -
HISTORY.md", cb

task "prepublish", "Run everything to get ready for publish.", ->
  async.series [
    (cb) -> style.coffeelint CS_SOURCE, cb
    (cb) -> builder.build BUILD, cb
    (cb) -> style.jshint JS_SOURCE, cb
    (cb) -> codo cb
  ], (err) ->
    utils.fail err if err
    utils.print "\nPrepublish finished successfully".info

task "dev:coffeelint", "Run CoffeeScript style checks.", ->
  style.coffeelint CS_SOURCE

task "dev:jshint", "Run JavaScript style checks.", ->
  style.jshint JS_SOURCE

task "source:build", "Build CoffeeScript to JavaScript.", ->
  builder.build BUILD

task "source:watch", "Watch (build) CoffeeScript to JavaScript.", ->
  builder.watch BUILD

task "docs:build", "Build CoffeeScript to JavaScript.", ->
  codo (err) ->
    utils.print err ? "\nDocuments finished building.".info
Something went wrong with that request. Please try again.