forked from jupiterjs/jquerymx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage
More file actions
21 lines (18 loc) · 643 Bytes
/
page
File metadata and controls
21 lines (18 loc) · 643 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
if (_args.length < 2) {
print("Creates an html page that loads one of your applications.\n")
print("USAGE: js steal/generate/test app_name page_location\n")
print();
quit();
}
load('steal/rhino/steal.js');
steal('//steal/generate/generate','//steal/generate/system',function(steal){
var path = _args[0].toLowerCase().replace('.',"/")
var data = steal.extend({
path: path,
application_name: path.match(/[^\/]*$/)[0],
current_path: steal.File.cwdURL(),
path_to_steal : new steal.File(path).pathToRoot()
}, steal.system)
var to = path+"/"+_args[1];
steal.generate.render("jquery/generate/templates/page.ejs", to, data)
});