spine.js

Spine.js & hem getting started

感情迁移 提交于 2019-12-04 02:01:55
问题 I successfully created a spine app as explained on spine's Getting started page. However, hem doesn't automatically take my changes into account ; I have to build manually. I have the same problem when I follow the contact screencast, but this time hem does not build at all : art-mac:spine.contacts art$ hem build node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ Cannot find module: spine/lib/tmpl. Have you run `npm install .` ? I did run 'npm install .'

spine, node.js (express) and Access-Control-Allow-Origin

岁酱吖の 提交于 2019-12-03 11:43:53
I'm developing an app on my local pc. THe frontend should be built with spinejs and the backend-api with node.js. Spine is running on port 9294 and node.js is running on port 3000. in Spine I've added to my model the following: @url: "http:localhost:3000/posts" and in my express server app.get('/posts', function(req, res){ console.log("giving ALL the posts"); res.header("Access-Control-Allow-Origin", "*") res.json(posts); }); But I'm always getting the following erro in chrome: XMLHttpRequest cannot load http://localhost:3000/posts. Origin http://localhost:9294 is not allowed by Access-Control

The 'describe' keyword in javascript

我的未来我决定 提交于 2019-12-03 02:10:49
问题 So I am a newbie in javascript and i had been going through some one else's code and I found this.. describe('deviceready', function() { it('should report that it fired', function() { spyOn(app, 'report'); app.deviceready(); expect(app.report).toHaveBeenCalledWith('deviceready'); }); }); What I don't understand is: What exactly does the describe keyword do? info: - Its a phonegap application - We are using the spine.js and jQuery libraries 回答1: Describe is a function in the Jasmine testing

The 'describe' keyword in javascript

孤街醉人 提交于 2019-12-02 17:15:00
So I am a newbie in javascript and i had been going through some one else's code and I found this.. describe('deviceready', function() { it('should report that it fired', function() { spyOn(app, 'report'); app.deviceready(); expect(app.report).toHaveBeenCalledWith('deviceready'); }); }); What I don't understand is: What exactly does the describe keyword do? info: - Its a phonegap application - We are using the spine.js and jQuery libraries mmigdol Describe is a function in the Jasmine testing framework. It simply describes the suite of test cases enumerated by the "it" functions. Also used in

Defining global variable for Browserify

时光毁灭记忆、已成空白 提交于 2019-11-27 08:14:14
I'm using SpineJS (which exports a commonjs module) and it needs to be available globally because I use it everywhere, but It seems like I have to do Spine = require('spine') on every file that uses Spine for things to work. Is there any way to define Spine once to make it globally available? PS: I'm using Spine as an example, but I'm in general wondering about how to do this with any other library. Writing Spine = require('spine') in each file is the right way to do. Yet, there are several possibilities by using the global or window object (browserify sets the global object to window , which

Defining global variable for Browserify

蓝咒 提交于 2019-11-26 14:04:33
问题 I'm using SpineJS (which exports a commonjs module) and it needs to be available globally because I use it everywhere, but It seems like I have to do Spine = require('spine') on every file that uses Spine for things to work. Is there any way to define Spine once to make it globally available? PS: I'm using Spine as an example, but I'm in general wondering about how to do this with any other library. 回答1: Writing Spine = require('spine') in each file is the right way to do. Yet, there are