Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

refactor: use config-loader #126

Merged
merged 12 commits into from
May 10, 2018
Merged

refactor: use config-loader #126

merged 12 commits into from
May 10, 2018

Conversation

shellscape
Copy link
Contributor

@shellscape shellscape commented May 9, 2018

+ update to latest eslint-config-webpack

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

@webpack-contrib/config-loader provides many advantages for loading webpack configs, including supporting all export formats of config that can be used out of the gate by webpack-cli and webpack-command. It also allows for require hooks for loading configs, and for different file formats for config files.

Breaking Changes

None

Additional Info

+ update to latest eslint-config-webpack
@codecov
Copy link

codecov bot commented May 9, 2018

Codecov Report

Merging #126 into master will increase coverage by 3.65%.
The diff coverage is 96.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #126      +/-   ##
==========================================
+ Coverage      93%   96.65%   +3.65%     
==========================================
  Files           7        7              
  Lines         300      269      -31     
==========================================
- Hits          279      260      -19     
+ Misses         21        9      -12
Impacted Files Coverage Δ
index.js 100% <100%> (+1.81%) ⬆️
lib/options.js 97.22% <100%> (+8.56%) ⬆️
lib/bus.js 100% <100%> (ø) ⬆️
lib/server.js 93.1% <100%> (+5.41%) ⬆️
lib/WebpackServeError.js 100% <100%> (ø) ⬆️
cli.js 100% <100%> (+2.56%) ⬆️
lib/config.js 94% <93.75%> (-6%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b7f9ea...e08a95b. Read the comment docs.

cli.js Outdated
@@ -14,7 +12,7 @@ const cosmiconfig = require('cosmiconfig');
const debug = require('debug')('webpack-serve');
const meow = require('meow');
const merge = require('lodash/merge');
const resolveModule = require('resolve').sync;
// const resolveModule = require('resolve').sync;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove the comment?

cli.js Outdated

const flags = Object.assign({}, cli.flags);

if (flags.require) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove this option?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's handled by config-loader downstream

lib/options.js Outdated
'use strict';

const path = require('path');
// const path = require('path');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed

@shellscape shellscape force-pushed the refactor/config-loader branch 2 times, most recently from b5a34fb to ca9aaaf Compare May 10, 2018 16:14
@shellscape shellscape force-pushed the refactor/config-loader branch from ca9aaaf to 194f1df Compare May 10, 2018 17:16
@shellscape shellscape force-pushed the refactor/config-loader branch from 8a30514 to 34b9d98 Compare May 10, 2018 18:25
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!, It is don't break serve options from webpack.config.js?

@shellscape
Copy link
Contributor Author

@evilebottnawi it does not break serve options being in webpack.config.js, no.

@shellscape shellscape merged commit a7a682e into master May 10, 2018
@shellscape shellscape deleted the refactor/config-loader branch May 10, 2018 21:10
@shellscape shellscape mentioned this pull request May 11, 2018
3 tasks
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants