Last active
August 29, 2015 13:58
-
-
Save tiye/10336012 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env coffee | |
project = 'repo/todolist' | |
require 'shelljs/make' | |
path = require 'path' | |
mission = require 'mission' | |
mission.time() | |
target.folder = -> | |
mission.tree | |
'.gitignore': '' | |
'README.md': '' | |
js: {} | |
build: {} | |
cirru: {'index.cirru': ''} | |
coffee: {'main.coffee': ''} | |
css: {'style.css': ''} | |
target.coffee = -> | |
mission.coffee | |
find: /\.coffee$/, from: 'coffee/', to: 'js/', extname: '.js' | |
options: | |
bare: yes | |
cirru = -> | |
mission.cirru | |
file: 'index.cirru', from: 'cirru/', to: './', extname: '.html' | |
browserify = (callback) -> | |
mission.browserify | |
file: 'main.js', from: 'js/', to: 'build/', done: callback | |
target.cirru = -> cirru() | |
target.browserify = -> browserify() | |
target.compile = -> | |
cirru() | |
target.coffee yes | |
browserify() | |
target.watch = -> | |
station = mission.reload() | |
mission.watch | |
files: ['cirru/', 'coffee/'] | |
trigger: (filepath, extname) -> | |
switch extname | |
when '.cirru' | |
cirru() | |
station.reload project | |
when '.coffee' | |
filepath = path.relative 'coffee/', filepath | |
mission.coffee | |
file: filepath, from: 'coffee/', to: 'js/', extname: '.js' | |
options: | |
bare: yes | |
browserify -> | |
station.reload project | |
target.pre = -> | |
target.compile() | |
mission.bump | |
file: 'package.json' | |
options: | |
at: 'prerelease' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment