-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.coffee
43 lines (34 loc) · 1.08 KB
/
Gruntfile.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
38
39
40
41
42
43
module.exports = (grunt) ->
"use strict"
require('time-grunt')(grunt) # Time our grunt tasks
# Project configuration
grunt.initConfig
# Metadata
pkg: grunt.file.readJSON("package.json")
banner: "/*! <%= pkg.name %> - v<%= pkg.version %> - " + "<%= grunt.template.today(\"yyyy-mm-dd\") %>\n" + "<%= pkg.homepage ? \"* \" + pkg.homepage + \"\\n\" : \"\" %>" + "* Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %>;" + " Licensed MIT */\n"
# Task configuration
uglify:
options:
banner: "<%= banner %>"
dist:
src: 'dist/hexo-soundcloud.js'
dest: 'dist/hexo-soundcloud.min.js'
watch:
coffee:
files: 'src/hexo-soundcloud.coffee'
tasks: ["coffee:compile"]
coffee:
compile:
files:
'dist/hexo-soundcloud.js': 'src/hexo-soundcloud.coffee'
require('load-grunt-tasks')(grunt)
# Default task
grunt.registerTask "default", [
"coffee:compile"
"watch:coffee"
]
grunt.registerTask "build", [
"coffee:compile"
"uglify"
]
return