RequireJS is a JavaScript file and module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments, like Rhino and Node.
1
vote
0answers
22 views
An HTML Combobox with Autocomplete using jQueryUI and require.js
Hope this is the right place. I've never developed on a team so never had any feedback on my code and I'd like to know what others think. I'm using this in a current project and it is working really ...
2
votes
0answers
91 views
Setting up require.js for a static website and loading custom code
I am a new SO/SE user and I initially asked this question on SO, but i was 'sent' here -for some reason i don't clearly understand but anyway- so here I am..! I was actually curious about my require....
0
votes
1answer
75 views
Change the switch code
there is a other way to write in JS the switch statement ,
This code is working :)
...
1
vote
0answers
68 views
JavaScript sound manager (singleton / static object using observer pattern)
I have some JavaScript code i would like your feedback on please.
My goals:
SoundManager should be a singleton/static class that has one instance.
...
2
votes
1answer
40 views
Rendering comments in a Backbone view
I want to make show/hide logic more maintainable in my codebase.
Because they are too faraway located in separate js files, it hard for people to maintain.
The flow in my codebase is:
require....
3
votes
1answer
96 views
Combat simulator - single page JavaScript with requirejs from a Java Applet
Single-page web app from Applet
I'm seeking feedback on my first single-page web app using RequireJS and a web worker. I converted it from a Java applet, and the code is up on GitHub.
It's a combat ...
1
vote
2answers
277 views
Including the necessary polyfills for every combination of browser support
My project uses a Promise polyfill and the fetch polyfill, that I am only including if the browser does not yet support it
...
1
vote
0answers
30 views
Loading animation refactoring to allow for more flexibility
I finished part of a module this afternoon that is responsible for creating and showing a loading animation as an item is removed from a cart. However, it isn't the most efficient way and could use ...
0
votes
0answers
147 views
Dynamically create javascript object (Backbone View)
The context here is Backbone but it's a general question about dynamically creating javascript objects.
I would like to pass the name of a View ('ViewX') to be created, to a function which can then ...
2
votes
0answers
61 views
Backbone/requireJs and circular dependencies
I'm trying to have a main App view with references of all my views to manage and call transitions between theses views. But, I have circular dependencies.
app.js
...
2
votes
0answers
62 views
Custom backend app with require.js approach
I'm working on a small custom backend app in PHP for personal use (and practice MVC) and I thought it was a nice opportunity to try (and learn) requirejs to 'organize' my scripts and load just what ...
2
votes
1answer
1k views
Cross-domain with requirejs text plugin
there is my implementation for cross domain call using the requireJs text plug-in
htaccess file in the template folder of my cross-domain site
...
4
votes
1answer
123 views
Correctly rewriting Japanese verb conjugator in modular JS
For my first use of javascript I've made an app that takes an input verb from html in Japanese and outputs it in to many conjugated (manipulated) forms.
Essentially, it defines an alphabet, some ...
3
votes
0answers
1k views
Using RequireJS correctly for social plugins
I'm a beginner in JavaScript and lately I've been trying things with RequireJS, I'd like to get some feedback on how good/poor my code is and in what ways it can be improved.
My example below is just ...
4
votes
1answer
145 views
Structure a webapp using RequireJS
I've written a small webapp in JavaScript, and am now essentially rewriting it to use RequireJS. I'm doing this partly to get more familiar with RequireJS (which I have little experience with), as ...
2
votes
1answer
325 views
Using GeoComplete with RequireJS (with shim config)
I am using the GeoComplete plugin with RequireJS
It works, but please could someone confirm I've done this correctly, mainly my understanding of shim:
...
4
votes
3answers
379 views
Is there anything can be improved in this JavaScript module?
I am using RequireJS JavaScript library. I have the following JavaScript module define for dataservice:
...
7
votes
2answers
308 views
Modular design with Require.js
I am trying to get a better understanding of the modular design pattern and I am using Requirejs to manage my dependencies.
I understand separating code into modules (using define with RequireJS) so ...
6
votes
1answer
3k views
Avoiding RequireJS circular dependencies
My app module bootstraps a Backbone.js application.
I need app to be available in every other view for easy access to router, ...
1
vote
1answer
401 views
Layout manager: decouple DOM insertion from construction and rendering? [closed]
I'm refactoring a responsive report builder in JavaScript. Here's what it looks like:
This started as a small set of objects that transformed data, rendered the graphs with D3.js, and managed the ...
2
votes
1answer
475 views
Control consisting of a mute button and an expanding range slider
I'm learning BackboneJS and I just made an attempt at converting a pre-existing module to a Backbone.View. I was hoping to get some feedback on my attempt and learn. I've been using the annotated ToDo ...
4
votes
1answer
513 views
User model with BackboneJS and RequireJS with test cases in Jasmine
I've been taking a stab at implementing test cases using the Jasmine testing framework. To do so, I've made an application which has a User object. This User object is created by the server, but its ...
0
votes
2answers
208 views
Refactoring a constructor to accept a config object
So I have a function which creates a Playlist object. Currently, this function accepts two paramaters: id and name. However, it also exposes a method called 'loadData' which can set the entire object ...