Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yeoman install can add invalid entries to requirejs paths config #311

Closed
jsoverson opened this issue Sep 8, 2012 · 1 comment
Closed
Milestone

Comments

@jsoverson
Copy link

Yeoman doesn't quote entries added to the requirejs paths config, so if you install a library whose name contains characters that are invalid as JavaScript object properties, it breaks main.js.

On an init with all yeses, installing a local repo to test a component.json

~/development/src/yeoman-gettingstarted $ yeoman install ../backbone.marionette
Running "bower:install:../backbone.marionette" (bower) task
bower copying /Users/joverson/development/src/backbone.marionette
bower cloning git://github.com/documentcloud/backbone.git
bower cached git://github.com/documentcloud/backbone.git
bower fetching backbone
bower checking out backbone#0.9.2
bower copying /Users/joverson/.bower/backbone
bower cloning git://github.com/documentcloud/underscore.git
bower cached git://github.com/documentcloud/underscore.git
bower fetching underscore
bower checking out underscore#1.3.3
bower copying /Users/joverson/.bower/underscore
bower copying to app/scripts/vendor
~/development/src/yeoman-gettingstarted $ cat app/scripts/main.js 
require.config({
  hm: "app/hm",

  shim:{
  },
 paths: {
    backbone: '../../components/backbone/backbone',
    backbone.marionette: '../../components/backbone.marionette/lib/backbone.marionette',
    underscore: '../../components/underscore/underscore',

    esprima: 'app/scripts/esprima',
    jquery: 'app/scripts/vendor/jquery.min'
  }
});

require(['app'], function(app) {
    // use app here
    console.log(app);
});

This is after pulling this morning and doing sudo npm link from the cli dir, if there's an updated way to keep a local build up-to-date, let me know.

@sindresorhus
Copy link
Member

Should be fixed now. Thanks for the report :)

szinya pushed a commit to menthainternet/yeoman that referenced this issue Sep 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants