This repository has been archived by the owner on Oct 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
71 lines (59 loc) · 1.64 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
module.exports = ->
pkg = @file.readJSON 'package.json'
repo = pkg.repository.url.replace 'git://', 'https://'+process.env.GH_TOKEN+'@'
# Project configuration
@initConfig
pkg: @file.readJSON 'package.json'
# BDD tests on Node.js
mochaTest:
nodejs:
src: ['spec/*.coffee']
options:
reporter: 'spec'
grep: process.env.TESTS
# Coding standards
coffeelint:
components:
files:
src: [
'components/*.coffee'
'lib/*.coffee'
]
options:
max_line_length:
value: 120
level: 'warn'
# Web server serving design systems used by ExternalSolver
connect:
server:
options:
port: 8001
exec:
sudoku: './node_modules/.bin/webpack examples/sudoku.js dist/examples/sudoku.js'
'gh-pages':
options:
base: 'dist'
clone: 'gh-pages'
message: 'Deploying dist/ to gh-pages'
repo: repo
user:
name: 'JsJob bot'
email: '[email protected]'
silent: true
src: '**/*'
# Grunt plugins used for building
@loadNpmTasks 'grunt-exec'
# Grunt plugins used for testing
@loadNpmTasks 'grunt-mocha-test'
@loadNpmTasks 'grunt-coffeelint'
@loadNpmTasks 'grunt-contrib-connect'
# Grunt plugins used for deploying
@loadNpmTasks 'grunt-gh-pages'
# Our local tasks
@registerTask 'build', ['exec']
@registerTask 'test', 'Build and run automated tests', (target = 'all') =>
@task.run 'build'
@task.run 'coffeelint'
@task.run 'connect'
@task.run 'mochaTest'
@registerTask 'default', ['test']