CodeCommitsIssuesPull requestsActionsInsightsSecurity
v5.3.6

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS
SSH

Download ZIP

Gruntfile.js

39lines · modecode

1module.exports = function( grunt ) {
2 // Project configuration.
3 grunt.initConfig({
4 pkg: grunt.file.readJSON('package.json'),
5 uglify: {
6 core: {
7 src: 'cloudflare/base/frontend/cf_base/cloudflare/js/cloudflare.core.js',
8 dest: 'cloudflare/base/frontend/cf_base/cloudflare/js/cloudflare.core.min.js'
9 },
10 alt: {
11 src: 'cloudflare/base/frontend/cf_base/cloudflare/js/cloudflare.js',
12 dest: 'cloudflare/base/frontend/cf_base/cloudflare/js/cloudflare-min.js'
13 }
14 },
15 jst: {
16 compile: {
17 files: {
18 "cloudflare/base/frontend/cf_base/cloudflare/js/templates.js": ["cloudflare/base/frontend/cf_base/cloudflare/js/templates/*.html"]
19 }
20 },
21 options: {
22 namespace: 'CFT',
23 processName: function(filepath) {
24 var base = new String(filepath).substring(filepath.lastIndexOf('/') + 1);
25 if(base.lastIndexOf(".") != -1)
26 base = base.substring(0, base.lastIndexOf("."));
27 return base;
28 }
29 }
30 }
31 });
32
33 // Load the plugin that provides the "uglify" task.
34 grunt.loadNpmTasks('grunt-contrib-uglify');
35 grunt.loadNpmTasks('grunt-contrib-jst');
36
37 // Default task(s).
38 grunt.registerTask('default', ['uglify', 'jst']);
39};