5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 16:06:23 +00:00

actualizar webpacker

This commit is contained in:
f 2020-11-19 20:35:29 -03:00
parent 207d1f6732
commit b5be8299d9
11 changed files with 1923 additions and 1247 deletions

7
.gitignore vendored
View file

@ -48,3 +48,10 @@ yarn-debug.log*
*.key *.key
*.crt *.crt
/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity

View file

@ -1,5 +1,5 @@
AllCops: AllCops:
TargetRubyVersion: '2.6' TargetRubyVersion: '2.7'
Style/AsciiComments: Style/AsciiComments:
Enabled: false Enabled: false

View file

@ -178,7 +178,7 @@ GEM
netaddr (>= 2.0.4, < 3) netaddr (>= 2.0.4, < 3)
simpleidn simpleidn
errbase (0.2.0) errbase (0.2.0)
erubi (1.9.0) erubi (1.10.0)
eventmachine (1.2.7) eventmachine (1.2.7)
exception_notification (4.4.3) exception_notification (4.4.3)
actionmailer (>= 4.0, < 7) actionmailer (>= 4.0, < 7)
@ -531,7 +531,7 @@ GEM
turbolinks (5.2.1) turbolinks (5.2.1)
turbolinks-source (~> 5.2) turbolinks-source (~> 5.2)
turbolinks-source (5.2.0) turbolinks-source (5.2.0)
tzinfo (1.2.7) tzinfo (1.2.8)
thread_safe (~> 0.1) thread_safe (~> 0.1)
uglifier (4.2.0) uglifier (4.2.0)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
@ -559,7 +559,7 @@ GEM
websocket-extensions (0.1.5) websocket-extensions (0.1.5)
xpath (3.2.0) xpath (3.2.0)
nokogiri (~> 1.8) nokogiri (~> 1.8)
zeitwerk (2.4.0) zeitwerk (2.4.1)
PLATFORMS PLATFORMS
ruby ruby

View file

