forked from AzureAD/microsoft-authentication-library-for-js
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
62 lines (57 loc) · 1.96 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
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
file_append: {
default_options: {
files: [
{
prepend: "'use strict';\n",
input: 'dist/msal.js',
output: 'dist/msal.js'
},
{
prepend: "'use strict';\n",
input: 'dist/msal.min.js',
output: 'dist/msal.min.js'
}
]
}
},
usebanner: {
taskName: {
options: {
position: 'top',
banner: '/*! <%= pkg.name %> v<%= pkg.version %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
linebreak: true
},
files: {
src: ['dist/msal.js', 'dist/msal.min.js']
}
}
},
tslint: {
options: {
// can be a configuration object or a filepath to tslint.json
configuration: "tslint.json",
// If set to true, tslint errors will be reported, but not fail the task
// If set to false, tslint errors will be reported, and the task will fail
force: true,
fix: false
},
files: {
src: [
"src/*.ts",
]
}
}
});
grunt.loadNpmTasks('grunt-file-append');
grunt.loadNpmTasks('grunt-banner');
grunt.loadNpmTasks("grunt-tslint");
// uglify task is producing invalid js file
grunt.registerTask('doc', ['typedoc']);
grunt.registerTask('append', ['file_append']);
grunt.registerTask('ts-lint', ['tslint']);
grunt.registerTask('default', ['append', 'usebanner', 'ts-lint']);
};