Skip to content

Commit

Permalink
Appease the linters
Browse files Browse the repository at this point in the history
  • Loading branch information
javan committed May 18, 2017
1 parent 28fc868 commit 4ae0faf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
10 changes: 5 additions & 5 deletions lib/install/config/webpack/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ function removeOuterSlashes(string) {
}

function formatPublicPath(host = '', path = '') {
host = removeOuterSlashes(host)
path = removeOuterSlashes(path)
if (host && !/^http/i.test(host)) {
host = `//${host}`
let formattedHost = removeOuterSlashes(host)
if (formattedHost && !/^http/i.test(formattedHost)) {
formattedHost = `//${formattedHost}`
}
return `${host}/${path}/`
const formattedPath = removeOuterSlashes(path)
return `${formattedHost}/${formattedPath}/`
}

const output = {
Expand Down
1 change: 0 additions & 1 deletion lib/install/config/webpack/development.server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Note: You must restart bin/webpack-dev-server for changes to take effect

const { resolve } = require('path')
const merge = require('webpack-merge')
const ManifestPlugin = require('webpack-manifest-plugin')
const devConfig = require('./development.js')
Expand Down
6 changes: 5 additions & 1 deletion lib/install/config/webpack/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ module.exports = {
plugins: [
new webpack.EnvironmentPlugin(JSON.parse(JSON.stringify(env))),
new ExtractTextPlugin(env.NODE_ENV === 'production' ? '[name]-[hash].css' : '[name].css'),
new ManifestPlugin({ fileName: paths.manifest, publicPath: output.publicPath, writeToFileEmit: true })
new ManifestPlugin({
fileName: paths.manifest,
publicPath: output.publicPath,
writeToFileEmit: true
})
],

resolve: {
Expand Down
4 changes: 0 additions & 4 deletions lib/webpacker/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def manifest_path
output_path.join(fetch(:manifest))
end


def source_path
Rails.root.join(source)
end
Expand All @@ -29,7 +28,6 @@ def config_path
Rails.root.join(fetch(:config))
end


def file_path(root: Rails.root)
root.join("config/webpack/paths.yml")
end
Expand All @@ -38,7 +36,6 @@ def default_file_path
file_path(root: Pathname.new(__dir__).join("../install"))
end


def source
fetch(:source)
end
Expand All @@ -47,7 +44,6 @@ def fetch(key)
paths.fetch(key, default_paths[key])
end


def paths
load if Webpacker.env.development?
raise Webpacker::FileLoader::FileLoaderError.new("Webpacker::Configuration.load must be called first") unless instance
Expand Down

0 comments on commit 4ae0faf

Please sign in to comment.