collective / collective/generator-plonemockup

Grunt fails if project name is malformed

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
>> Tracing dependencies for: node_modules/almond/almond.js
[Error: Error: Parse error using esprima for file: /trabajo/collective/test_generator/js/bundles/bundle.js
Error: Line 19: Unexpected identifier
at /trabajo/collective/test_generator/node_modules/grunt-contrib-requirejs/node_modules/requirejs/bin/r.js:23452:47
```

_bundle.js needs to correctly sanitize the bundle variable name, to not include illegal characters, such as spaces.

in https://github.com/collective/generator-plonemockup/blob/91305ea844c0c777664378bcaf27478a5d87881e/app/templates/js/bundles/_bundle.js#L27

and

https://github.com/collective/generator-plonemockup/blob/91305ea844c0c777664378bcaf27478a5d87881e/app/templates/js/bundles/_bundle.js#L36

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with app/templates/js/bundles/_bundle.js at the referenced lines and reproduce the failure using a project name containing spaces or other illegal characters. Done means the generated bundle variable name is valid JavaScript and Grunt completes without the esprima parse error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.