Socket
Socket
Sign inDemoInstall

bones

Package Overview
Dependencies
Maintainers
8
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bones - npm Package Compare versions

Comparing version 2.0.0alpha3 to 2.0.0alpha4

examples/simple/assets/stylesheets/style.css

2

client/backbone.js

@@ -69,3 +69,3 @@ Backbone.Router.prototype.route = function(route, name, callback) {

// Make the request.
$.ajax(params);
return $.ajax(params);
};
#!/usr/bin/env node
require('bones').load(__dirname);
var bones = require('bones')
// Bones load views/models/etc.. in alphabetical order. To explicity load
// certain ones early simply require them here.
require('./views/Main');
bones.load(__dirname);
if (!module.parent) {
require('bones').start();
bones.start();
}
{
"name": "bones",
"description": "Framework for using backbone.js on the client and server.",
"version": "2.0.0alpha3",
"version": "2.0.0alpha4",

@@ -18,3 +18,3 @@ "author": {

"backbone": "0.5.1",
"jquery": "1.5.x",
"jquery": "1.6.x",
"optimist": "0.1.x",

@@ -21,0 +21,0 @@ "mirror": "0.3.x"

@@ -7,4 +7,11 @@ # Bones

The [wiki](https://github.com/developmentseed/bones/wiki) contains more information on [**Getting Started**](https://github.com/developmentseed/bones/wiki/Getting-Started) and on the [concepts](https://github.com/developmentseed/bones/wiki/Plugin-Architecture) in Bones.
The [wiki](https://github.com/developmentseed/bones/wiki) contains more information
on [**Getting Started**](https://github.com/developmentseed/bones/wiki/Getting-Started)
and on the [concepts](https://github.com/developmentseed/bones/wiki/Plugin-Architecture) in Bones.
## Example Application
* The [simple app example](https://github.com/developmentseed/bones/tree/master/examples/simple) is
a good quickstart to making a bones application.
## Testing

@@ -17,2 +24,1 @@

Bones is [BSD licensed](https://github.com/developmentseed/bones/raw/master/LICENSE).

@@ -44,3 +44,3 @@ var env = process.env.NODE_ENV || 'development';

return function(req, res, next) {
if (req.method === 'GET') {
if (req.method === 'GET' || req.method === 'HEAD') {
next();

@@ -47,0 +47,0 @@ } else if (req.body && req.cookies['bones.token'] && req.body['bones.token'] === req.cookies['bones.token']) {

@@ -56,3 +56,3 @@ var path = require('path');

module.exports.register = function(app) {
if (app.assets) {
if (app.assets && !(/\.server\._$/.test(filename))) {
app.assets.templates.push({

@@ -59,0 +59,0 @@ filename: filename,

@@ -56,3 +56,3 @@ var Backbone = require('./backbone');

this.server.get(route, function(req, res, next) {
var fragment = (req.query && req.query['_escaped_fragment_']) || req.url;
var fragment = (req.query && req.query['_escaped_fragment_']) || req.url.replace(/[#?].*$/, '');
var args = router._extractParameters(route, fragment);

@@ -59,0 +59,0 @@ var context = Object.create(router, { req: { value: req }, res: { value: res } });

@@ -15,2 +15,20 @@ var Bones = Bones || {};

// Multifetch. Pass a hash of models and fetch each in parallel.
Bones.utils.fetch = function(models, callback) {
var remaining = _(models).size();
var error = null;
_(models).each(function(model) {
model.fetch({
success: function() {
if (--remaining === 0) callback(error, models);
},
error: function(m, err) {
if (!error) error = err;
model.error = err;
if (--remaining === 0) callback(error, models);
}
});
});
};
// From https://github.com/visionmedia/lingo/blob/master/lib/languages/en.js

@@ -17,0 +35,0 @@ Bones.utils.uncountable = [ 'advice', 'enegery', 'excretion', 'digestion',

@@ -112,1 +112,19 @@ process.env.NODE_ENV = 'test';

};
exports['/assets/bones/templates.js'] = function() {
assert.response(server, {
url: '/assets/bones/templates.js',
method: 'GET'
}, { status: 200 }, function(res) {
assert.ok(res.body.indexOf(require('bones/test/fixture/templates/Error._').toString()) >= 0);
assert.ok(res.body.indexOf(require('bones/test/fixture/node_modules/othermodule/templates/Other._').toString()) >= 0);
// Doesn't include server files.
assert.ok(res.body.indexOf(require('bones/test/fixture/templates/ServerSide.server._').toString()) < 0);
// Correct order.
assert.ok(res.body.indexOf('// ---- start test/fixture/templates/Error._ ----') >= 0);
assert.ok(res.body.indexOf('// ---- start test/fixture/templates/Error._ ----') >
res.body.indexOf('// ---- start test/fixture/node_modules/othermodule/templates/Other._ ----'));
});
};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc