Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
js: upgraded jquery to the latest 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
vitoravelino committed Jan 24, 2018
1 parent b7765cb commit ec07d22
Show file tree
Hide file tree
Showing 13 changed files with 12,822 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"presets": [
"es2015"
["es2015", { "modules": false }]
],
"plugins": [
"lodash",
Expand Down
1 change: 0 additions & 1 deletion app/assets/javascripts/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'jquery';
import 'jquery-ujs';

// Bootstrap
Expand Down
2 changes: 0 additions & 2 deletions app/assets/javascripts/utils/typeahead.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Bloodhound from 'typeahead.js';

export const setTypeahead = function (el, url) {
$(el).typeahead('destroy');

Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/application.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ html

javascript:
window.API_URL = '//#{app_path}';
= javascript_include_tag("unmanaged")
= javascript_include_tag(*webpack_asset_paths("application"))
= yield :js_header

Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/authentication.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ html
meta content="/favicon/browserconfig.xml" name="msapplication-config"
meta content="#205683" name="theme-color"

= javascript_include_tag("unmanaged")
= javascript_include_tag(*webpack_asset_paths("application"))
= yield :js_header

Expand Down
1 change: 0 additions & 1 deletion app/views/layouts/errors.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ html
head
title Portus
= stylesheet_link_tag "application", media: "all"
= javascript_include_tag(*webpack_asset_paths("application"))
= csrf_meta_tags
meta content="width=device-width, initial-scale=1" name="viewport"
link href="/favicon/apple-touch-icon-57x57.png" rel="apple-touch-icon" sizes="57x57"
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/assets.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# frozen_string_literal: true

Rails.application.config.assets.version = "1.0"
Rails.application.config.assets.precompile += %w[*.woff2]
Rails.application.config.assets.precompile += %w[unmanaged.js *.woff2]
7 changes: 0 additions & 7 deletions config/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ var config = {
modules: false,
assets: true,
}),

// fix legacy jQuery plugins which depend on globals
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery',
}),
],

resolve: {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"compression-webpack-plugin": "^0.3.2",
"core-js": "^2.5.1",
"css-loader": "^0.28.1",
"jquery": "^2.2.1",
"jquery-ujs": "^1.2.1",
"lodash": "^4.17.4",
"moment": "^2.18.1",
Expand Down
Loading

0 comments on commit ec07d22

Please sign in to comment.