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

Add example for custom modules #25

Open
philippfromme opened this issue Apr 26, 2016 · 1 comment
Open

Add example for custom modules #25

philippfromme opened this issue Apr 26, 2016 · 1 comment
Labels
backlog Queued in backlog documentation Improvements or additions to documentation good first issue Good for newcomers spring cleaning Could be cleaned up one day

Comments

@philippfromme
Copy link
Contributor

When I implemented an example project for bpmn-js that uses an additional module I was wondering about the array sytax which you are required to use in order to make it work. As a developer who doesn't know about the internal workings of bpmn-js it might be overwhelming having to use the array syntax for something as simple as providing a different translation function for i18n. At least this is what I experienced.

Instead of just saying

var customTranslate = require('./customTranslate);

//...

additionalModules: {
  translate: customTranslate
}

I had to write

var customTranslate = {
  translate: [ 'value', require('./customTranslate/customTranslate') ]
};

//...

additionalModules: {
  translate: customTranslate
}

and figuring out what 'value' means took me even longer. An example project that shows how to use additional modules the right way would be a great addition.

@nikku nikku modified the milestone: Backlog May 2, 2016
@nikku
Copy link
Member

nikku commented Jun 2, 2016

This should give an introduction into module overrides, too. Cf. forum thread.

@nikku nikku added the backlog Queued in backlog label Feb 14, 2018
@nikku nikku removed this from the Backlog milestone Feb 14, 2018
@barmac barmac added the good first issue Good for newcomers label Sep 1, 2021
@nikku nikku added documentation Improvements or additions to documentation spring cleaning Could be cleaned up one day labels Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Queued in backlog documentation Improvements or additions to documentation good first issue Good for newcomers spring cleaning Could be cleaned up one day
Development

No branches or pull requests

3 participants