Skip to content

Fix #108 side effect#131

Open
stephanebachelier wants to merge 3 commits intogruntjs:mainfrom
stephanebachelier:fix-108-side-effect
Open

Fix #108 side effect#131
stephanebachelier wants to merge 3 commits intogruntjs:mainfrom
stephanebachelier:fix-108-side-effect

Conversation

@stephanebachelier
Copy link
Copy Markdown
Contributor

See #108 (comment) about #108 being backward incompatible with AMD namespace with dots.

@lostthetrail
Copy link
Copy Markdown

Cloned from comment in: #108

@stephanebachelier
Ah drat. I noticed something that might still be problematic.

If you have a function that returns a dot based namespace, you will still have the issue.

var myVar = 'FooVar';

namespace: function() {
    return 'Foo.Templates.' + myVar;
}

@lostthetrail
Copy link
Copy Markdown

@stephanebachelier No updates?

@stephanebachelier
Copy link
Copy Markdown
Contributor Author

@lostthetrail sorry did not had the time before to complete my patch. Will push an update tomorrow.

@lostthetrail
Copy link
Copy Markdown

@stephanebachelier Any updates?

@stephanebachelier
Copy link
Copy Markdown
Contributor Author

@lostthetrail I had issue to rebase my work on master.
Regarding a function which return dots, is the namespace function always returning the same value ?

Are you using the filename variable like this:

          namespace: function(filename) {
            return 'JST.templates.' + filename;
          }

@lostthetrail
Copy link
Copy Markdown

Not exactly your example.

grunt.config(['handlebars', namespace], {
   options: {
       namespace: function() {
           return 'MyBiz.template.' + namespace
       }
   },
   files: [...]
});

@stephanebachelier
Copy link
Copy Markdown
Contributor Author

@lostthetrail thank for you answer, I will add a test with your example.

@lostthetrail
Copy link
Copy Markdown

@stephanebachelier Did this ever happen?

Base automatically changed from master to main March 22, 2021 15:15
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

Successfully merging this pull request may close these issues.

2 participants