99x / boilerplatejs Goto Github PK
View Code? Open in Web Editor NEWYour own boilerplate code to start your next big javascript project. We incorporate the best design practices with best in market open source libraries.
License: MIT License
Your own boilerplate code to start your next big javascript project. We incorporate the best design practices with best in market open source libraries.
License: MIT License
As with most projects I don't like modifying core files (although this project does present a unique case to do it). My proposal is as follows.
core/_boiler_.js
core/helpers/_helpers_.js
extend/_boiler_.js
extend/helpers/_helpers_.js
The Helpers extended module would look like this :
define(function(require) {
var Helpers = require('core/helpers/_helpers_');
return _.extend(Helpers, {
});
});
The same would go for _boiler_
. I would have these two modules configured in main.js
in the require config to always load from extend\*
. All new modules can now be created in extend allowing overrides of core files, helper files and new core extensions to be added without touching core itself.
So I stole the Backbone extend function and placed it into boilerplate. I have then modified all core classes to use the extend method as a static extend
.
This allows
define(function(require) {
var Boiler = require('boiler');
return Boiler.ViewTemplate.extend({
someMethod : function() {}
});
});
I 'd like to know your thoughts, this structure works very well for me and I'm sure it'd work well for most that have used Boilerplate.js to bootstrap their projects.
Add CODE_OF_CONDUCT.md
see http://ssssnakes.com/smoke/ as a candidate
Because of boilerplate using its own router class seems to be it not support remove hash tags with the browsers which support html5 push state in the following way
Backbone.history.start({hashChange:false, pushState:true})
How can I include jQuery UI with BoilerPlateJS so that I can use jquery components?
thanks
Remove the 'src/core/helpers/storage.js' and related functionality since it is not architecturally significant.
Add CONTRIBUTING.md
see yepnope.js and Modenizer.js for ideas
Seems like its not possible to stop module, and context instance has no knowledge of what modules are running.
Is there a repository for the boilerplatejs.org website? If so the community might be able to help with some basic copy editing.
Hello,
In a component I create a modal window responding to an event:
var Component = function(moduleContext) {
var vm = null;
this.initialize = function (parent) {
vm = new ViewModel(moduleContext);
moduleContext.listen("loginClicked", function () {
var newWindow;
newWindow = window.open("", "login", "width=400,height=400);
newWindow.document.write(template);
// THIS DOESN'T WORK---------------------------------------------------------------
ko.applyBindings(vm, newWindow.document.getElementById('body'));
// -----------------------------------------------------------------------------------------------------
});
};
}
return Component;
});
The template (view.html) is the following:
<title>Login</title> DoneEverything seems to work, but the created window is not binded to the viewmodel.
Thanks for your help,
Marcos
qunit.js 1.9.0
ReferenceError: testEnvironment is not defined
config.currentModuleTestEnviroment = testEnvironment; <= line 307
Don't you feel the need for Context.unsubscribe()
method?
E.g. I want my component to listen for event only if it is active. So i call Context.listen()
in component's .activate()
function (imagine I don't use viewmodels). Currently there is no way to unsubscribe when the component is deactivated, meaning the event handler will be called anyway. But i don't want to handle this event when the component is hidden because e.g. it changes look&feel of component based on event data - it's a waste of resources.
Hi,
The two test files below: boilerplatejs / tests / other are wrongly named.
js-encapsulation.js contains the protoype tests and 'js-prototypes.js' contains the encapsulation tests.
Grtz,
Maarten Docter
apperently director.js approach is more compatible with boilerplatejs architecture.. it may help to reduce the amount of code in core classes
I want to use Boilerplatejs for jquery mobile development but I got it difficult. Do you think it is appropriate? How can I proceed? Any help will be appreciated!
The third party libraries needs to be minified and combined into a single script to reduce the number of HTTP requests.
This can be probably done by modifying the r.js optimizer.
Theming is currently done via a theme component. For faster loading theme is defined on the index.html too. This is duplication of content, that may be avoided with a better design.
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.