Commit bec0f26f authored by Justin Ho Tuan Duong's avatar Justin Ho Tuan Duong Committed by Mike Greiling

Add Webpack setup for Jira Connect app

- Create a separate JS bundle for jira_connect
- Add ESLint
parent de852bce
globals:
AP: readonly
rules:
'@gitlab/require-i18n-strings': off
'@gitlab/vue-require-i18n-strings': off
<script>
export default {};
</script>
<template>
<div></div>
</template>
import Vue from 'vue';
import App from './components/app.vue';
function initJiraConnect() {
const el = document.querySelector('.js-jira-connect-app');
return new Vue({
el,
render(createElement) {
return createElement(App, {});
},
});
}
document.addEventListener('DOMContentLoaded', initJiraConnect);
@import 'framework/variables';
@import 'mixins_and_variables_and_functions';
// We should only import styles that we actually use.
// @import '@gitlab/ui/src/scss/gitlab_ui';
$atlaskit-border-color: #dfe1e6;
......
......@@ -21,6 +21,8 @@
.gl-mt-5
%p Note: this integration only works with accounts on GitLab.com (SaaS).
- else
.js-jira-connect-app
%form#add-subscription-form.subscription-form{ action: jira_connect_subscriptions_path }
.ak-field-group
%label
......@@ -57,5 +59,8 @@
or enable cross-site cookies in your browser when adding a namespace.
%a{ href: 'https://gitlab.com/gitlab-org/gitlab/-/issues/263509', target: '_blank', rel: 'noopener noreferrer' } Learn more
= webpack_bundle_tag 'performance_bar' if performance_bar_enabled?
= webpack_bundle_tag 'jira_connect_app'
= page_specific_javascript_tag('jira_connect.js')
- add_page_specific_style 'page_bundles/jira_connect'
......@@ -82,6 +82,7 @@ function generateEntries() {
// sentry: './sentry/index.js', Temporarily commented out to investigate performance: https://gitlab.com/gitlab-org/gitlab/-/issues/251179
performance_bar: './performance_bar/index.js',
chrome_84_icon_fix: './lib/chrome_84_icon_fix.js',
jira_connect_app: './jira_connect/index.js',
};
return Object.assign(manualEntries, autoEntries);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment