Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(info): new features #1007

Merged
merged 6 commits into from Aug 28, 2019
Merged

Conversation

pranshuchittora
Copy link
Member

Continuation of => #833

Why new PR?
Let's start fresh.

@pranshuchittora pranshuchittora changed the title chore(info): changes base feat(info): new features Jul 24, 2019
@evenstensberg
Copy link
Member

@rishabh3112 could you take this out for a manual spin?

@webpack-bot
Copy link

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

Copy link
Member

@rishabh3112 rishabh3112 left a comment

Choose a reason for hiding this comment

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

@pranshuchittora nice work!
Did a quick black-box test on it, few things:

  1. output modifiers aren't working as expected, they give the same tabular output every time.
    commands I tested on
    webpack-cli info ./webpack.config.js --output-markdown
    webpack-cli info ./webpack.config.js --output-json

  2. Following commands give no output

  • webpack-cli info --binaries
  • webpack-cli info --browsers
  • webpack-cli info --npmg
  • webpack-cli info --npmPackages
    ( Old info shows me those in same project )
  1. Following flags are raised invalid
  • webpack-cli info -b
  • webpack-cli info -s
    ( --b and --s are valid, but gives no output)

plus tabular output gives function definitions for options that receive a function as the value.

┌─────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Config  │ webpack.config.js                                                                                             │
├─────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ entry   │ ./src                                                                                                         │
├─────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ plugins │ -                                                                                                             │
│         │   name:    HtmlWebpackPlugin                                                                                  │
│         │   options:                                                                                                    │
│         │     template:          /webpack/play/src/index.html                              │
│         │     templateParameters: function templateParametersGenerator (compilation, assets, options) {                 │
│         │   return {                                                                                                    │
│         │     compilation: compilation,                                                                                 │
│         │     webpack: compilation.getStats().toJson(),                                                                 │
│         │     webpackConfig: compilation.options,                                                                       │
│         │     htmlWebpackPlugin: {                                                                                      │
│         │       files: assets,                                                                                          │
│         │       options: options                                                                                        │
│         │     }                                                                                                         │
│         │   };                                                                                                          │
│         │ }                                                                                                             │
│         │     filename:           index.html                                                                            │
│         │     hash:               false                                                                                 │
│         │     inject:             true                                                                                  │
│         │     compile:            true                                                                                  │
│         │     favicon:            false                                                                                 │
│         │     minify:                                                                                                   │
│         │       collapseWhitespace:        true                                                                         │
│         │       removeComments:            true                                                                         │
│         │       removeRedundantAttributes: true                                                                         │
│         │       useShortDoctype:           true                                                                         │
│         │     cache:              true                                                                                  │
│         │     showErrors:         true                                                                                  │
│         │     chunks:             all                                                                                   │
│         │     excludeChunks:                                                                                            │
│         │       (empty array)                                                                                           │
│         │     chunksSortMode:     auto                                                                                  │
│         │     meta:                                                                                                     │
│         │     title:              Webpack App                                                                           │
│         │     xhtml:              false                                                                                 │
├─────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ module  │ rules:                                                                                                        │
│         │   -                                                                                                           │
│         │     test:                                                                                                     │
│         │       lastIndex: 0                                                                                            │
│         │     use:                                                                                                      │
│         │       -                                                                                                       │
│         │         loader:  /webpack/play/node_modules/mini-css-extract-plugin/dist/loader.js │
│         │       - css-loader                                                                                            │
│         │       -                                                                                                       │
│         │         loader:  postcss-loader                                                                               │
│         │         options:                                                                                              │
│         │           ident:   postcss                                                                                    │
│         │           plugins:                                                                                            │
│         │             - function creator() {                                                                            │
│         │     var transformer = initializer.apply(void 0, arguments);                                                   │
│         │     transformer.postcssPlugin = name;                                                                         │
│         │     transformer.postcssVersion = new _processor.default().version;                                            │
│         │     return transformer;                                                                                       │
│         │   }                                                                                                           │
│         │             - function creator() {                                                                            │
│         │     var transformer = initializer.apply(void 0, arguments);                                                   │
│         │     transformer.postcssPlugin = name;                                                                         │
│         │     transformer.postcssVersion = new _processor.default().version;                                            │
│         │     return transformer;                                                                                       │
│         │   }                                                                                                           │
└─────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

@pranshuchittora
Copy link
Member Author

pranshuchittora commented Aug 6, 2019

I am not able to find the webpack-cli in the .bin folder.
Branch - Next

@rishabh3112
Copy link
Member

Are you able to sort this out now? If not, I can send you my setup.

@evenstensberg
Copy link
Member

It's at root in cli.js no big deal

@pranshuchittora pranshuchittora requested a review from a team as a code owner August 27, 2019 23:05
@webpack-bot
Copy link

@pranshuchittora Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@rishabh3112 Please review the new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants