Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/ci/ci_lint/index.js')
-rw-r--r--app/assets/javascripts/ci/ci_lint/index.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/app/assets/javascripts/ci/ci_lint/index.js b/app/assets/javascripts/ci/ci_lint/index.js
new file mode 100644
index 00000000000..382059eb17e
--- /dev/null
+++ b/app/assets/javascripts/ci/ci_lint/index.js
@@ -0,0 +1,31 @@
+import Vue from 'vue';
+import VueApollo from 'vue-apollo';
+import createDefaultClient from '~/lib/graphql';
+import { resolvers } from '~/ci/pipeline_editor/graphql/resolvers';
+
+import CiLint from './components/ci_lint.vue';
+
+Vue.use(VueApollo);
+
+const apolloProvider = new VueApollo({
+ defaultClient: createDefaultClient(resolvers),
+});
+
+export default (containerId = '#js-ci-lint') => {
+ const containerEl = document.querySelector(containerId);
+ const { endpoint, lintHelpPagePath, pipelineSimulationHelpPagePath } = containerEl.dataset;
+
+ return new Vue({
+ el: containerEl,
+ apolloProvider,
+ render(createElement) {
+ return createElement(CiLint, {
+ props: {
+ endpoint,
+ lintHelpPagePath,
+ pipelineSimulationHelpPagePath,
+ },
+ });
+ },
+ });
+};