nikku / camunda-modeler-plugins-talk-2019

10 stars 2 forks source link

Creating Plugin Doesn't Replace ${UUID} #1

Closed philippfromme closed 5 years ago

philippfromme commented 5 years ago

After executing step 3 of the workshop and running npm run dev I get an error:

ERROR in ./client/bpmn-js-extension/index.js 18:17
Module parse failed: Unexpected token (18:17)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| export default {
|   __init__: [ 'pluginService_${UUID}' ],
>   pluginService_${UUID}: [ 'type', ExampleExtensionService ]
| };
|
 @ ./client/index.js 5:0-54 7:21-40

${UUID} hasn't been replaced when creating the plugin.

nikku commented 5 years ago

What's the version of the create plugin you're using?

npx create-camunda-modeler-plugin --version

philippfromme commented 5 years ago

0.0.5 which is the latest.

nikku commented 5 years ago

Works for me, must be a Windows issue. I assume other templates in README and package.json are not replaced, either?

philippfromme commented 5 years ago

All other templates are replaced. :shit:

philippfromme commented 5 years ago

I'm debugging it right now. replaceAdditional is never called with client\bpmn-js-extension\index.js.

nikku commented 5 years ago

Yes. Because of this line.

We need to normalize the path (replace \ with /) before testing for template replacement. I'll do it.

philippfromme commented 5 years ago

I just found it, too. Yes, we do.

nikku commented 5 years ago

Should be fixed with v0.0.6.

nikku commented 5 years ago

Same issue fixed with latest create-bpmnlint-plugin generator.