railman 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/lib/railman/version.rb +1 -1
  3. data/railman.gemspec +0 -2
  4. data/templates/rails_app/.babelrc +5 -0
  5. data/templates/rails_app/.gitignore +8 -2
  6. data/templates/rails_app/.postcssrc.yml +4 -0
  7. data/templates/rails_app/Gemfile +15 -13
  8. data/templates/rails_app/Rakefile +1 -1
  9. data/templates/rails_app/app/assets/javascripts/application.js +1 -1
  10. data/templates/rails_app/app/assets/stylesheets/application.sass +1 -1
  11. data/templates/rails_app/app/assets/stylesheets/main.sass +7 -2
  12. data/templates/rails_app/app/javascript/packs/app.vue +22 -0
  13. data/templates/rails_app/app/javascript/packs/application.js +2 -9
  14. data/templates/rails_app/app/javascript/packs/hello_vue.js +19 -0
  15. data/templates/rails_app/bin/rails +0 -5
  16. data/templates/rails_app/bin/rake +0 -5
  17. data/templates/rails_app/bin/webpack +25 -11
  18. data/templates/rails_app/bin/webpack-dev-server +22 -16
  19. data/templates/rails_app/bin/yarn +3 -2
  20. data/templates/rails_app/config.ru +1 -1
  21. data/templates/rails_app/config/application.rb.tt +3 -0
  22. data/templates/rails_app/config/database.yml.tt +2 -2
  23. data/templates/rails_app/config/environments/development.rb +0 -3
  24. data/templates/rails_app/config/environments/production.rb.tt +0 -3
  25. data/templates/rails_app/config/{puma.rb → puma.rb.tt} +5 -6
  26. data/templates/rails_app/config/webpack/configuration.js +26 -0
  27. data/templates/rails_app/config/webpack/development.js +3 -17
  28. data/templates/rails_app/config/webpack/development.server.js +17 -0
  29. data/templates/rails_app/config/webpack/development.server.yml +17 -0
  30. data/templates/rails_app/config/webpack/loaders/assets.js +12 -0
  31. data/templates/rails_app/config/webpack/loaders/babel.js +5 -0
  32. data/templates/rails_app/config/webpack/loaders/coffee.js +4 -0
  33. data/templates/rails_app/config/webpack/loaders/erb.js +9 -0
  34. data/templates/rails_app/config/webpack/loaders/sass.js +14 -0
  35. data/templates/rails_app/config/webpack/loaders/vue.js +12 -0
  36. data/templates/rails_app/config/webpack/paths.yml +33 -0
  37. data/templates/rails_app/config/webpack/production.js +5 -7
  38. data/templates/rails_app/config/webpack/shared.js +28 -54
  39. data/templates/rails_app/config/webpack/test.js +6 -0
  40. data/templates/rails_app/package.json.tt +24 -17
  41. data/templates/rails_app/public/404.html +51 -51
  42. data/templates/rails_app/public/422.html +51 -51
  43. data/templates/rails_app/public/500.html +50 -50
  44. data/templates/rails_app/test/application_system_test_case.rb +5 -2
  45. data/templates/rails_app/test/fixtures/files/.keep +0 -0
  46. metadata +20 -37
  47. data/templates/rails_app/app/javascript/packs/hello.vue +0 -11
  48. data/templates/rails_app/bin/spring +0 -17
  49. data/templates/rails_app/bin/webpack-watcher +0 -10
  50. data/templates/rails_app/config/initializers/new_framework_defaults.rb +0 -25
  51. data/templates/rails_app/config/spring.rb +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ad53e4de95bb9ed21f9b56e29ace540fee80e01
4
- data.tar.gz: 5498e4f2b9f2641e2e3b63d2814e54eaa6777142
3
+ metadata.gz: cf99b72362996a494129c8feca23e009e1e13394
4
+ data.tar.gz: 26fc41bb5d5438fc5182ee9f7b642eabb720c743
5
5
  SHA512:
6
- metadata.gz: 707029743cf3e7577e453d4ef907cbf2476028d48d5b52532cd087be4532341b8c0a340fac003a14a33f720ada43a0dd8f760d7a19d4663d85b3cf4faa07e606
7
- data.tar.gz: 2151fe1ac07acfcf695d4ab8a5bcfea5918b7eb24b72f696d7f4479654e986c4d00d2e98894ea1f0793740d50621ecfc7c45837a0bf3968194c2bfa67cf2649f
6
+ metadata.gz: 11a4676a4e52562ea77e37a925f545e40bd63b06ec383495da926379c6d55782cb80ac968f43341ea340d3b8b0161efbe1edf86b4e399c0400b5831b2f1d23c4
7
+ data.tar.gz: 6da0be1cadb3b59b28fe36bc5bddc2cfd0e1d0c03768fa10a06aba4eece536c87308fa265691be6ad223e467615d8bde39e015fc34b394a2c9916317f7293c00
@@ -1,3 +1,3 @@
1
1
  module Railman
2
- VERSION = '1.0.3'
2
+ VERSION = '1.0.4'
3
3
  end
@@ -19,10 +19,8 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.add_development_dependency "bundler", "~> 1.11"
21
21
  spec.add_development_dependency "rake", "~> 10.0"
22
- spec.add_development_dependency "minitest", "~> 5.8"
23
22
  spec.add_development_dependency "minitest-reporters", "~> 1.1"
24
23
  spec.add_development_dependency "gem-release", "~> 0.7"
25
- spec.add_development_dependency "geminabox", "~> 0.13"
26
24
  spec.add_development_dependency "coveralls"
27
25
 
28
26
  spec.add_dependency "thor", "~> 0.19"
@@ -0,0 +1,5 @@
1
+ {
2
+ "presets": [
3
+ ["env", { "modules": false } ]
4
+ ]
5
+ }
@@ -2,8 +2,9 @@
2
2
  .idea
3
3
  .bundle
4
4
  log/*
5
+ tmp/*
5
6
  !/log/.keep
6
- tmp
7
+ !/tmp/.keep
7
8
  .env
8
9
 
9
10
  coverage
@@ -13,6 +14,11 @@ test/screenshots
13
14
 
14
15
  .sass-cache
15
16
  public/assets
17
+ public/packs
16
18
  refile_uploads
17
19
 
18
- brakeman-output.tabs
20
+ /node_modules
21
+ /yarn-error.log
22
+
23
+ brakeman-output.tabs
24
+ .byebug_history
@@ -0,0 +1,4 @@
1
+ plugins:
2
+ postcss-smart-import: {}
3
+ precss: {}
4
+ autoprefixer: {}
@@ -6,23 +6,26 @@ git_source(:github) do |repo_name|
6
6
  "https://github.com/#{repo_name}.git"
7
7
  end
8
8
 
9
- gem 'dotenv-rails', '2.1.1', require: 'dotenv/rails-now' # load ENV from .env
9
+ gem 'dotenv-rails', '2.2.1', require: 'dotenv/rails-now' # load ENV from .env
10
10
 
11
- gem 'rails', '~> 5.1.0.beta1'
11
+ gem 'rails', '~> 5.1.0'
12
12
  gem 'pg', '0.18.2'
13
13
 
14
- gem 'semantic-rails-ui' # semantic-ui + simple_form + rails helpers
14
+ gem 'railman-ui' # bulma css framework + rails helpers
15
15
 
16
- gem 'webpacker', '1.0.0'
16
+ gem 'webpacker', '1.2'
17
+
18
+ # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
19
+ # gem 'turbolinks', '~> 5'
17
20
 
18
21
  gem 'hiredis', '0.6.1'
19
22
  gem 'redis', '3.3.1', require: %w(redis redis/connection/hiredis)
23
+ gem 'redis-namespace', '1.5.2' # share same redis instance for multiple applications
20
24
  gem 'redis-rails', '5.0.1'
21
25
 
22
26
  gem 'sidekiq', '4.1.1' # backgroud jobs
23
27
  gem 'sidekiq-scheduler', '2.0.6' # scheduled background jobs
24
- gem 'redis-namespace', '1.5.2' # share same redis instance for multiple applications
25
- gem 'sinatra', '2.0.0.beta2', :require => false # for sidekiq-web
28
+ gem 'sinatra', '2.0.0', :require => false # for sidekiq-web
26
29
 
27
30
  gem 'puma', '~> 3.7'
28
31
 
@@ -30,15 +33,14 @@ gem 'railman-deployment', '~> 0.2' # capistrano deployment
30
33
 
31
34
  gem 'exception_notification', '4.2.1' # exception notification per email
32
35
 
33
- gem 'lograge', '~> 0.4.1' # one-line-per-request log messages
36
+ gem 'lograge', '~> 0.5.0' # one-line-per-request log messages
34
37
 
35
38
  group :development do
36
39
  gem 'better_errors' # better error pages in development
37
40
  gem 'binding_of_caller' # repl on the error page
41
+ # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
42
+ gem 'web-console', '>= 3.3.0'
38
43
  gem 'listen', '>= 3.0.5', '< 3.2'
39
- # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
40
- gem 'spring'
41
- gem 'spring-watcher-listen', '~> 2.0.0'
42
44
  gem 'annotate', '~> 2.7.1' # add comments to models with db column information
43
45
  gem 'letter_opener', '1.4.1' # for email tests in development
44
46
  # gem 'rack-mini-profiler'
@@ -49,9 +51,9 @@ group :test do
49
51
  gem 'minitest-reporters', '1.1.7' # generate xml for jenkins
50
52
  gem 'simplecov', require: false # generate coverage reports
51
53
  gem 'simplecov-rcov', '0.2.3', require: false # generate coverage reports for jenkins
52
- gem 'capybara', '2.12.1' # dsl for browser tests
53
- gem 'selenium-webdriver', '3.2.2' # use real browser for webtests
54
- gem 'poltergeist', '1.8.1' # headless tests with phantom.js
54
+ gem 'capybara', '2.14.0' # dsl for browser tests
55
+ gem 'selenium-webdriver', '3.4.0' # use real browser for webtests
56
+ gem 'poltergeist', '1.15.0' # headless tests with phantom.js
55
57
  end
56
58
 
57
59
  # put additional application-specific gems to Gemfile.local
@@ -1,6 +1,6 @@
1
1
  # Add your own tasks in files placed in lib/tasks ending in .rake,
2
2
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
3
 
4
- require File.expand_path('../config/application', __FILE__)
4
+ require_relative 'config/application'
5
5
 
6
6
  Rails.application.load_tasks
@@ -10,5 +10,5 @@
10
10
  // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
- //= require semantic-rails-ui
13
+ //= require railman-ui
14
14
  //= require_tree .
@@ -1,2 +1,2 @@
1
- @import "semantic-rails-ui"
1
+ @import "railman-ui"
2
2
  @import "main"
@@ -1,5 +1,10 @@
1
+ $body-background: #fbf6ef
2
+ $primary: #009DD1
3
+
1
4
  body
2
- background-color: #f7f0e9
5
+ font-size: 15px
6
+ min-height: 100vh
3
7
 
4
8
  #content
5
- margin: 2em
9
+ margin: 2em auto 2em auto
10
+ padding: 0 1em
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <div id="app">
3
+ <p>{{ message }}</p>
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ data: function () {
10
+ return {
11
+ message: "Hello Vue!"
12
+ }
13
+ }
14
+ }
15
+ </script>
16
+
17
+ <style scoped>
18
+ p {
19
+ font-size: 2em;
20
+ text-align: center;
21
+ }
22
+ </style>
@@ -1,3 +1,4 @@
1
+ /* eslint no-console:0 */
1
2
  // This file is automatically compiled by Webpack, along with any other files
2
3
  // present in this directory. You're encouraged to place your actual application logic in
3
4
  // a relevant structure within app/javascript and only use these pack files to reference
@@ -6,12 +7,4 @@
6
7
  // To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate
7
8
  // layout file, like app/views/layouts/application.html.erb
8
9
 
