Skip to content

Commit

Permalink
Webpack clean install
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian Kaczmarczyk committed May 7, 2021
1 parent 4f07f70 commit c5904c9
Show file tree
Hide file tree
Showing 18 changed files with 1,285 additions and 3,500 deletions.
22 changes: 0 additions & 22 deletions .babelrc

This file was deleted.

2 changes: 1 addition & 1 deletion .browserslistrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
> 1%
defaults
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ node_modules
/node_modules
yarn-debug.log*
.yarn-integrity
/yarn-error.log
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v12.14.1
v16
89 changes: 62 additions & 27 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,24 @@ GEM
rake
thor (>= 0.14.0)
ast (2.4.2)
async (1.29.0)
console (~> 1.10)
nio4r (~> 2.3)
timers (~> 4.1)
async-http (0.56.1)
async (~> 1.25)
async-io (~> 1.28)
async-pool (~> 0.2)
protocol-http (~> 0.22.0)
protocol-http1 (~> 0.14.0)
protocol-http2 (~> 0.14.0)
async-http-faraday (0.9.0)
async-http (~> 0.42)
faraday
async-io (1.30.2)
async (~> 1.14)
async-pool (0.3.5)
async (~> 1.25)
autoprefixer-rails (10.2.4.0)
execjs
awesome_nested_set (3.4.0)
Expand Down Expand Up @@ -108,7 +126,7 @@ GEM
popper_js (>= 1.14.3, < 2)
sassc-rails (>= 2.0.0)
builder (3.2.4)
bullet (6.1.3)
bullet (6.1.4)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
camertron-eprun (1.1.1)
Expand Down Expand Up @@ -142,7 +160,9 @@ GEM
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.8)
connection_pool (2.2.3)
connection_pool (2.2.5)
console (1.12.0)
fiber-local
crack (0.4.5)
rexml
crass (1.0.6)
Expand All @@ -155,7 +175,7 @@ GEM
activerecord (>= 5.a)
database_cleaner-core (~> 2.0.0)
database_cleaner-core (2.0.1)
devise (4.7.3)
devise (4.8.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
Expand All @@ -175,36 +195,43 @@ GEM
execjs (2.7.0)
factory_bot (4.11.1)
activesupport (>= 3.0.0)
faraday (1.3.0)
faraday (1.4.1)
faraday-excon (~> 1.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
multipart-post (>= 1.2, < 3)
ruby2_keywords
ruby2_keywords (>= 0.0.4)
faraday-excon (1.1.0)
faraday-http-cache (2.2.0)
faraday (>= 0.8)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.1.0)
ffaker (2.18.0)
ffi (1.15.0)
fiber-local (1.0.0)
flamegraph (0.9.5)
flatpickr (4.6.6.0)
flipper (0.20.3)
flipper-active_record (0.20.3)
flipper (0.20.4)
flipper-active_record (0.20.4)
activerecord (>= 5.0, < 7)
flipper (~> 0.20.3)
flipper-redis (0.20.3)
flipper (~> 0.20.3)
flipper (~> 0.20.4)
flipper-redis (0.20.4)
flipper (~> 0.20.4)
redis (>= 2.2, < 5)
flipper-ui (0.20.3)
flipper-ui (0.20.4)
erubi (>= 1.0.0, < 2.0.0)
flipper (~> 0.20.3)
flipper (~> 0.20.4)
rack (>= 1.4, < 3)
rack-protection (>= 1.5.3, < 2.2.0)
font_assets (0.1.14)
rack
friendly_id (5.4.2)
activerecord (>= 4.0.0)
gem-release (2.2.1)
github_changelog_generator (1.15.2)
github_changelog_generator (1.16.2)
activesupport
async (>= 1.25.0)
async-http-faraday
faraday-http-cache
multi_json
octokit (~> 4.6)
Expand All @@ -219,7 +246,7 @@ GEM
htmlentities (4.3.4)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
i18n-js (3.8.1)
i18n-js (3.8.2)
i18n (>= 0.6.6)
i18n_data (0.13.0)
image_processing (1.12.1)
Expand Down Expand Up @@ -292,14 +319,14 @@ GEM
nokogiri (1.11.3)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
octokit (4.20.0)
octokit (4.21.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
orm_adapter (0.5.0)
parallel (1.20.1)
paranoia (2.4.3)
activerecord (>= 4.0, < 6.2)
parser (3.0.0.0)
parser (3.0.1.1)
ast (~> 2.4.1)
pg (1.2.3)
popper_js (1.16.0)
Expand All @@ -310,7 +337,14 @@ GEM
premailer-rails (1.11.1)
actionmailer (>= 3)
premailer (~> 1.7, >= 1.7.9)
pry (0.14.0)
protocol-hpack (1.4.2)
protocol-http (0.22.0)
protocol-http1 (0.14.0)
protocol-http (~> 0.22)
protocol-http2 (0.14.2)
protocol-hpack (~> 1.4)
protocol-http (~> 0.18)
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6)
Expand Down Expand Up @@ -407,21 +441,21 @@ GEM
rspec-support (3.10.2)
rspec_junit_formatter (0.4.1)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.11.0)
rubocop (1.14.0)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.2.0, < 2.0)
rubocop-ast (>= 1.5.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.4.1)
parser (>= 2.7.1.5)
rubocop-rails (2.9.1)
rubocop-ast (1.5.0)
parser (>= 3.0.1.1)
rubocop-rails (2.10.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 0.90.0, < 2.0)
rubocop (>= 1.7.0, < 2.0)
ruby-progressbar (1.11.0)
ruby-vips (2.1.0)
ffi (~> 1.12)
Expand Down Expand Up @@ -455,7 +489,7 @@ GEM
ruby_http_client (~> 3.4)
sentry-raven (3.1.2)
faraday (>= 1.0)
sidekiq (6.2.0)
sidekiq (6.2.1)
connection_pool (>= 2.2.2)
rack (~> 2.0)
redis (>= 4.2.0)
Expand Down Expand Up @@ -582,7 +616,7 @@ GEM
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
stackprof (0.2.16)
stackprof (0.2.17)
state_machines (0.5.0)
state_machines-activemodel (0.8.0)
activemodel (>= 5.1)
Expand All @@ -595,6 +629,7 @@ GEM
thor (1.1.0)
tilt (2.0.10)
timecop (0.9.4)
timers (4.3.3)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
Expand All @@ -607,7 +642,7 @@ GEM
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.0.0)
uniform_notifier (1.13.2)
uniform_notifier (1.14.2)
vcr (6.0.0)
warden (1.2.9)
rack (>= 2.0.9)
Expand All @@ -620,7 +655,7 @@ GEM
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (>= 3.0, < 4.0)
webmock (3.11.3)
webmock (3.12.2)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
Expand Down
12 changes: 9 additions & 3 deletions app/javascript/packs/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate
// layout file, like app/views/layouts/application.html.erb

