| 40 | } |
| 41 | |
| 42 | compile (code) { |
| 43 | let js |
| 44 | if (this.get('codeLanguage') && (this.get('codeLanguage') === 'javascript')) { return code } |
| 45 | if (this.get('codeLanguage') && (this.get('codeLanguage') !== 'coffeescript')) { |
| 46 | return console.error('Can\'t compile', this.get('codeLanguage'), '-- only CoffeeScript/JavaScript.', this) |
| 47 | } |
| 48 | try { |
| 49 | js = CoffeeScript.compile(code, { bare: true }) |
| 50 | } catch (e) { |
| 51 | // console.log 'couldn\'t compile', code, 'for', @get('name'), 'because', e |
| 52 | js = this.get('js') |
| 53 | } |
| 54 | return js |
| 55 | } |
| 56 | |
| 57 | getDependencies (allSystems) { |
| 58 | const results = [] |