diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index 5be8b83db..475b7f90c 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -1,6 +1,6 @@ /* eslint no-console:0 */ -function importAll (r) { +function importAll(r) { r.keys().forEach(r); } @@ -28,3 +28,10 @@ require("jquery-ui/themes/base/theme.css"); importAll(require.context('../src/javascripts', true, /\.js(\.erb)?$/)); importAll(require.context('../src/styles/common', true, /\.scss(?:\.erb)?$/)); importAll(require.context('../src/styles/specific', true, /\.scss(?:\.erb)?$/)); + +// export { default as Autocomplete } from '../src/javascripts/autocomplete.js.erb'; +export { default as Blacklist } from '../src/javascripts/blacklists.js'; +export { default as Comment } from '../src/javascripts/comments.js'; +export { default as Dtext } from '../src/javascripts/dtext.js'; +export { default as Note } from '../src/javascripts/notes.js'; +export { default as PostModeMenu } from '../src/javascripts/post_mode_menu.js'; diff --git a/app/logical/upload_service/preprocessor.rb b/app/logical/upload_service/preprocessor.rb index de1384d26..ba268ec78 100644 --- a/app/logical/upload_service/preprocessor.rb +++ b/app/logical/upload_service/preprocessor.rb @@ -105,7 +105,8 @@ class UploadService def finish!(upload = nil) pred = upload || self.predecessor() - # regardless of who initialized the upload, credit should goto whoever submitted the form + # regardless of who initialized the upload, credit should + # goto whoever submitted the form pred.initialize_attributes # we went through a lot of trouble normalizing the source, diff --git a/config/webpack/environment.js b/config/webpack/environment.js index 5c37894c0..c3e1a3bd6 100644 --- a/config/webpack/environment.js +++ b/config/webpack/environment.js @@ -16,6 +16,8 @@ environment.loaders.append('scss.erb', { environment.loaders.append('erb', erb); +environment.config.output.library = ["Danbooru"]; + environment.config.externals = { jquery: "jQuery" }