@ -9,23 +9,19 @@ assets := package.json yarn.lock $(shell find app/assets/ app/javascript/ -type
alpine_version := 3.12 alpine_version := 3.12
public/assets-production: $(assets) public/assets-production/: $(assets)
rm -rf $@ RAILS_ENV=production bundle exec rake assets:precompile webpacker:compile assets:clean
RAILS_ENV=production bundle exec rake assets:precompile rsync --delete-after -a public/assets/ $@
mv public/assets $@
find $@ -type f -name "*.gz" | sed -re "s/\.gz$$//" | xargs -r brotli -k -9 find $@ -type f -name "*.gz" | sed -re "s/\.gz$$//" | xargs -r brotli -k -9
public/packs-production: public/packs public/packs-production/: public/packs/
rm -rf $@ rsync -a --delete-after $< $@
mv $< $@ find $@ -type f -name "*.gz" | sed -re "s/\.gz$$//" | xargs -r brotli -k -9
find $@ -type f | xargs -r brotli -k -9
mkdir -p $<
touch $@
assets: public/assets-production public/packs-production assets: public/assets-production/ public/packs-production/
serve: serve:
bundle exec rails s -b "ssl://0.0.0.0:3000?key=config/sutty.local.key&cert=config/sutty.local.crt" bundle exec rails s -b "ssl://0.0.0.0:3000?key=../sutty.local/domain/sutty.local.key&cert=../sutty.local/domain/sutty.local.crt"
# Limpiar los archivos de testeo # Limpiar los archivos de testeo
clean: clean:

View file

@ -15,6 +15,9 @@
// const images = require.context('../images', true) // const images = require.context('../images', true)
// const imagePath = (name) => images(name, true) // const imagePath = (name) => images(name, true)
import 'core-js/stable'
import 'regenerator-runtime/runtime'
import { Application } from 'stimulus' import { Application } from 'stimulus'
import { definitionsFromContext } from "stimulus/webpack-helpers" import { definitionsFromContext } from "stimulus/webpack-helpers"

View file

@ -1,5 +1,3 @@
import 'core-js/stable'
import 'regenerator-runtime/runtime'
import { Controller } from 'stimulus' import { Controller } from 'stimulus'
require("leaflet/dist/leaflet.css") require("leaflet/dist/leaflet.css")

View file

@ -1,5 +1,3 @@
import 'core-js/stable'
import 'regenerator-runtime/runtime'
import { Controller } from 'stimulus' import { Controller } from 'stimulus'
/* /*

View file

@ -18,7 +18,7 @@ module.exports = function(api) {
return { return {
presets: [ presets: [
isTestEnv && [ isTestEnv && [
require('@babel/preset-env').default, '@babel/preset-env',
{ {
targets: { targets: {
node: 'current' node: 'current'
@ -26,7 +26,7 @@ module.exports = function(api) {
} }
], ],
(isProductionEnv || isDevelopmentEnv) && [ (isProductionEnv || isDevelopmentEnv) && [
require('@babel/preset-env').default, '@babel/preset-env',
{ {
forceAllTransforms: true, forceAllTransforms: true,
useBuiltIns: 'entry', useBuiltIns: 'entry',
@ -37,32 +37,30 @@ module.exports = function(api) {
] ]
].filter(Boolean), ].filter(Boolean),
plugins: [ plugins: [
require('babel-plugin-macros'), 'babel-plugin-macros',
require('@babel/plugin-syntax-dynamic-import').default, '@babel/plugin-syntax-dynamic-import',
isTestEnv && require('babel-plugin-dynamic-import-node'), isTestEnv && 'babel-plugin-dynamic-import-node',
require('@babel/plugin-transform-destructuring').default, '@babel/plugin-transform-destructuring',
[ [
require('@babel/plugin-proposal-class-properties').default, '@babel/plugin-proposal-class-properties',
{ {
loose: true loose: true
} }
], ],
[ [
require('@babel/plugin-proposal-object-rest-spread').default, '@babel/plugin-proposal-object-rest-spread',
{ {
useBuiltIns: true useBuiltIns: true
} }
], ],
[ [
require('@babel/plugin-transform-runtime').default, '@babel/plugin-transform-runtime',
{ {
helpers: false, helpers: false
regenerator: true,
corejs: false
} }
], ],
[ [
require('@babel/plugin-transform-regenerator').default, '@babel/plugin-transform-regenerator',
{ {
async: false async: false
} }

View file

@ -6,12 +6,11 @@ default: &default
public_root_path: public public_root_path: public
public_output_path: packs public_output_path: packs
cache_path: tmp/cache/webpacker cache_path: tmp/cache/webpacker
check_yarn_integrity: false webpack_compile_output: true
webpack_compile_output: false
# Additional paths webpack should lookup modules # Additional paths webpack should lookup modules
# ['app/assets', 'engine/foo/app/assets'] # ['app/assets', 'engine/foo/app/assets']
resolved_paths: [] additional_paths: []
# Reload manifest.json on all requests so we reload latest compiled packs # Reload manifest.json on all requests so we reload latest compiled packs
cache_manifest: false cache_manifest: false
@ -52,9 +51,6 @@ development:
<<: *default <<: *default
compile: true compile: true
# Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules
check_yarn_integrity: true
# Reference: https://webpack.js.org/configuration/dev-server/ # Reference: https://webpack.js.org/configuration/dev-server/
dev_server: dev_server:
https: true https: true
@ -69,6 +65,7 @@ development:
disable_host_check: true disable_host_check: true
use_local_ip: false use_local_ip: false
quiet: false quiet: false
pretty: false
headers: headers:
'Access-Control-Allow-Origin': '*' 'Access-Control-Allow-Origin': '*'
watch_options: watch_options:

View file

@ -3,7 +3,7 @@
"private": true, "private": true,
"dependencies": { "dependencies": {
"@rails/actiontext": "^6.0.0", "@rails/actiontext": "^6.0.0",
"@rails/webpacker": "^4.0.7", "@rails/webpacker": "5.2.1",
"commonmark": "^0.29.0", "commonmark": "^0.29.0",
"input-map": "git+https://0xacab.org/sutty/input-map.git", "input-map": "git+https://0xacab.org/sutty/input-map.git",
"input-tag": "git+https://0xacab.org/sutty/input-tag.git", "input-tag": "git+https://0xacab.org/sutty/input-tag.git",
@ -15,6 +15,6 @@
"zepto": "^1.2.0" "zepto": "^1.2.0"
}, },
"devDependencies": { "devDependencies": {
"webpack-dev-server": "^3.8.0" "webpack-dev-server": "^3.11.0"
} }
} }

3091
yarn.lock

File diff suppressed because it is too large Load diff