Skip to content
This repository has been archived by the owner on Sep 19, 2020. It is now read-only.

Commit

Permalink
chore: remove assets and setup webpacker
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewmcodes committed Sep 19, 2020
1 parent b2aa349 commit 54c3fac
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 44 deletions.
2 changes: 0 additions & 2 deletions app/assets/config/manifest.js

This file was deleted.

Empty file removed app/assets/images/.keep
Empty file.
15 changes: 0 additions & 15 deletions app/assets/stylesheets/application.css

This file was deleted.

4 changes: 1 addition & 3 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
<title>EvilMartiansModernRails</title>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>

<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>

<body>
<%= yield %>
</body>
Expand Down
9 changes: 6 additions & 3 deletions config/application.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative 'boot'
require_relative "boot"

require "rails"
# Pick the frameworks you want:
Expand Down Expand Up @@ -29,7 +29,10 @@ class Application < Rails::Application
# -- all .rb files in that directory are automatically loaded after loading
# the framework and any gems in your application.

# Don't generate system test files.
config.generators.system_tests = nil
config.generators do |g|
g.assets = nil
g.test_framework = nil
g.helper = nil
end
end
end
24 changes: 3 additions & 21 deletions config/webpacker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ default: &default
# Additional paths webpack should lookup modules
# ['app/assets', 'engine/foo/app/assets']
resolved_paths: []

# Reload manifest.json on all requests so we reload latest compiled packs
cache_manifest: false

# Extract and emit a css file
extract_css: false

static_assets_extensions:
Expand All @@ -38,6 +34,7 @@ default: &default
- .js
- .sass
- .scss
- .pcss
- .css
- .module.sass
- .module.scss
Expand All @@ -51,18 +48,12 @@ default: &default
development:
<<: *default
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/
dev_server:
https: false
host: localhost
port: 3035
public: localhost:3035
hmr: false
# Inline should be set to true if using HMR
inline: true
overlay: true
compress: true
Expand All @@ -71,26 +62,17 @@ development:
quiet: false
pretty: false
headers:
'Access-Control-Allow-Origin': '*'
"Access-Control-Allow-Origin": "*"
watch_options:
ignored: '**/node_modules/**'

ignored: "**/node_modules/**"

test:
<<: *default
compile: true

# Compile test packs to a separate directory
public_output_path: packs-test

production:
<<: *default

# Production depends on precompilation of packs prior to booting for performance.
compile: false

# Extract and emit a css file
extract_css: true

# Cache manifest.json for performance
cache_manifest: true

0 comments on commit 54c3fac

Please sign in to comment.