chaplinjs / chaplin-boilerplate-plain

Boilerplate application for the Chaplin.js library – written in plain JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't start boilerplate from subdir anymore

pleasedontbelong opened this issue · comments

Since c4871f6 I cant load the boilerplate from a subdir. To reproduce

  1. git clone the project (let's say to /var/www/chaplin-boilerplate-plain)
  2. Modify the application.js to pass the subdir as a parameter to the router (https://gist.github.com/pleasedontbelong/5909799)

on the console you'll get an error :

Uncaught TypeError: Cannot assign to read only property 'router' of [object Object] chaplin-0.10.0.js:125
module.exports.Application.initRouter chaplin-0.10.0.js:125
Chaplin.Application.extend.initialize application.js:23
Application chaplin-0.10.0.js:78
child backbone-1.0.0.js:1531
(anonymous function) localhost:5000/chaplin-boilerplate-plain/:43
context.execCb require-2.1.5.js:1615
Module.check require-2.1.5.js:851
(anonymous function) require-2.1.5.js:1092
(anonymous function) require-2.1.5.js:129
(anonymous function) require-2.1.5.js:1135
each require-2.1.5.js:57
Module.emit require-2.1.5.js:1134
Module.check require-2.1.5.js:905
(anonymous function) require-2.1.5.js:1092
(anonymous function) require-2.1.5.js:129
(anonymous function) require-2.1.5.js:1135
each require-2.1.5.js:57
Module.emit require-2.1.5.js:1134
Module.check require-2.1.5.js:905
(anonymous function) require-2.1.5.js:1092
(anonymous function) require-2.1.5.js:129
(anonymous function) require-2.1.5.js:1135
each require-2.1.5.js:57
Module.emit require-2.1.5.js:1134
Module.check require-2.1.5.js:905
Module.enable require-2.1.5.js:1122
Module.init require-2.1.5.js:764
callGetModule require-2.1.5.js:1149
context.completeLoad require-2.1.5.js:1529
context.onScriptLoad

BTW why did you deleted the useful comments? or is there another way to modify the root dir on chaplin 0.10.0?? the doc doesnt say anything about it

Chaplin.Application now has this functional by default. Just do new Application({root: '/test/'}) etc

Great thxs!!.. I guess the doc needs some update, there's no way I could have guessed that ^^... and the README of this repo leaded me to this error too