9
- import Vue from 'vue'
10
- import Hello from './hello.vue'
11
-
12
- new Vue({
13
- el: '#app',
14
- template: '<Hello/>',
15
- components: { Hello }
16
- });
17
-
10
+ console.log('Hello World from Webpacker')
@@ -0,0 +1,19 @@
1
+ /* eslint no-console: 0 */
2
+ // Run this example by adding <%= javascript_pack_tag 'hello_vue' %>
3
+ // to the head of your layout file,
4
+ // like app/views/layouts/application.html.erb.
5
+ // All it does is render <div>Hello Vue</div> at the bottom of the page.
6
+
7
+ import Vue from 'vue/dist/vue.esm'
8
+ import App from './app.vue'
9
+
10
+ document.addEventListener('DOMContentLoaded', () => {
11
+ document.body.appendChild(document.createElement('hello'))
12
+ const app = new Vue({
13
+ el: 'hello',
14
+ template: '<App/>',
15
+ components: { App }
16
+ })
17
+
18
+ console.log(app)
19
+ })
@@ -1,9 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- begin
3
- load File.expand_path('../spring', __FILE__)
4
- rescue LoadError => e
5
- raise unless e.message.include?('spring')
6
- end
7
2
  APP_PATH = File.expand_path('../config/application', __dir__)
8
3
  require_relative '../config/boot'
9
4
  require 'rails/commands'
@@ -1,9 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- begin
3
- load File.expand_path('../spring', __FILE__)
4
- rescue LoadError => e
5
- raise unless e.message.include?('spring')
6
- end
7
2
  require_relative '../config/boot'
8
3
  require 'rake'
9
4
  Rake.application.run
@@ -1,19 +1,33 @@
1
1
  #!/usr/bin/env ruby
2
- require 'shellwords'
2
+ $stdout.sync = true
3
3
 
4
- ENV['RAILS_ENV'] ||= 'development'
5
- RAILS_ENV = ENV['RAILS_ENV']
4
+ require "shellwords"
5
+ require "yaml"
6
6
 
7
- ENV['NODE_ENV'] ||= RAILS_ENV
8
- NODE_ENV = ENV['NODE_ENV']
7
+ ENV["RAILS_ENV"] ||= "development"
8
+ RAILS_ENV = ENV["RAILS_ENV"]
9
9
 
10
- APP_PATH = File.expand_path('../', __dir__)
11
- ESCAPED_APP_PATH = APP_PATH.shellescape
10
+ ENV["NODE_ENV"] ||= RAILS_ENV
11
+ NODE_ENV = ENV["NODE_ENV"]
12
12
 
13
- SET_NODE_PATH = "NODE_PATH=#{ESCAPED_APP_PATH}/node_modules"
14
- WEBPACK_BIN = "./node_modules/webpack/bin/webpack.js"
15
- WEBPACK_CONFIG = "#{ESCAPED_APP_PATH}/config/webpack/#{NODE_ENV}.js"
13
+ APP_PATH = File.expand_path("../", __dir__)
14
+ CONFIG_PATH = File.join(APP_PATH, "config/webpack/paths.yml")
15
+
16
+ begin
17
+ paths = YAML.load(File.read(CONFIG_PATH))[NODE_ENV]
18
+
19
+ NODE_MODULES_PATH = File.join(APP_PATH.shellescape, paths["node_modules"])
20
+ WEBPACK_CONFIG_PATH = File.join(APP_PATH.shellescape, paths["config"])
21
+ rescue Errno::ENOENT, NoMethodError
22
+ puts "Configuration not found in config/webpack/paths.yml"
23
+ puts "Please run bundle exec rails webpacker:install to install webpacker"
24
+ exit!
25
+ end
26
+
27
+ WEBPACK_BIN = "#{NODE_MODULES_PATH}/.bin/webpack"
28
+ WEBPACK_CONFIG = "#{WEBPACK_CONFIG_PATH}/#{NODE_ENV}.js"
16
29
 
17
30
  Dir.chdir(APP_PATH) do
18
- exec "#{SET_NODE_PATH} #{WEBPACK_BIN} --config #{WEBPACK_CONFIG} #{ARGV.join(" ")}"
31
+ exec "NODE_PATH=#{NODE_MODULES_PATH} #{WEBPACK_BIN} --config #{WEBPACK_CONFIG}" \
32
+ " #{ARGV.join(" ")}"
19
33
  end
