From now on with each subgenerator we should apply the following rules to classNames and fileNames:
capitalize and camelize the className (e.g. "some view with Id 21312" -> "SomeViewWithId21312")
slugify the corresponding fileName (e.g. "some view with Id 21312" -> "some-view-with-id-21312.js")
I've added the underscore.strings node module as a primary dependency for generator-spa, so you can simply "require" it in any index.js and apply to any strings like this:
var = require('underscore.string');
this.template('model.js', 'models/' + .slugify(this.name) + '.js');
These changes are already applied to spa:model subgenerator, so please use that as a reference and apply these changes to spa:view and spa:module.
From now on with each subgenerator we should apply the following rules to classNames and fileNames:
I've added the underscore.strings node module as a primary dependency for generator-spa, so you can simply "require" it in any index.js and apply to any strings like this:
var = require('underscore.string'); this.template('model.js', 'models/' + .slugify(this.name) + '.js');
These changes are already applied to spa:model subgenerator, so please use that as a reference and apply these changes to spa:view and spa:module.