$ kanso push http://localhost:5984/exampleReading dependency tree...loading .preprocessor attachments/addpreprocessor modules/addpreprocessor properties/queueloading packages/attachmentsloading packages/modulesloading packages/propertiesloading packages/dbloading packages/underscoreloading packages/eventsError: Error when running preprocessor: "attachments/add"Error: ENOENT, stat '~/Desarrollo/kanso/example-app/jquery.js'Failed
{"name": "example-app","version": "0.0.1","description": "The simplest possible app","attachments": ["index.html", "jquery.js"],"modules": ["lib"],"load": "lib/app","dependencies": {"attachments": null,"modules": null,"properties": null,"db": null,"jquery": null}}
$ find ./ -maxdepth 2 -type d././data./lib./packages./packages/modules./packages/underscore./packages/attachments./packages/events./packages/properties./packages/db
$ cat kanso.json
{"name": "example-app","version": "0.0.1","description": "The simplest possible app","attachments": ["index.html", "jquery.js"],"modules": ["lib"],"load": "lib/app","dependencies": {"attachments": null,"modules": null,"properties": null,"db": null}}
$ kanso installinstalling from directory .Building version tree...OK
$ kanso push http://localhost:5984/exampleReading dependency tree...loading .preprocessor attachments/addpreprocessor modules/addpreprocessor properties/queueloading packages/attachmentsloading packages/modulesloading packages/propertiesloading packages/dbloading packages/underscoreloading packages/eventsError: Error when running preprocessor: "attachments/add"Error: ENOENT, stat '~/Desarrollo/kanso/example-app/jquery.js'Failed
$ cat kanso.json
{"name": "example-app","version": "0.0.1","description": "The simplest possible app","attachments": ["index.html", "jquery.js"],"modules": ["lib"],"load": "lib/app","dependencies": {"attachments": null,"modules": null,"properties": null,"jquery": null"db": null,}}
$ kanso installinstalling from directory .Building version tree...checking jqueryinstalling jqu...@2.0.0 (cached)OK
$ kanso push http://localhost:5984/exampleReading dependency tree...loading .preprocessor attachments/addpreprocessor modules/addpreprocessor properties/queueloading packages/attachmentsloading packages/modulesloading packages/propertiesloading packages/db
loading packages/jquery
loading packages/underscoreloading packages/eventsError: Error when running preprocessor: "attachments/add"Error: ENOENT, stat '~/Desarrollo/kanso/example-app/jquery.js'Failed
$ cat kanso.json{"name": "example-app","version": "0.0.1","description": "The simplest possible app","attachments": ["index.html"],
"modules": ["lib"],"load": "lib/app","dependencies": {"attachments": null,"modules": null,"properties": null,"db": null,"jquery": null}}
kanso installinstalling from directory .Building version tree...OK
~/Desarrollo/kanso/example-app$ kanso push http://localhost:5984/example
Reading dependency tree...loading .preprocessor attachments/addpreprocessor modules/addpreprocessor properties/queueloading packages/attachmentsloading packages/modulesloading packages/propertiesloading packages/dbloading packages/jqueryloading packages/underscoreloading packages/events
postprocessor attachments/cleanuppostprocessor modules/attachmentpostprocessor properties/loadpostprocessor modules/cleanupBuild complete: 513msUploading...
--2012-07-24 09:43:18-- http://localhost:5984/example/_design/example-app/jquery.jsResolviendo localhost (localhost)... 127.0.0.1Conectando con localhost (localhost)[127.0.0.1]:5984... conectado.Petición HTTP enviada, esperando respuesta... 404 Object Not Found2012-07-24 09:43:18 ERROR 404: Object Not Found.
$ cat kanso.json{"name": "example-app","version": "0.0.1","description": "The simplest possible app","attachments": ["index.html"],
"modules": ["lib", "packages/jquery"],
"load": "lib/app","dependencies": {"attachments": null,"modules": null,"properties": null,"db": null,"jquery": null}}
$ kanso installinstalling from directory .Building version tree...OK
~/Desarrollo/kanso/example-app$ kanso push http://localhost:5984/example
Reading dependency tree...loading .preprocessor attachments/addpreprocessor modules/addpreprocessor properties/queueloading packages/attachmentsloading packages/modulesloading packages/propertiesloading packages/dbloading packages/jqueryloading packages/underscoreloading packages/events
postprocessor attachments/cleanuppostprocessor modules/attachmentpostprocessor properties/loadpostprocessor modules/cleanupBuild complete: 152msUploading...~/Desarrollo/kanso/example-app$ wget http://localhost:5984/example/_design/example-app/jquery.js--2012-07-24 09:45:22-- http://localhost:5984/example/_design/example-app/jquery.jsResolviendo localhost (localhost)... 127.0.0.1Conectando con localhost (localhost)[127.0.0.1]:5984... conectado.Petición HTTP enviada, esperando respuesta... 404 Object Not Found2012-07-24 09:45:22 ERROR 404: Object Not Found.
<h1>Hello, world!</h1><ul id="makes"></ul>
<script type="text/javascript" src="jquery.js"></script><script type="text/javascript" src="modules.js"></script><script type="text/javascript">
var db = require('db').current();
db.getView('example-app', 'makes', function (err, data) {
if (err) {// an error occurredreturnalert(err);}for (var i = 0; i < data.rows.length; i++) {
$('<li/>').text(data.rows[i].key).appendTo('#makes');}
});
</script>
In the example:<h1>Hello, world!</h1><ul id="makes"></ul><script type="text/javascript" src="jquery.js"></script><script type="text/javascript" src="modules.js"></script><script type="text/javascript">var db = require('db').current();
db.getView('example-app', 'makes', function (err, data) {
if (err) {// an error occurredreturnalert(err);}for (var i = 0; i < data.rows.length; i++) {
$('<li/>').text(data.rows[i].key).appendTo('#makes');}});</script>jquery.js is not available like module.js, and both are specified to kanso in the same form.
So, what is the problem?jQuery can not be treated as dependency and must be download separately and load with module/load?Thanks.
<!-- <script type="text/javascript" src="jquery.js"></script> --><script type="text/javascript">
var $ = require('jquery');
var db = require('db').current();
...
{"name": "example-app","version": "0.0.1","description": "The simplest possible app","attachments": ["index.html"],"modules": ["lib"],"load": "lib/app","dependencies": {"attachments": null,"modules": null,"properties": null,"db": null,"jquery": null}}