Commit 254c43fb authored by Clement Ho's avatar Clement Ho Committed by Jacob Schatz

Remove snippet bundle webpack entry point

parent 11196289
import initSnippet from '~/snippet/snippet_bundle';
import initForm from '~/pages/projects/init_form'; import initForm from '~/pages/projects/init_form';
document.addEventListener('DOMContentLoaded', () => initForm($('.snippet-form'))); document.addEventListener('DOMContentLoaded', () => {
initSnippet();
initForm($('.snippet-form'));
});
import initSnippet from '~/snippet/snippet_bundle';
import initForm from '~/pages/projects/init_form'; import initForm from '~/pages/projects/init_form';
document.addEventListener('DOMContentLoaded', () => initForm($('.snippet-form'))); document.addEventListener('DOMContentLoaded', () => {
initSnippet();
initForm($('.snippet-form'));
});
import initSnippet from '~/snippet/snippet_bundle';
import form from '../form'; import form from '../form';
document.addEventListener('DOMContentLoaded', form); document.addEventListener('DOMContentLoaded', () => {
initSnippet();
form();
});
import initSnippet from '~/snippet/snippet_bundle';
import form from '../form'; import form from '../form';
document.addEventListener('DOMContentLoaded', form); document.addEventListener('DOMContentLoaded', () => {
initSnippet();
form();
});
/* eslint-disable func-names, space-before-function-paren, prefer-arrow-callback, no-var, quotes, max-len */
/* global ace */ /* global ace */
(function() { export default () => {
$(function() { const editor = ace.edit('editor');
var editor = ace.edit("editor");
$(".snippet-form-holder form").on('submit', function() { $('.snippet-form-holder form').on('submit', () => {
$(".snippet-file-content").val(editor.getValue()); $('.snippet-file-content').val(editor.getValue());
});
}); });
}).call(window); };
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag('lib/ace.js') = page_specific_javascript_tag('lib/ace.js')
= webpack_bundle_tag('snippet')
.snippet-form-holder .snippet-form-holder
= form_for @snippet, url: url, html: { class: "form-horizontal snippet-form js-requires-input js-quick-submit common-note-form" } do |f| = form_for @snippet, url: url, html: { class: "form-horizontal snippet-form js-requires-input js-quick-submit common-note-form" } do |f|
......
...@@ -59,7 +59,6 @@ function generateEntries() { ...@@ -59,7 +59,6 @@ function generateEntries() {
protected_branches: './protected_branches', protected_branches: './protected_branches',
protected_tags: './protected_tags', protected_tags: './protected_tags',
registry_list: './registry/index.js', registry_list: './registry/index.js',
snippet: './snippet/snippet_bundle.js',
sketch_viewer: './blob/sketch_viewer.js', sketch_viewer: './blob/sketch_viewer.js',
stl_viewer: './blob/stl_viewer.js', stl_viewer: './blob/stl_viewer.js',
terminal: './terminal/terminal_bundle.js', terminal: './terminal/terminal_bundle.js',
......
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