-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
46 lines (38 loc) · 1.13 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
44
45
46
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
name: "simditor-i18n"
coffee:
src:
options:
bare: true
files:
'lib/<%= name %>.js': 'src/<%= name %>.coffee'
spec:
files:
'spec/<%= name %>-spec.js': 'spec/<%= name %>-spec.coffee'
umd:
all:
src: 'lib/<%= name %>.js'
template: 'umd.hbs'
amdModuleId: '<%= pkg.name %>'
objectToExport: 'Simditor.i18n'
globalAlias: 'Simditor.i18n'
deps:
'default': ['$', 'Simditor']
amd: ['jquery', 'simditor']
cjs: ['jquery', 'simditor']
global:
items: ['jQuery', 'Simditor']
prefix: ''
watch:
spec:
files: ['spec/**/*.coffee']
tasks: ['coffee:spec']
src:
files: ['src/**/*.coffee']
tasks: ['coffee:src', 'umd']
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-umd'
grunt.registerTask 'default', ['coffee', 'umd', 'watch']