// Support component names which are placed under containers alias folder name
import 'core-js/stable'
import 'regenerator-runtime/runtime'

// Uncomment to copy all static images under ../images to the output folder and reference
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
// or the `imagePath` JavaScript helper below.
//
// const images = require.context('../images', true)
// const imagePath = (name) => images(name, true)

console.log('Hello World from Webpacker')
70 changes: 70 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
module.exports = function(api) {
var validEnv = ['development', 'test', 'production']
var currentEnv = api.env()
var isDevelopmentEnv = api.env('development')
var isProductionEnv = api.env('production')
var isTestEnv = api.env('test')

if (!validEnv.includes(currentEnv)) {
throw new Error(
'Please specify a valid `NODE_ENV` or ' +
'`BABEL_ENV` environment variables. Valid values are "development", ' +
'"test", and "production". Instead, received: ' +
JSON.stringify(currentEnv) +
'.'
)
}

return {
presets: [
isTestEnv && [
'@babel/preset-env',
{
targets: {
node: 'current'
}
}
],
(isProductionEnv || isDevelopmentEnv) && [
'@babel/preset-env',
{
forceAllTransforms: true,
useBuiltIns: 'entry',
corejs: 3,
modules: false,
exclude: ['transform-typeof-symbol']
}
]
].filter(Boolean),
plugins: [
'babel-plugin-macros',
'@babel/plugin-syntax-dynamic-import',
isTestEnv && 'babel-plugin-dynamic-import-node',
'@babel/plugin-transform-destructuring',
[
'@babel/plugin-proposal-class-properties',
{
loose: true
}
],
[
'@babel/plugin-proposal-object-rest-spread',
{
useBuiltIns: true
}
],
[
'@babel/plugin-transform-runtime',
{
helpers: false
}
],
[
'@babel/plugin-transform-regenerator',
{
async: false
}
]
].filter(Boolean)
}
}
2 changes: 1 addition & 1 deletion bin/start
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker-compose up
docker compose up
1 change: 0 additions & 1 deletion bin/webpack
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require "rubygems"
require "bundler/setup"

require "webpacker"
Expand Down
1 change: 0 additions & 1 deletion bin/webpack-dev-server
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require "rubygems"
require "bundler/setup"

require "webpacker"
Expand Down
19 changes: 0 additions & 19 deletions config/webpack/custom.js

This file was deleted.

4 changes: 1 addition & 3 deletions config/webpack/development.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
process.env.NODE_ENV = process.env.NODE_ENV || 'development'

const merge = require('webpack-merge')
const environment = require('./environment')
const customConfig = require('./custom')

module.exports = merge(environment.toWebpackConfig(), customConfig)
module.exports = environment.toWebpackConfig()
Loading

0 comments on commit c5904c9

Please sign in to comment.