gokart 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. data/LICENSE +0 -0
  2. data/README.md +0 -0
  3. data/assets/Gemfile +24 -0
  4. data/assets/Guardfile +37 -0
  5. data/assets/Rakefile +5 -0
  6. data/assets/config.rb +24 -0
  7. data/assets/spec/javascripts/support/jasmine.yml +76 -0
  8. data/assets/spec/javascripts/support/jasmine_config.rb +23 -0
  9. data/assets/spec/javascripts/support/jasmine_runner.rb +32 -0
  10. data/assets/src/server/http_handler.go +139 -0
  11. data/assets/src/server/main.go +31 -0
  12. data/assets/src/server/my_test.go +13 -0
  13. data/assets/src/server/templates.go +42 -0
  14. data/assets/src/www/app/coffee/application.js.coffee +6 -0
  15. data/assets/src/www/app/coffee/helpers/properties.js.coffee +19 -0
  16. data/assets/src/www/app/coffee/libs/deferred.js.coffee +92 -0
  17. data/assets/src/www/app/coffee/libs/logger.js.coffee +40 -0
  18. data/assets/src/www/app/coffee/libs/mod_loader.js.coffee +44 -0
  19. data/assets/src/www/app/coffee/main.js.coffee +10 -0
  20. data/assets/src/www/app/partials/index.html +92 -0
  21. data/assets/src/www/app/sass/application.css.scss +136 -0
  22. data/assets/src/www/app/templates/application.gotmpl +2 -0
  23. data/assets/src/www/app/templates/base.gotmpl.erb +31 -0
  24. data/assets/src/www/app/templates/home.gotmpl +30 -0
  25. data/assets/src/www/spec/coffee/deferred-spec.coffee +202 -0
  26. data/assets/src/www/spec/coffee/mocks.coffee +137 -0
  27. data/assets/src/www/spec/coffee/mod_loader-spec.coffee +45 -0
  28. data/assets/src/www/spec/coffee/properties-spec.coffee +21 -0
  29. data/assets/tasks/app.rake +34 -0
  30. data/assets/tasks/jasmine.rake +8 -0
  31. data/assets/tasks/server.rake +58 -0
  32. data/assets/tasks/www.rake +162 -0
  33. data/bin/gokart +28 -0
  34. data/lib/gokart/base.rb +59 -0
  35. data/lib/gokart/environment.rb +39 -0
  36. data/lib/gokart/version.rb +3 -0
  37. data/lib/gokart.rb +8 -0
  38. metadata +253 -0
