discourse/lib/generators/plugin/templates/javascript.es6.erb
Joffrey JAFFEUX d40d241e72
DEV: adds --help --no-help options to plugin generator (#6338)
help will add helpful comments in the various generated files
2018-08-30 12:16:37 +02:00

17 lines
399 B
Plaintext

import { withPluginApi } from "discourse/lib/plugin-api";
function initialize<%= classified_name %>(api) {
<% if @options['help'] %>
// see app/assets/javascripts/discourse/lib/plugin-api
// for the functions available via the api object
<% end %>
}
export default {
name: "<%= dasherized_name %>",
initialize() {
withPluginApi("0.8.24", initialize<%= classified_name %>);
}
};