jvandemo / generator-angularjs-library

A generator for Yeoman to generate the boilerplate for creating an AngularJS library
117 stars 33 forks source link

Generator crashes -- SyntaxError: Unexpected token %= #18

Closed johnhoffman closed 9 years ago

johnhoffman commented 9 years ago

I installed v1.4.0 from tarball:

sudo npm install -g https://github.com/jvandemo/generator-angularjs-library/archive/v1.4.0.tar.gz

Then I ran the generator

yo angularjs-library

This was the output:

     _-----_
    |       |
    |--(o)--|   .--------------------------.
   `---------´  |    Welcome to Yeoman,    |
    ( _´U`_ )   |   ladies and gentlemen!  |
    /___A___\   '__________________________'
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

? 

********************************************************************************
Before we get started, let me verify your personal details:
********************************************************************************

Don't worry, I wont stalk you, send you spam or look you up on the internet.

I only use your personal details to automatically populate the author fields in
bower.json, package.json and to mention you as the owner in the LICENSE.txt file.

Your full name: John Doe
? Your email address: john.doe@example.com
? 

********************************************************************************
Awesome, so how would you like to call your AngularJS library:
********************************************************************************

You can use spaces and capitals.

The full library name is used in documentation e.g. "Your Library".

It is automatically camelized as module name in AngularJS e.g. "yourLibrary"
and slugified for file and package names e.g. "your-library.js":

Library name: test-library
? Would you like to include a directives module? No
? Would you like to include a filters module? No
? Would you like to include a services module? Yes
? Would you like to include the angular-resource module? No
? Would you like to include the angular-cookies module? No
? Would you like to include the angular-sanitize module? No

events.js:72
        throw er; // Unhandled 'error' event
              ^
SyntaxError: Unexpected token %=
    at Function (<anonymous>)
    at Function.template (/usr/local/lib/node_modules/generator-angularjs-library/node_modules/yeoman-generator/node_modules/lodash/dist/lodash.js:6305:22)
    at copy.process (/usr/local/lib/node_modules/generator-angularjs-library/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/copy-tpl.js:11:16)
    at applyProcessingFunc (/usr/local/lib/node_modules/generator-angularjs-library/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/copy.js:11:16)
    at EditionInterface.exports._copySingle (/usr/local/lib/node_modules/generator-angularjs-library/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/copy.js:51:24)
    at EditionInterface.exports.copy (/usr/local/lib/node_modules/generator-angularjs-library/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/copy.js:22:17)
    at EditionInterface.module.exports [as copyTpl] (/usr/local/lib/node_modules/generator-angularjs-library/node_modu
jvandemo commented 9 years ago

I will try to reproduce and troubleshoot this.

Thanks for reporting @johnhoffman!

jvandemo commented 9 years ago

@johnhoffman Can you try the latest version (2.0.0)? Thanks

johnhoffman commented 9 years ago

I just updated to the latest version and it's fixed. Thanks, @jvandemo!

jvandemo commented 9 years ago

Thanks for the confirmation @johnhoffman, much appreciated again!