This repository has been archived by the owner on Jun 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
123 lines (107 loc) · 2.55 KB
/
Gruntfile.js
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
'use strict';
module.exports = function(grunt) {
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
var devServer = "https://localhost:3994/api";
var prodServer = "https://memberhive.com:7007/api";
// Configurable paths for the application
var appConfig = {
app: 'client/app',
dist: 'dist',
api: {
development: devServer,
production: prodServer
}
};
// Define the configuration for all the tasks
grunt.initConfig({
// Project settings
yeoman: appConfig,
extractModelTranslations: {
all: {
files: {
'po/models.pot': ['common/models/*.json']
}
}
},
loopback_angular_addModelData: { // jshint ignore:line
services: {
options: {
modelConfig: 'server/model-config.json',
serviceFile: '<%= yeoman.app %>/modules/core/services/lb-services.js',
modelDir: 'common/models/'
}
}
},
docularserver: {
targetDir: 'docs',
livereload: true,
port: 8000
},
docular: {
docular_webapp_target: 'docs', // jshint ignore:line
groups: [
{
groupTitle: 'LoopBack',
groupId: 'loopback',
sections: [
{
id: 'lbServices',
title: 'LoopBack Services',
scripts: ['<%= yeoman.app %>/modules/core/services/lb-services.js']
}
]
}
]
},
uploadWords: {
all: {
src: 'po/*.pot'
}
},
uploadTemplateFile: {
options: {
platformId: '22316',
format: 'GNU_POT'
}
},
downloadTranslations: {
options: {
locales: ['de', 'en']
}
},
downloadSingleTranslation: {
options: {
poDir: 'po/',
platformId: '22316',
format: 'GNU_POT',
tag: 'template.pot'
}
},
ngconstant: {
// Options for all targets
options: {
name: 'gem.config',
dest: '<%= yeoman.app %>/scripts/config.js',
wrap: 'export var gemConfigModule = {%= __ngModule %}',
constants: {
productName: 'MemberHive'
}
},
server: {
constants: {
apiUrl: '<%= yeoman.api.development %>'
}
},
dist: {
constants: {
apiUrl: '<%= yeoman.api.production %>'
}
}
}
});
grunt.registerTask('restApiDocs', ['docular', 'docularserver']);
grunt.loadNpmTasks('grunt-docular');
// Load custom tasks from tasks/ directory
grunt.loadTasks('grunt');
};