data/LICENSE ADDED
File without changes
data/README.md ADDED
File without changes
data/assets/Gemfile ADDED
@@ -0,0 +1,24 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'rack'
4
+
5
+ group :development do
6
+ gem 'sass'
7
+ gem 'coffee-script'
8
+ gem 'therubyracer'
9
+ gem 'sprockets'
10
+ gem 'guard'
11
+ gem 'guard-coffeescript'
12
+ gem 'guard-jasmine'
13
+ gem 'guard-sass'
14
+ gem 'guard-rake'
15
+ gem 'guard-livereload'
16
+ gem 'guard-shell'
17
+ gem 'jasmine'
18
+ gem 'yui-compressor'
19
+ gem 'uglifier'
20
+
21
+ gem 'rb-inotify', :require => false
22
+ gem 'rb-fsevent', :require => false
23
+ gem 'rb-fchange', :require => false
24
+ end
data/assets/Guardfile ADDED
@@ -0,0 +1,37 @@
1
+ # More info at https://github.com/guard/guard#readme
2
+
3
+ load File.dirname(__FILE__) + '/config.rb'
4
+
5
+ guard 'coffeescript', :input => 'src/www/spec/coffee', :output => 'spec/javascripts', :hide_success => true
6
+
7
+ guard 'shell' do
8
+ watch(%r{^src/server/.+\.go$}) do
9
+ `GOPATH="#{ROOT}" go install #{GO_APP_NAME} 1>&2`
10
+ end
11
+ end
12
+
13
+ guard 'rake', :task => 'app:www:compile' do
14
+ watch(%r{^src/www/app/coffee/.+$})
15
+ watch(%r{^src/www/app/sass/.+$})
16
+ end
17
+
18
+ guard 'rake', :task => 'app:www:compile_templates' do
19
+ watch(%r{^src/www/app/templates/.+$})
20
+ end
21
+
22
+ guard 'rake', :task => 'app:www:vendor' do
23
+ watch(%r{^src/www/vendor/.+$})
24
+ end
25
+
26
+ guard 'rake', :task => 'app:www:images' do
27
+ watch(%r{^src/www/app/images/.+$})
28
+ end
29
+
30
+ guard 'rake', :task => 'app:www:partials' do
31
+ watch(%r{^src/www/app/partials/.+$})
32
+ end
33
+
34
+ guard 'livereload', :apply_js_live => false do
35
+ watch(%r{bin/assets/www/javascripts/.+$})
36
+ watch(%r{spec/javascripts/.+$})
37
+ end
data/assets/Rakefile ADDED
@@ -0,0 +1,5 @@
1
+ require 'rake'
2
+
3
+ load File.dirname(__FILE__) + '/config.rb'
4
+
5
+ Dir["#{File.dirname(__FILE__)}/tasks/**/*.rake"].sort.each { |ext| load ext }
data/assets/config.rb ADDED
@@ -0,0 +1,24 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+
4
+ Bundler.require
5
+
6
+ if !defined? ROOT
7
+ ROOT = Pathname(File.dirname(__FILE__))
8
+
9
+ ASSET_BUNDLES = %w( application.css application.js )
10
+ GO_APP_NAME = 'server'
11
+ GO_BUILD_PATH = ROOT.join('bin')
12
+
13
+ ASSETS_PATH = ROOT.join('bin', 'assets')
14
+ TMPL_BUILD_PATH = ASSETS_PATH.join('templates')
15
+ MIN_WWW_PATH = ASSETS_PATH.join('www-min')
16
+ DEBUG_WWW_PATH = ASSETS_PATH.join('www-debug')
17
+
18
+ WWW_SPEC_PATH = ROOT.join('spec', 'javascripts')
19
+
20
+ WWW_SRC_ROOT_PATH = ROOT.join('src', 'www')
21
+ WWW_SRC_APP_PATH = WWW_SRC_ROOT_PATH.join('app')
22
+ WWW_SRC_VENDOR_PATH = WWW_SRC_ROOT_PATH.join('vendor')
23
+ WWW_SRC_SPEC_PATH = WWW_SRC_ROOT_PATH.join('spec')
24
+ end
@@ -0,0 +1,76 @@
1
+ # src_files
2
+ #
3
+ # Return an array of filepaths relative to src_dir to include before jasmine specs.
4
+ # Default: []
5
+ #
6
+ # EXAMPLE:
7
+ #
8
+ # src_files:
9
+ # - lib/source1.js
10
+ # - lib/source2.js
11
+ # - dist/**/*.js
12
+ #
13
+ src_files:
14
+ - js/libs/mod_loader.js
15
+ - js/libs/deferred.js
16
+ - js/helpers/**/*.js
17
+
18
+ # stylesheets
19
+ #
20
+ # Return an array of stylesheet filepaths relative to src_dir to include before jasmine specs.
21
+ # Default: []
22
+ #
23
+ # EXAMPLE:
24
+ #
25
+ # stylesheets:
26
+ # - css/style.css
27
+ # - stylesheets/*.css
28
+ #
29
+ stylesheets:
30
+
31
+ # helpers
32
+ #
33
+ # Return an array of filepaths relative to spec_dir to include before jasmine specs.
34
+ # Default: ["helpers/**/*.js"]
35
+ #
36
+ # EXAMPLE:
37
+ #
38
+ # helpers:
39
+ # - helpers/**/*.js
40
+ #
41
+ helpers:
42
+ - mocks.js
43
+
44
+ # spec_files
45
+ #
46
+ # Return an array of filepaths relative to spec_dir to include.
47
+ # Default: ["**/*[sS]pec.js"]
48
+ #
49
+ # EXAMPLE:
50
+ #
51
+ # spec_files:
52
+ # - **/*[sS]pec.js
53
+ #
54
+ spec_files:
55
+
56
+ # src_dir
57
+ #
58
+ # Source directory path. Your src_files must be returned relative to this path. Will use root if left blank.
59
+ # Default: project root
60
+ #
61
+ # EXAMPLE:
62
+ #
63
+ # src_dir: public
64
+ #
65
+ src_dir: bin/assets/www-debug
66
+
67
+ # spec_dir
68
+ #
69
+ # Spec directory path. Your spec_files must be returned relative to this path.
70
+ # Default: spec/javascripts
71
+ #
72
+ # EXAMPLE:
73
+ #
74
+ # spec_dir: spec/javascripts
75
+ #
76
+ spec_dir: spec/javascripts
@@ -0,0 +1,23 @@
1
+ module Jasmine
2
+ class Config
3
+
4
+ # Add your overrides or custom config code here
5
+
6
+ end
7
+ end
8
+
9
+
10
+ # Note - this is necessary for rspec2, which has removed the backtrace
11
+ module Jasmine
12
+ class SpecBuilder
13
+ def declare_spec(parent, spec)
14
+ me = self
15
+ example_name = spec["name"]
16
+ @spec_ids << spec["id"]
17
+ backtrace = @example_locations[parent.description + " " + example_name]
18
+ parent.it example_name, {} do
19
+ me.report_spec(spec["id"])
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,32 @@
1
+ $:.unshift(ENV['JASMINE_GEM_PATH']) if ENV['JASMINE_GEM_PATH'] # for gem testing purposes
2
+
3
+ require 'rubygems'
4
+ require 'jasmine'
5
+ jasmine_config_overrides = File.expand_path(File.join(File.dirname(__FILE__), 'jasmine_config.rb'))
6
+ require jasmine_config_overrides if File.exist?(jasmine_config_overrides)
7
+ if Jasmine::Dependencies.rspec2?
8
+ require 'rspec'
9
+ else
10
+ require 'spec'
11
+ end
12
+
13
+ jasmine_config = Jasmine::Config.new
14
+ spec_builder = Jasmine::SpecBuilder.new(jasmine_config)
15
+
16
+ should_stop = false
17
+
18
+ if Jasmine::Dependencies.rspec2?
19
+ RSpec.configuration.after(:suite) do
20
+ spec_builder.stop if should_stop
21
+ end
22
+ else
23
+ Spec::Runner.configure do |config|
24
+ config.after(:suite) do
25
+ spec_builder.stop if should_stop
26
+ end
27
+ end
28
+ end
29
+
30
+ spec_builder.start
31
+ should_stop = true
32
+ spec_builder.declare_suites
@@ -0,0 +1,139 @@
1
+ package main
2
+
3
+ import (
4
+ "fmt"
5
+ "log"
6
+ "net/http"
7
+ "os"
8
+ "regexp"
9
+ "strings"
10
+ )
11
+
12
+ // HTTP Error Enumerables
13
+ type HttpError struct {
14
+ ErrorString string
15
+ CodeNum int
16
+ }
17
+
18
+ func (h HttpError) Error() string { return h.ErrorString }
19
+ func (h HttpError) Code() int { return h.CodeNum }
20
+ func (h HttpError) Report(w http.ResponseWriter) { http.Error(w, h.ErrorString, h.CodeNum) }
21
+
22
+ var (
23
+ ErrHttpResourceNotFound = &HttpError{ErrorString: "Not found", CodeNum: 404}
24
+ ErrHttpMethodNotAllowed = &HttpError{ErrorString: "Method not allowed", CodeNum: 405}
25
+ ErrHttpBadRequeset = &HttpError{ErrorString: "Bad request", CodeNum: 400}
26
+ ErrHttpInternalError = &HttpError{ErrorString: "Internal failure", CodeNum: 500}
27
+ )
28
+
29
+ type HttpHandler struct {
30
+ RootURLPath string
31
+ TmplPath string
32
+ WwwPath string
33
+ Addr string
34
+ Port uint
35
+ Debug bool
36
+ ServStatic bool
37
+ templates *Templates
38
+ rootURLPathLen int
39
+ wwwURLPathLen int
40
+ }
41
+
42
+ // Load all the temmplates into memeory
43
+ func (h *HttpHandler) loadTemplates() {
44
+ h.templates = &Templates{}
45
+ h.templates.LoadTemplates(h.TmplPath)
46
+ }
47
+
48
+ // Configures the http connection and starts the listender
49
+ func (h *HttpHandler) HandleHttpConnection() {
50
+ h.rootURLPathLen = len(h.RootURLPath + "/")
51
+ h.wwwURLPathLen = len(h.RootURLPath + "/assets/")
52
+
53
+ h.loadTemplates()
54
+
55
+ h.initServeHomeHndlr(h.RootURLPath + "/")
56
+ if h.Debug || h.ServStatic {
57
+ h.initServeStaticHndlr(h.RootURLPath + "/assets/")
58
+ }
59
+
60
+ // Build the address with port if it's provided
61
+ address := h.Addr
62
+ if h.Port != 0 {
63
+ address = fmt.Sprintf("%s:%d", h.Addr, h.Port)
64
+ }
65
+
66
+ err := http.ListenAndServe(address, nil)
67
+ if err != nil {
68
+ log.Fatal("ListenAndServe: ", err)
69
+ }
70
+ }
71
+
72
+ // Network event handler for HTTP trafic. Serves up the
73
+ // home.html file which will allow connection to the websocket
74
+ func (h *HttpHandler) initServeHomeHndlr(path string) {
75
+ regProps := &CommonProps{
76
+ Title: "Go + WWW + Rake test app",
77
+ Debug: h.Debug,
78
+ RootURL: h.RootURLPath,
79
+ Host: "",
80
+ }
81
+
82
+ hostPortRep := regexp.MustCompile(":\\d+$")
83
+
84
+ http.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
85
+ if r.URL.Path != h.RootURLPath+"/" {
86
+ ErrHttpResourceNotFound.Report(w)
87
+ return
88
+ }
89
+ if r.Method != "GET" {
90
+ ErrHttpMethodNotAllowed.Report(w)
91
+ return
92
+ }
93
+ w.Header().Set("Content-Type", "text/html; charset=utf-8")
94
+
95
+ // Normalalize http host
96
+ if len(regProps.Host) == 0 {
97
+ regProps.Host = r.Host
98
+ if (h.Debug || h.ServStatic) && h.Port != 0 {
99
+ if strings.Contains(r.Host, ":") {
100
+ regProps.Host = hostPortRep.ReplaceAllString(r.Host, fmt.Sprintf(":%d", h.Port))
101
+ } else {
102
+ regProps.Host = fmt.Sprintf("%s:%d", r.Host, h.Port)
103
+ }
104
+ }
105
+ }
106
+
107
+ if h.Debug { // Force reloading of the template for each request in debug mode
108
+ h.loadTemplates()
109
+ }
110
+
111
+ b, err := h.templates.Render("home", regProps, nil)
112
+ if err != nil {
113
+ log.Println("Failed to render template, home")
114
+ return
115
+ }
116
+
117
+ w.Write(b)
118
+ })
119
+ }
120
+
121
+ // Simple handler for serving static files
122
+ func (h *HttpHandler) initServeStaticHndlr(path string) {
123
+ http.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
124
+ asset := r.URL.Path[h.wwwURLPathLen:]
125
+ fullAssetPath := h.WwwPath + "/" + asset
126
+
127
+ file, err := os.Open(fullAssetPath)
128
+ if err != nil {
129
+ ErrHttpResourceNotFound.Report(w)
130
+ return
131
+ }
132
+ stat, err := file.Stat()
133
+ if err != nil {
134
+ ErrHttpInternalError.Report(w)
135
+ return
136
+ }
137
+ http.ServeContent(w, r, asset, stat.ModTime(), file)
138
+ })
139
+ }
@@ -0,0 +1,31 @@
1
+ package main
2
+
3
+ import (
4
+ "flag"
5
+ "log"
6
+ )
7
+
8
+ var addr = flag.String("addr", "", "IP address the server is to run on")
9
+ var port = flag.Uint("port", 0, "Port address to run the server on")
10
+ var rootURLPath = flag.String("root", "", "URL Path root of the webapp")
11
+ var tmplPath = flag.String("tmpl", "assets/templates", "Specifies the directory to use for template assets.")
12
+ var wwwPath = flag.String("www", "assets/www-debug", "Specifies the directory to use for web assest.")
13
+ var debug = flag.Bool("debug", false, "Enable debug mode where extra loging is produce, each request will reload templates, and all assets are served from non-concaticated files.")
14
+ var static = flag.Bool("static", false, "Enables serving up static content from disk")
15
+
16
+ func main() {
17
+ flag.Parse()
18
+
19
+ httpHndlr := &HttpHandler{
20
+ Addr: *addr,
21
+ Port: *port,
22
+ RootURLPath: *rootURLPath,
23
+ TmplPath: *tmplPath,
24
+ WwwPath: *wwwPath,
25
+ Debug: *debug,
26
+ ServStatic: *static,
27
+ }
28
+
29
+ httpHndlr.HandleHttpConnection()
30
+ log.Println("")
31
+ }
@@ -0,0 +1,13 @@
1
+ package main
2
+
3
+ import (
4
+ "testing"
5
+ )
6
+
7
+ func Test_Add2Plus1(t *testing.T) {
8
+ if 2+1 != 3 {
9
+ t.Error("Adding 2+1 didn't work as expected")
10
+ } else {
11
+ t.Log("2+1 test passed.")
12
+ }
13
+ }
@@ -0,0 +1,42 @@
1
+ package main
2
+
3
+ import (
4
+ "bytes"
5
+ "html/template"
6
+ "log"
7
+ )
8
+
9
+ type Templates struct {
10
+ tmpls *template.Template
11
+ }
12
+
13
+ // Object defining what all template data will use
14
+ type TmplProps struct {
15
+ Common *CommonProps
16
+ Contents interface{}
17
+ }
18
+
19
+ // Generic properties shared by all templates
20
+ type CommonProps struct {
21
+ Title string
22
+ Debug bool
23
+ RootURL string
24
+ Host string
25
+ }
26
+
27
+ // Loads the templates from disk and returns them loaded
28
+ // into memory.
29
+ func (t *Templates) LoadTemplates(path string) {
30
+ t.tmpls = template.Must(template.ParseGlob(path + "/*.gotmpl"))
31
+ }
32
+
33
+ // Renders a template and returns the byte array for it
34
+ func (t *Templates) Render(tmplName string, common *CommonProps, contents interface{}) ([]byte, error) {
35
+ buf := bytes.NewBuffer(nil)
36
+ err := t.tmpls.ExecuteTemplate(buf, tmplName, &TmplProps{Common: common, Contents: contents})
37
+ if err != nil {
38
+ log.Println("Error: failed to execute template", tmplName, ", because", err)
39
+ }
40
+
41
+ return buf.Bytes(), err
42
+ }
@@ -0,0 +1,6 @@
1
+
2
+ #= require libs/mod_loader
3
+ #= require libs/deferred
4
+ #= require libs/logger
5
+ #= require helpers/properties
6
+ #= require main
@@ -0,0 +1,19 @@
1
+ modLoader.define 'helpers/properties', (require,exports)->
2
+
3
+ _buildProp = (cont, propStore, isStatic)->
4
+ return (value) ->
5
+ if value != undefined && !isStatic
6
+ cont[propStore] = value
7
+ else if value != undefined && isStatic
8
+ console.error('unable to set static property '+propStore+' to:',value)
9
+
10
+ return cont[propStore]
11
+
12
+ exports.add = (cont, props)->
13
+ for own prop,rules of props
14
+ propStore = '__auto__'+prop
15
+ cont[propStore] = if rules.value != undefined then rules.value else null
16
+ cont[prop] = _buildProp(cont, propStore, rules.static)
17
+ return
18
+
19
+ return
@@ -0,0 +1,92 @@
1
+ modLoader.define 'libs/deferred', (require, exports)=>
2
+
3
+ context = @
4
+
5
+ class Promise
6
+ constructor: ->
7
+ @_dones = []
8
+ @_fails = []
9
+ @_pendingFinish = false
10
+ return
11
+
12
+ _doDone: (data)->
13
+ for done in @_dones
14
+ done.apply(context, data)
15
+ return
16
+
17
+ _doFail: (data)->
18
+ for fail in @_fails
19
+ fail.apply(context, data)
20
+ return
21
+
22
+ doFinish: (isResolved, data)->
23
+ @_pendingFinish = {isResolved: isResolved, data: data}
24
+
25
+ if isResolved then @_doDone(data) else @_doFail(data)
26
+ return
27
+
28
+ done: (doneCb)->
29
+ @_dones.push(doneCb)
30
+
31
+ _pending = @_pendingFinish
32
+ if _pending && _pending.isResolved
33
+ @doFinish(_pending.isResolved, _pending.data)
34
+
35
+ return @
36
+
37
+ fail: (failCb)->
38
+ @_fails.push(failCb)
39
+
40
+ _pending = @_pendingFinish
41
+ if _pending && !_pending.isResolved
42
+ @doFinish(_pending.isResolved, _pending.data)
43
+ return @
44
+
45
+ then: (doneCb, failCb)->
46
+ @_dones.push(doneCb) if doneCb?
47
+ @_fails.push(failCb) if failCb?
48
+
49
+ _pending = @_pendingFinish
50
+ if _pending
51
+ @doFinish(_pending.isResolved, _pending.data)
52
+ return @
53
+
54
+
55
+ class Deferred
56
+ constructor: ->
57
+ @_promise = null
58
+ @_pendingFinish = null
59
+ @_isFinished = false
60
+ return
61
+
62
+ _finish: (isResolved, data)->
63
+ if @_isFinished
64
+ return
65
+ @_isFinished = true
66
+
67
+ _promise = @_promise
68
+ if _promise?
69
+ _promise.doFinish(isResolved, data)
70
+ else
71
+ @_pendingFinish = {isResolved: isResolved, data: data}
72
+ return
73
+
74
+ resolve: (data...)->
75
+ return @_finish(true, data)
76
+
77
+ reject: (data...)->
78
+ return @_finish(false, data)
79
+
80
+ promise: ->
81
+ promise = new Promise()
82
+ @_promise = promise
83
+ @_isFinished = false
84
+ _pending = @_pendingFinish
85
+ @_finish(_pending.isResolved, _pending.data) if _pending?
86
+ return promise
87
+
88
+
89
+ exports.create = ->
90
+ return new Deferred()
91
+
92
+ return
@@ -0,0 +1,40 @@
1
+ modLoader.define 'libs/logger', (require,exports)->
2
+
3
+ @appLoggerInstance = null
4
+
5
+ logger = ->
6
+ log = (args...)->
7
+ console.log(args)
8
+ return
9
+
10
+ warn = (args...)->
11
+ console.log(args)
12
+ return
13
+
14
+ debug = (args...)->
15
+ console.error(args)
16
+ return
17
+
18
+ error = (args...)->
19
+ console.error(args)
20
+ return
21
+
22
+ return {
23
+ log: log
24
+ warn: warn
25
+ debug: debug
26
+ error: error
27
+ }
28
+
29
+ _initLogger = =>
30
+ @appLoggerInstance = logger()
31
+ return
32
+
33
+ exports.getInstance = (name) =>
34
+ _initLogger() if !@appLoggerInstance
35
+ return @appLoggerInstance
36
+
37
+ exports.reset = =>
38
+ delete @appLoggerInstance
39
+
40
+ return
@@ -0,0 +1,44 @@
1
+ # Builds a module loader tool which pulls in functions only once
2
+ # and returns the exports for each time it is required after that
3
+
4
+ @modLoader = (->
5
+ _modules = {}
6
+
7
+ require = (name)->
8
+ mod = _modules[name]
9
+
10
+ if !mod
11
+ console.error 'Failed to load module '+name+', as it does exist.'
12
+ return {}
13
+
14
+ exports = mod.exports
15
+ if !exports
16
+ exports = mod.exports = {}
17
+ mod.builder(require, exports)
18
+
19
+ return exports
20
+
21
+ define = (name, builder)->
22
+ _modules[name] =
23
+ builder: builder
24
+ exports: null
25
+ return
26
+
27
+ isDefined = (name)->
28
+ return _modules[name]?
29
+
30
+ isLoaded = (name)->
31
+ return _modules[name]? && _modules[name].exports
32
+
33
+ clearAll = ->
34
+ _modules = {}
35
+ return
36
+
37
+ return {
38
+ require: require
39
+ define: define
40
+ isDefined: isDefined
41
+ isLoaded: isLoaded
42
+ clearAll: clearAll
43
+ }
44
+ )()
@@ -0,0 +1,10 @@
1
+
2
+ # Application main entry point
3
+
4
+ Logger = modLoader.require 'libs/logger'
5
+
6
+ # This function runs once the page is loaded
7
+ onDocLoaded = ->
8
+ return
9
+
10
+ window.addEventListener("load",onDocLoaded,false)