Skip to content

Commit 574ed06

Browse files
committed
debug development environment
1 parent 5a70155 commit 574ed06

File tree

7 files changed

+3343
-38
lines changed

7 files changed

+3343
-38
lines changed

Gruntfile.js

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@ module.exports = function(grunt) {
5151
grunt.log.writeln("");
5252
grunt.log.writeln("WARNING: Slow tests won't run without an auth.json file");
5353
}
54+
55+
pkg = grunt.file.readJSON('package.json')
56+
config.pkg = pkg
5457

5558
grunt.initConfig({
56-
pkg: grunt.file.readJSON('package.json'),
59+
pkg: pkg,
5760
uglify: {
5861
options: {
5962
mangle: true
@@ -70,6 +73,13 @@ module.exports = function(grunt) {
7073
variables: config
7174
},
7275

76+
debugsdk: {
77+
src: 'templates/App-debugsdk-tpl.html',
78+
dest: 'deploy/App.txt',
79+
engine: 'underscore',
80+
variables: config
81+
},
82+
7383
prod: {
7484
src: 'templates/App-tpl.html',
7585
dest: 'deploy/App.txt',
@@ -221,8 +231,7 @@ module.exports = function(grunt) {
221231
request.defaults({jar: j});
222232

223233
var installApp = function(page_oid,panel_oid) {
224-
// DEFAULT TO ugly for deploying
225-
var html = grunt.file.read('deploy/Ugly.txt');
234+
var html = grunt.file.read(deploy_file_name);
226235

227236
var uri = config.auth.server + "/slm/dashboard/changepanelsettings.sp";
228237
grunt.log.writeln('URI:', uri);
@@ -403,9 +412,11 @@ module.exports = function(grunt) {
403412
grunt.registerTask('test-fast', "Run tests that don't need to connect to Rally", ['jasmine:fast']);
404413
grunt.registerTask('test-slow', "Run tests that need to connect to Rally", ['jasmine:slow']);
405414

406-
grunt.registerTask('test-and-deploy', 'Build and deploy app to the location in auth.json',['test-fast','ugly','install']);
415+
grunt.registerTask('test-and-deploy', 'Build and deploy app to the location in auth.json',['test-fast','ugly','install:deploy/Ugly.txt']);
416+
417+
grunt.registerTask('deploy', 'Build and deploy app to the location in auth.json',['ugly','install:deploy/Ugly.txt']);
407418

408-
grunt.registerTask('deploy', 'Build and deploy app to the location in auth.json',['ugly','install']);
419+
grunt.registerTask('deploy-pretty', 'Build and deploy app to the location in auth.json',['pretty','install:deploy/App.txt']);
409420

410-
grunt.registerTask('deploy-pretty', 'Build and deploy app to the location in auth.json',['pretty','install']);
411-
};
421+
grunt.registerTask('deploy-debugsdk', 'Build and deploy app to the location in auth.json',['template:debugsdk', 'setPostBuildInfo:deploy/App.txt', 'install:deploy/App.txt']);
422+
};

package.json

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
11
{
22
"name": "custom-grid-with-deep-export",
33
"version": "1.2.0",
4+
"scripts": {
5+
"debug": "grunt debug",
6+
"debug:watch": "nodemon --exec grunt debug",
7+
"deploy:watch": "nodemon --exec grunt deploy",
8+
"deploy-pretty:watch": "nodemon --exec grunt deploy-pretty",
9+
"deploy-debugsdk:watch": "nodemon --exec grunt deploy-debugsdk"
10+
},
411
"dependencies": {},
512
"devDependencies": {
6-
"grunt": "~0.4.5",
7-
"grunt-cli": "0.1.6",
8-
"grunt-contrib-jasmine": "1.1.0",
9-
"grunt-templater": "git://github.com/rockwood/grunt-templater.git",
10-
"underscore": "1.8.3",
11-
"grunt-prompt": "^1.3.3",
12-
"grunt-contrib-uglify":"0.3.2",
13-
"request":"2.67",
14-
"grunt-contrib-watch":"1.0.0",
15-
"username":"2.1.0",
16-
"rally-sdk2-test-utils": "0.1.2"
13+
"grunt": "~0.4.5",
14+
"grunt-cli": "0.1.6",
15+
"grunt-contrib-jasmine": "1.1.0",
16+
"grunt-templater": "git://github.com/rockwood/grunt-templater.git",
17+
"underscore": "1.8.3",
18+
"grunt-prompt": "^1.3.3",
19+
"grunt-contrib-uglify": "0.3.2",
20+
"request": "2.67",
21+
"grunt-contrib-watch": "1.0.0",
22+
"username": "2.1.0",
23+
"rally-sdk2-test-utils": "0.1.2",
24+
"nodemon": "^1.14.11"
25+
},
26+
"nodemonConfig": {
27+
"watch": [
28+
"src/*", "templates/*"
29+
],
30+
"verbose": true
1731
}
1832
}

templates/App-debug-tpl.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title><%= name %></title>
4+
<title><%= pkg.name %>-<%= pkg.version %></title>
5+
<!-- (c) 2017 CA Technologies. All Rights Reserved. -->
6+
<!-- Build Date: <%= new Date() %> -->
7+
58
<script type="text/javascript">
69
var APP_BUILD_DATE = "<%= new Date() %>";
710
</script>
811

9-
<script type="text/javascript" src="<%= server %>/apps/<%= sdk %>/sdk-debug.js"></script>
12+
<script type="text/javascript" src="<%= auth.server %>/apps/<%= sdk %>/sdk-debug.js"></script>
13+
<!-- our highcharts (needed so that we can add patterns)
14+
<script type="text/javascript" src="/apps/<%= sdk %>/lib/analytics/analytics-all.js"></script>
15+
-->
1016

1117
<script type="text/javascript">
1218
Rally.onReady(function() {
1319
Rally.loadScripts(<%= JSON.stringify(js_files) %>,
1420
function() {
1521
Rally.launchApp('<%= className %>', {
16-
name: '<%= name %>'
22+
name: '<%= pkg.name %>'
1723
})
1824
}, true);
1925
});
@@ -27,4 +33,4 @@
2733

2834
</head>
2935
<body></body>
30-
</html>
36+
</html>

templates/App-debugsdk-tpl.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title><%= pkg.name %>-<%= pkg.version %></title>
5+
<!-- (c) 2017 CA Technologies. All Rights Reserved. -->
6+
<!-- Build Date: <%= new Date() %> -->
7+
8+
<script type="text/javascript">
9+
var APP_BUILD_DATE = "<%= new Date() %>";
10+
var CHECKSUM = [%= checksum %];
11+
</script>
12+
13+
<script type="text/javascript" src="<%= auth.server %>/apps/<%= sdk %>/sdk-debug.js"></script>
14+
<!-- our highcharts (needed so that we can add patterns)
15+
<script type="text/javascript" src="/apps/<%= sdk %>/lib/analytics/analytics-all.js"></script>
16+
-->
17+
18+
19+
<script type="text/javascript">
20+
Rally.onReady(function() {
21+
<%= js_contents %>
22+
23+
Rally.launchApp('<%= className %>', {
24+
name: '<%= pkg.name %>'
25+
});
26+
});
27+
</script>
28+
29+
<style type="text/css">
30+
<%=style_contents %>
31+
</style>
32+
33+
</head>
34+
35+
<body></body>
36+
37+
</html>

templates/App-tpl.html

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,35 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title><%= name %></title>
5-
<!-- (c) 2015 Rally Software Development Corp. All Rights Reserved. -->
4+
<title><%= pkg.name %>-<%= pkg.version %></title>
5+
<!-- (c) 2017 CA Technologies. All Rights Reserved. -->
66
<!-- Build Date: <%= new Date() %> -->
7-
7+
88
<script type="text/javascript">
99
var APP_BUILD_DATE = "<%= new Date() %>";
1010
var CHECKSUM = [%= checksum %];
1111
</script>
12-
12+
1313
<script type="text/javascript" src="/apps/<%= sdk %>/sdk.js"></script>
14+
<!-- our highcharts (needed so that we can add patterns)
15+
<script type="text/javascript" src="/apps/<%= sdk %>/lib/analytics/analytics-all.js"></script>
16+
-->
17+
1418

1519
<script type="text/javascript">
1620
Rally.onReady(function() {
1721
<%= js_contents %>
18-
22+
1923
Rally.launchApp('<%= className %>', {
20-
name: '<%= name %>'
24+
name: '<%= pkg.name %>'
2125
});
2226
});
2327
</script>
24-
28+
2529
<style type="text/css">
2630
<%= style_contents %>
2731
</style>
2832

2933
</head>
3034
<body></body>
31-
</html>
35+
</html>

templates/App-ugly-tpl.html

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,35 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title><%= name %></title>
5-
<!-- (c) 2015 Rally Software Development Corp. All Rights Reserved. -->
4+
<title><%= pkg.name %>-<%= pkg.version %></title>
5+
<!-- (c) 2017 CA Technologies. All Rights Reserved. -->
66
<!-- Build Date: <%= new Date() %> -->
7-
7+
88
<script type="text/javascript">
99
var APP_BUILD_DATE = "<%= new Date() %>";
1010
var CHECKSUM = [%= checksum %];
1111
</script>
12-
12+
1313
<script type="text/javascript" src="/apps/<%= sdk %>/sdk.js"></script>
14+
<!-- our highcharts (needed so that we can add patterns)
15+
<script type="text/javascript" src="/apps/<%= sdk %>/lib/analytics/analytics-all.js"></script>
16+
-->
17+
1418

1519
<script type="text/javascript">
1620
Rally.onReady(function() {
1721
<%= ugly_contents %>
18-
22+
1923
Rally.launchApp('<%= className %>', {
20-
name: '<%= name %>'
24+
name: '<%= pkg.name %>'
2125
});
2226
});
2327
</script>
24-
28+
2529
<style type="text/css">
2630
<%= style_contents %>
2731
</style>
2832

2933
</head>
3034
<body></body>
31-
</html>
35+
</html>

0 commit comments

Comments
 (0)