forked from filearts/plunker_www
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.coffee
37 lines (26 loc) · 829 Bytes
/
build.coffee
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
coffee = require("coffee-script")
less = require("less")
assets = require("connect-assets")
path = require("path")
fs = require("fs")
rimraf = require("rimraf")
pkginfo = require("./package.json")
assets
src: "#{__dirname}/assets"
build: true
minifyBuilds: true
buildDir: "build"
buildFilenamer: (filename) ->
dir = path.dirname(filename)
ext = path.extname(filename)
base = path.basename(filename, ext)
return path.join dir, "#{base}-#{pkginfo.version}#{ext}"
if fs.existsSync("#{__dirname}/build") then rimraf.sync("#{__dirname}/build")
console.log "Building landing.js"
js("apps/landing")
console.log "Building landing.css"
css("apps/landing")
console.log "Building editor.js"
js("apps/editor")
console.log "Building editor.css"
css("apps/editor")