@@ -1,27 +1,33 @@
1
1
  #!/usr/bin/env ruby
2
- require 'shellwords'
2
+ $stdout.sync = true
3
3
 
4
- ENV['RAILS_ENV'] ||= 'development'
5
- RAILS_ENV = ENV['RAILS_ENV']
4
+ require "shellwords"
5
+ require "yaml"
6
6
 
7
- ENV['NODE_ENV'] ||= RAILS_ENV
8
- NODE_ENV = ENV['NODE_ENV']
7
+ ENV["RAILS_ENV"] ||= "development"
8
+ RAILS_ENV = ENV["RAILS_ENV"]
9
9
 
10
- APP_PATH = File.expand_path('../', __dir__)
11
- ESCAPED_APP_PATH = APP_PATH.shellescape
10
+ ENV["NODE_ENV"] ||= RAILS_ENV
11
+ NODE_ENV = ENV["NODE_ENV"]
12
12
 
13
- SET_NODE_PATH = "NODE_PATH=#{ESCAPED_APP_PATH}/node_modules"
14
- WEBPACKER_BIN = "./node_modules/.bin/webpack-dev-server"
15
- WEBPACK_CONFIG = "#{ESCAPED_APP_PATH}/config/webpack/#{NODE_ENV}.js"
13
+ APP_PATH = File.expand_path("../", __dir__)
14
+ CONFIG_PATH = File.join(APP_PATH, "config/webpack/paths.yml")
16
15
 
17
- # Warn the user if the configuration is not set
18
- RAILS_ENV_CONFIG = File.join("config", "environments", "#{RAILS_ENV}.rb")
16
+ begin
17
+ paths = YAML.load(File.read(CONFIG_PATH))[NODE_ENV]
19
18
 
