Skip to content

Commit 07c07fc

Browse files
author
James Kolce
committed
Add Jakefile
1 parent 174ca9f commit 07c07fc

File tree

4 files changed

+71
-4
lines changed

4 files changed

+71
-4
lines changed

Jakefile

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
desc('Compile the files of Concise Framework.')
2+
task('concise', () => {
3+
jake.exec('concisecss compile concise.scss dist/concise.css', {
4+
printStdout: true,
5+
printStderr: true
6+
}, () => {
7+
complete()
8+
})
9+
})
10+
11+
desc('Minify CSS.')
12+
task('minify', () => {
13+
jake.exec('cssnano dist/concise.css dist/concise.min.css', {
14+
printStdout: true,
15+
printStderr: true
16+
}, () => {
17+
complete()
18+
})
19+
})
20+
21+
desc('Compile styles on file changes')
22+
task('concise:watch', () => {
23+
jake.exec('chokidar "**/*.scss" -c "jake build"', {
24+
printStdout: true,
25+
printStderr: true
26+
}, () => {
27+
complete()
28+
})
29+
})
30+
31+
desc('Start livereload server.')
32+
task('livereload', () => {
33+
jake.exec('livereload . -e "html, css"', {
34+
printStdout: true,
35+
printStderr: true
36+
}, () => {
37+
complete()
38+
})
39+
})
40+
41+
desc('Start HTTP server.')
42+
task('http', () => {
43+
jake.exec('http-server .', {
44+
printStdout: true,
45+
printStderr: true
46+
}, () => {
47+
complete()
48+
})
49+
})
50+
51+
desc('Start the development services.')
52+
task('build', () => {
53+
jake.Task['concise'].invoke()
54+
jake.Task['minify'].invoke()
55+
})
56+
57+
desc('Start the development services.')
58+
task('default', () => {
59+
jake.Task['build'].invoke()
60+
jake.Task['concise:watch'].invoke()
61+
jake.Task['http'].invoke()
62+
jake.Task['livereload'].invoke()
63+
})

0 commit comments

Comments
 (0)