Permalink
Please
sign in to comment.
Showing
with
616 additions
and 178 deletions.
- +1 −0 .browserslistrc
- +7 −0 .gitignore
- +5 −4 Gemfile
- +76 −62 Gemfile.lock
- +18 −0 app/javascript/packs/application.js
- +72 −0 babel.config.js
- +1 −6 bin/rails
- +0 −5 bin/rake
- +18 −14 bin/setup
- +19 −0 bin/webpack
- +19 −0 bin/webpack-dev-server
- +8 −14 config/application.rb
- +2 −2 config/boot.rb
- +10 −0 config/cable.yml
- +1 −1 config/environment.rb
- +32 −16 config/environments/development.rb
- +53 −19 config/environments/production.rb
- +23 −12 config/environments/test.rb
- +8 −0 config/initializers/application_controller_renderer.rb
- +4 −3 config/initializers/assets.rb
- +1 −1 config/initializers/console.rb
- +28 −0 config/initializers/content_security_policy.rb
- +2 −0 config/initializers/cookies_serializer.rb
- +1 −1 config/initializers/mime_types.rb
- +2 −2 config/initializers/wrap_parameters.rb
- +11 −1 config/locales/en.yml
- +6 −0 config/spring.rb
- +34 −0 config/storage.yml
- +5 −0 config/webpack/development.js
- +3 −0 config/webpack/environment.js
- +5 −0 config/webpack/production.js
- +5 −0 config/webpack/test.js
- +95 −0 config/webpacker.yml
- +10 −0 ...0820143831_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.active_storage.rb
- +9 −9 db/schema.rb
- +5 −3 lib/tasks/utils.rake
- +5 −3 lib/util/console_extensions.rb
- +12 −0 postcss.config.js
@@ -0,0 +1 @@ | ||
defaults |
@@ -0,0 +1,18 @@ | ||
/* eslint no-console:0 */ | ||
// This file is automatically compiled by Webpack, along with any other files | ||
// present in this directory. You're encouraged to place your actual application logic in | ||
// a relevant structure within app/javascript and only use these pack files to reference | ||
// that code so it'll be compiled. | ||
// | ||
// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate | ||
// layout file, like app/views/layouts/application.html.erb | ||
|
||
|
||
// 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') |
@@ -0,0 +1,72 @@ | ||
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 && [ | ||
require('@babel/preset-env').default, | ||
{ | ||
targets: { | ||
node: 'current' | ||
} | ||
} | ||
], | ||
(isProductionEnv || isDevelopmentEnv) && [ | ||
require('@babel/preset-env').default, | ||
{ | ||
forceAllTransforms: true, | ||
useBuiltIns: 'entry', | ||
corejs: 3, | ||
modules: false, | ||
exclude: ['transform-typeof-symbol'] | ||
} | ||
] | ||
].filter(Boolean), | ||
plugins: [ | ||
require('babel-plugin-macros'), | ||
require('@babel/plugin-syntax-dynamic-import').default, | ||
isTestEnv && require('babel-plugin-dynamic-import-node'), | ||
require('@babel/plugin-transform-destructuring').default, | ||
[ | ||
require('@babel/plugin-proposal-class-properties').default, | ||
{ | ||
loose: true | ||
} | ||
], | ||
[ | ||
require('@babel/plugin-proposal-object-rest-spread').default, | ||
{ | ||
useBuiltIns: true | ||
} | ||
], | ||
[ | ||
require('@babel/plugin-transform-runtime').default, | ||
{ | ||
helpers: false, | ||
regenerator: true, | ||
corejs: false | ||
} | ||
], | ||
[ | ||
require('@babel/plugin-transform-regenerator').default, | ||
{ | ||
async: false | ||
} | ||
] | ||
].filter(Boolean) | ||
} | ||
} |
@@ -1,9 +1,4 @@ | ||
#!/usr/bin/env ruby | ||
begin | ||
load File.expand_path('../spring', __FILE__) | ||
rescue LoadError => e | ||
raise unless e.message.include?('spring') | ||
end | ||
APP_PATH = File.expand_path('../../config/application', __FILE__) | ||
APP_PATH = File.expand_path('../config/application', __dir__) | ||
require_relative '../config/boot' | ||
require 'rails/commands' |
Oops, something went wrong.
0 comments on commit
710d6dd