20
- # Look into the environment file for a non-commented variable declaration
21
- unless File.foreach(File.join(APP_PATH, RAILS_ENV_CONFIG)).detect { |line| line.match(/^\s*[^#]*config\.x\.webpacker\[\:dev_server_host\].*=/) }
22
- puts "Warning: if you want to use webpack-dev-server, you need to tell Webpacker to serve asset packs from it. Please set config.x.webpacker[:dev_server_host] in #{RAILS_ENV_CONFIG}.\n\n"
19
+ NODE_MODULES_PATH = File.join(APP_PATH.shellescape, paths["node_modules"])
20
+ WEBPACK_CONFIG_PATH = File.join(APP_PATH.shellescape, paths["config"])
21
+
22
+ WEBPACK_BIN = "#{NODE_MODULES_PATH}/.bin/webpack-dev-server"
23
+ DEV_SERVER_CONFIG = "#{WEBPACK_CONFIG_PATH}/development.server.js"
24
+ rescue Errno::ENOENT, NoMethodError
25
+ puts "Configuration not found in config/webpacker/paths.yml."
26
+ puts "Please run bundle exec rails webpacker:install to install webpacker"
27
+ exit!
23
28
  end
24
29
 
25
30
  Dir.chdir(APP_PATH) do
26
- exec "#{SET_NODE_PATH} #{WEBPACKER_BIN} --config #{WEBPACK_CONFIG} --content-base #{ESCAPED_APP_PATH}/public/packs #{ARGV.join(" ")}"
31
+ exec "NODE_PATH=#{NODE_MODULES_PATH} #{WEBPACK_BIN} --progress --color " \
32
+ "--config #{DEV_SERVER_CONFIG} #{ARGV.join(" ")}"
27
33
  end
@@ -4,7 +4,8 @@ Dir.chdir(VENDOR_PATH) do
4
4
  begin
5
5
  exec "yarnpkg #{ARGV.join(" ")}"
6
6
  rescue Errno::ENOENT
7
- puts "Yarn executable was not detected in the system."
8
- puts "Download Yarn at https://yarnpkg.com/en/docs/install"
7
+ $stderr.puts "Yarn executable was not detected in the system."
8
+ $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9
+ exit 1
9
10
  end
10
11
  end
@@ -1,4 +1,4 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
- require ::File.expand_path('../config/environment', __FILE__)
3
+ require_relative 'config/environment'
4
4
  run Rails.application
@@ -8,6 +8,9 @@ Bundler.require(*Rails.groups)
8
8
 
9
9
  module <%= @config.class_name %>
10
10
  class Application < Rails::Application
11
+ # Initialize configuration defaults for originally generated Rails version.
12
+ config.load_defaults 5.1
13
+
11
14
  # Settings in config/environments/* take precedence over those specified here.
12
15
  # Application configuration should go into files in config/initializers
13
16
  # -- all .rb files in that directory are automatically loaded.
@@ -3,8 +3,8 @@ default: &default
3
3
  encoding: unicode
4
4
  host: localhost
5
5
  port: 5432
6
- username: <%= ENV['DB_USER'] %>
7
- password: <%= ENV['DB_PASSWORD'] %>
6
+ username: <%%= ENV['DB_USER'] %>
7
+ password: <%%= ENV['DB_PASSWORD'] %>
8
8
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
9
9
  timeout: 5000
10
10
 
@@ -1,7 +1,4 @@
1
1
  Rails.application.configure do
2
- # Make javascript_pack_tag load assets from webpack-dev-server.
3
- config.x.webpacker[:dev_server_host] = "http://localhost:8080"
4
-
5
2
  # Settings specified here will take precedence over those in config/application.rb.
6
3
 
7
4
  # In the development environment your application's code is reloaded on
@@ -1,7 +1,4 @@
1
1
  Rails.application.configure do
2
- # Make javascript_pack_tag lookup digest hash to enable long-term caching
3
- config.x.webpacker[:digesting] = true
4
-
5
2
  # Settings specified here will take precedence over those in config/application.rb.
6
3
 
7
4
  # Code is not reloaded between requests.
@@ -1,15 +1,14 @@
1
+ APP_ROOT = File.expand_path('../..', __FILE__)
2
+
3
+ require 'dotenv'
4
+ Dotenv.load
5
+
1
6
  # Puma can serve each request in a thread from an internal thread pool.
2
7
  # The `threads` method setting takes two numbers: a minimum and maximum.
3
8
  # Any libraries that use thread pools should be configured to match
4
9
  # the maximum value specified for Puma. Default is set to 5 threads for minimum
5
10
  # and maximum; this matches the default thread size of Active Record.
6
11
  #
7
-
8
- APP_ROOT = File.expand_path('../..', __FILE__)
9
-
10
- require 'dotenv'
11
- Dotenv.load
12
-
13
12
  threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
14
13
  threads threads_count, threads_count
15
14
 
@@ -0,0 +1,26 @@
1
+ // Common configuration for webpacker loaded from config/webpack/paths.yml
2
+
3
+ const { join, resolve } = require('path')
4
+ const { env } = require('process')
5
+ const { safeLoad } = require('js-yaml')
6
+ const { readFileSync } = require('fs')
7
+
8
+ const configPath = resolve('config', 'webpack')
9
+ const loadersDir = join(__dirname, 'loaders')
10
+ const paths = safeLoad(readFileSync(join(configPath, 'paths.yml'), 'utf8'))[env.NODE_ENV]
11
+ const devServer = safeLoad(readFileSync(join(configPath, 'development.server.yml'), 'utf8'))[env.NODE_ENV]
12
+
13
+ // Compute public path based on environment and ASSET_HOST in production
14
+ const ifHasCDN = env.ASSET_HOST !== undefined && env.NODE_ENV === 'production'
15
+ const devServerUrl = `http://${devServer.host}:${devServer.port}/${paths.entry}/`
16
+ const publicUrl = ifHasCDN ? `${env.ASSET_HOST}/${paths.entry}/` : `/${paths.entry}/`
17
+ const publicPath = env.NODE_ENV !== 'production' ? devServerUrl : publicUrl
18
+
19
+ module.exports = {
20
+ devServer,
21
+ env,
22
+ paths,
23
+ loadersDir,
24
+ publicUrl,
25
+ publicPath
26
+ }