buildbot / guanlecoja Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Pardon me for the vague question-issue here. I'm not quite sure what part of the guanlecoja stack this is related to.
I have a buildbot plugin which was working but it has one rather large source file that I'm trying to break up into several smaller source files. For example i have coffeescript a class called ConsoleUIHelpers which I broke into a separate file. Now I'm getting ReferenceError: ConsoleUIHelpers is not defined
Searching the scripts.js that some part of the guanlecoja framework is outputting I do find my class in the outputted code:
(function() {
var ConsoleUIHelpers, consoleUIHelpers,
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
ConsoleUIHelpers = (function() {
...
}).call(this);
which appears before the code which is failing with the ReferenceError
It's not clear to me where/why the code is getting surrounded by the (function() { ... }).call(this)
, but that seems to be what is preventing the subsequent code from having ConsoleUIHelpers as an identifier that it can access.
When I pass my class through a regular-old coffeescript-to-js conversion it does not surround it with (function() { ... }).call(this)
, so I'm guessing that it is coming from some other part of the guanlecoja framework, but i have no idea which piece of technology does this.
from reading https://stackoverflow.com/questions/2421911/what-is-the-purpose-of-wrapping-whole-javascript-files-in-anonymous-functions-li, I'm assuming that surrounding the code with (function() { ... }).call(this)
is some kind of namespacing mechanism, though the examples in that stack overflow do something like var myPlugin = (function() { ... }).call(this)
which then gives an identifier with which to access the contents of the namespace.
Apologies for my ignorance, I don't even know what to research in this case since reading about "coffeescript exports", "coffeescript modules" etc. turned up nothing that seemed relevant. I'm familiar with require.js but it doesn't appear to be being used anywhere in buildbot's front-end code, and can't find any examples of any sort of require/import statement to go off.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.