Skip to content

Commit 934a9ac

Browse files
committed
Remove the exports.settings dict.
The previous commits have made it completely useless.
1 parent cff2e61 commit 934a9ac

File tree

9 files changed

+5
-76
lines changed

9 files changed

+5
-76
lines changed

coder-apps/common/auth/app/app.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ var util = require('util');
2323
var fs = require('fs');
2424
var bcrypt = require('bcrypt');
2525

26-
exports.settings={};
27-
//These are dynamically updated by the runtime
28-
//settings.appname - the app id (folder) where your app is installed
29-
//settings.viewpath - prefix to where your view html files are located
30-
//settings.staticurl - base url path to static assets /static/apps/appname
31-
//settings.appurl - base url path to this app /app/appname
32-
33-
3426
exports.get_routes = [
3527
{ path:'/', handler:'index_handler'},
3628
{ path:'/login', handler:'login_handler'},

coder-apps/common/boilerplate/app/app.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
exports.settings={};
2-
//These are dynamically updated by the runtime
3-
//settings.appname - the app id (folder) where your app is installed
4-
//settings.viewpath - prefix to where your view html files are located
5-
//settings.staticurl - base url path to static assets /static/apps/appname
6-
//settings.appurl - base url path to this app /app/appname
71

82
exports.get_routes = [
93
{ path:'/', handler:'index_handler' },
@@ -19,3 +13,4 @@ exports.index_handler = function( app, req, res ) {
1913

2014
exports.on_destroy = function() {
2115
};
16+

coder-apps/common/coder/app/app.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ if ( !fs.existsSync ) {
2929
fs.existsSync = path.existsSync;
3030
}
3131

32-
exports.settings={};
33-
//These are dynamically updated by the runtime
34-
//settings.appname - the app id (folder) where your app is installed
35-
//settings.viewpath - prefix to where your view html files are located
36-
//settings.staticurl - base url path to static assets /static/apps/appname
37-
//settings.appurl - base url path to this app /app/appname
38-
3932
exports.get_routes = [
4033
{ path:'/', handler:'index_handler' },
4134
{ path: /^\/export\/download\/(\w+\.zip)$/, handler:'export_download_handler' }

coder-apps/common/coderlib/app/app.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ var util = require('util');
2323
var fs = require('fs');
2424
var async = require('async');
2525

26-
exports.settings={};
27-
//These are dynamically updated by the runtime
28-
//settings.appname - the app id (folder) where your app is installed
29-
//settings.viewpath - prefix to where your view html files are located
30-
//settings.staticurl - base url path to static assets /static/apps/appname
31-
//settings.appurl - base url path to this app /app/appname
32-
3326
exports.get_routes = [
3427
{ path: '/api/app/list', handler: 'api_app_list_handler' },
3528

@@ -117,16 +110,7 @@ exports.app = function(name, callback) {
117110

118111

119112
require: function() {
120-
app = require(loadpath);
121-
app.settings = {}
122-
123-
app.settings.appname = name;
124-
app.settings.path = appdir + name;
125-
app.settings.viewpath = "apps/" + name;
126-
app.settings.appurl = "/app/" + name;
127-
app.settings.staticurl = "/static/apps/" + name;
128-
129-
return app;
113+
return require(loadpath);
130114
},
131115

132116
invalidate: function() {

coder-apps/common/editor/app/app.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ var mustache = require('mustache');
2222
var util = require('util');
2323
var fs = require('fs');
2424

25-
exports.settings={};
26-
//These are dynamically updated by the runtime
27-
//settings.appname - the app id (folder) where your app is installed
28-
//settings.viewpath - prefix to where your view html files are located
29-
//settings.staticurl - base url path to static assets /static/apps/appname
30-
//settings.appurl - base url path to this app /app/appname
31-
3225
exports.get_routes = [
3326
{ path:'/', handler:'index_handler'},
3427
{ path: /^\/edit\/(\w+)$/, handler:'index_handler'},
@@ -45,9 +38,6 @@ exports.post_routes = [
4538
];
4639

4740

48-
49-
50-
5141
exports.index_handler = function( app, req, res, pathmatches ) {
5242
var tmplvars = {};
5343

coder-apps/common/eyeball/app/app.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
1-
exports.settings={};
2-
//These are dynamically updated by the runtime
3-
//settings.appname - the app id (folder) where your app is installed
4-
//settings.viewpath - prefix to where your view html files are located
5-
//settings.staticurl - base url path to static assets /static/apps/appname
6-
//settings.appurl - base url path to this app /app/appname
7-
81
exports.get_routes = [
92
{ path:'/', handler:'index_handler' },
103
];
114

125
exports.post_routes = [
136
];
147

15-
168
exports.index_handler = function( app, req, res ) {
179
res.render( app.view() );
1810
};
1911

2012
exports.on_destroy = function() {
2113
};
14+

coder-apps/common/game2d/app/app.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@
1818
* limitations under the License.
1919
*/
2020

21-
exports.settings={};
22-
//These are dynamically updated by the runtime
23-
//settings.appname - the app id (folder) where your app is installed
24-
//settings.viewpath - prefix to where your view html files are located
25-
//settings.staticurl - base url path to static assets /static/apps/appname
26-
//settings.appurl - base url path to this app /app/appname
27-
2821
exports.get_routes = [
2922
{ path:'/', handler:'index_handler' },
3023
];
@@ -39,3 +32,4 @@ exports.index_handler = function( app, req, res ) {
3932

4033
exports.on_destroy = function() {
4134
};
35+

coder-apps/common/hello_coder/app/app.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ If you're new to Coder, don't bother changing anything in here. Yet...
3030
*/
3131

3232

33-
exports.settings={};
34-
//These are dynamically updated by the runtime
35-
//settings.appname - the app id (folder) where your app is installed
36-
//settings.viewpath - prefix to where your view html files are located
37-
//settings.staticurl - base url path to static assets /static/apps/appname
38-
//settings.appurl - base url path to this app /app/appname
39-
4033
exports.get_routes = [
4134
{ path:'/', handler:'index_handler' },
4235
];

coder-apps/common/space_rocks_/app/app.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
exports.settings={};
2-
//These are dynamically updated by the runtime
3-
//settings.appname - the app id (folder) where your app is installed
4-
//settings.viewpath - prefix to where your view html files are located
5-
//settings.staticurl - base url path to static assets /static/apps/appname
6-
//settings.appurl - base url path to this app /app/appname
71

82
exports.get_routes = [
93
{ path:'/', handler:'index_handler' },
@@ -19,3 +13,4 @@ exports.index_handler = function( req, res ) {
1913

2014
exports.on_destroy = function() {
2115
};
16+

0 commit comments

Comments
 (0)