This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 333
/
Gruntfile.js
79 lines (75 loc) · 2.91 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
module.exports = function (grunt) {
var pom = grunt.file.read('pom.xml');
var version = pom.match(/\<version\>(\d+\.\d+).+\<\/version\>/)[1];
if (!version) {
throw new Error('Coudn\'t extract Aura version!');
}
grunt.initConfig({
version: version,
env : {
options : {
//Shared Options Hash
},
configCDN : {
AZURE_STORAGE_ACCOUNT : "account_here",
AZURE_STORAGE_ACCESS_KEY : "access_key_here"
}
},
eslint: {
framework: {
options: {
configFile: 'aura-impl/src/main/resources/aura/.eslintrc',
outputFile: 'aura-impl/target/eslint-output'
},
src: [
'aura-impl/src/main/resources/aura/**/*.js',
'!aura-impl/src/main/resources/aura/**/*_export.js'
]
},
components: {
options: {
configFile: 'aura-components/src/main/components/.eslintrc',
outputFile: 'aura-components/target/eslint-output',
rulePaths: ['aura-components/src/rules']
},
src: [
'aura-components/src/main/components/aura',
'aura-components/src/main/components/auraadmmin',
'aura-components/src/main/components/auradev',
'aura-components/src/main/components/aurajstest',
'aura-components/src/main/components/auraStorage',
'aura-components/src/main/components/ui'
]
}
},
'azure-blob': {
options: { // global options applied to each task
containerName: 'assetsblob',
containerDelete: false, //do not apply true here, container would be deleted at each task
metadata: {cacheControl: 'public, max-age=31556926'}, // max-age 1 year for all entries
gzip: true,
copySimulation: false // set true: only dry-run what copy would look like
},
auraFramework: {
files: [{
expand: true,
cwd: 'aura-resources/target/classes/aura/javascript/',
dest: '<%= version %>/js/aura/',
src: ['*.js']
}]
},
libs: {
files: [{
expand: true,
cwd: 'aura-resources/target/classes/aura/resources/',
dest: '<%= version %>/js/libs/',
src: ['libs_America-Los_Angeles*.js']
}]
}
}
});
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-env');
grunt.loadNpmTasks('grunt-azure-blob');
grunt.registerTask('azure-cdn', [/*'env:configCDN',*/ 'azure-blob']);
};