Skip to content

Commit

Permalink
Merge branch 'master' into output-lib-array-opt
Browse files Browse the repository at this point in the history
  • Loading branch information
evenstensberg committed Sep 30, 2018
2 parents d3a3b87 + 968f8f1 commit 258473f
Show file tree
Hide file tree
Showing 352 changed files with 114,284 additions and 16,263 deletions.
30 changes: 0 additions & 30 deletions .appveyor.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .cz-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ module.exports = {
// sort type values in asc
types: [
{ value: "ast", name: "ast: init, migrate, add, etc" },
{ value: "break", name: "break: changes that break the behaviour of the cli" },
{ value: "break", name: "break: Changes that break the behaviour of the cli" },
{ value: "chore", name: "chore: Updating deps, docs, linting, etc" },
{ value: "cli", name: "cli: Core CLI things" },
{ value: "docs", name: "docs: Documentation" },
{ value: "feat", name: "feat: A new feature" },
{ value: "fix", name: "fix: Bugs, typos, etc" },
{ value: "misc", name: "misc: Other formats like tweaks and such" },
{ value: "tests", name: "tests: Tests, jest, binTestCases, etc" }
{ value: "tests", name: "tests: Tests, jest, binTestCases, etc" },
]
};
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.js text eol=lf
*.ts text eol=lf
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ lerna-debug.log

# Yarn lock file
yarn.lock

# source maps of docs
docs/**/*.map
3 changes: 1 addition & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ types.js
*.spec.js
docs
jsdoc.json
.appveyor.yml
.codecov.yml
*.snap
open-bot.yml
.nyc_output
git_deploy_key.enc
*.md
*.md
78 changes: 78 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,81 @@
<a name="3.1.2"></a>
# 3.1.2 (2018-09-29)
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v3.1.1...v3.1.2)

## Chore

* deps: upgrade husky ([#611](https://github.com/webpack/webpack-cli/pull/611))
* docs: update readme ([93ebcc2](https://github.com/webpack/webpack-cli/commit/93ebcc2))
* scripts: add commit script, cz-customizable ([#612](https://github.com/webpack/webpack-cli/pull/612))

## Docs

* init: update headers ([dc4ded9](https://github.com/webpack/webpack-cli/commit/dc4ded9))
* init: update init documentation ([2ccf9a9](https://github.com/webpack/webpack-cli/commit/2ccf9a9))
* readme: update webpack-cli to webpack CLI ([f3a225a](https://github.com/webpack/webpack-cli/commit/f3a225a))
* readme: change addons to scaffolds ([747aef9](https://github.com/webpack/webpack-cli/commit/747aef9))
* readme: update links ([f8187f1](https://github.com/webpack/webpack-cli/commit/f8187f1))
* readme: update README.md ([#614](https://github.com/webpack/webpack-cli/pull/614))
* readme: update Readme based on feedback ([da05c2f](https://github.com/webpack/webpack-cli/commit/da05c2f))

## Fix

* tapable: fix hook options ([9aed0dc](https://github.com/webpack/webpack-cli/commit/9aed0dc))
* replace test regex ([d4e1614](https://github.com/webpack/webpack-cli/commit/d4e1614))

<a name="3.1.1"></a>
# 3.1.1 (2018-09-23)
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v0.1.0...v3.1.1)

## New Features

* migrate: CommonChunksPlugin to SplitChunksPlugin ([#558](https://github.com/webpack/webpack-cli/pull/558))
* types: types for packages ([#578](https://github.com/webpack/webpack-cli/pull/578))

## Chore

* ci: add commitlint when trying to commit ([#595](https://github.com/webpack/webpack-cli/pull/595))
* ci: Set up CI with Azure Pipelines ([89d3a19](https://github.com/webpack/webpack-cli/commit/89d3a19))
* ci: fix commitlint ([#592](https://github.com/webpack/webpack-cli/pull/592))
* ci: Add a status badge for the azure pipelines CI build ([#601](https://github.com/webpack/webpack-cli/pull/601))
* deps: resync package-lock, upgrade major version ([d892b4d](https://github.com/webpack/webpack-cli/commit/d892b4d))
* deps: Bump lerna version ([#583](https://github.com/webpack/webpack-cli/pull/583))
* deps: removing inquirer as default package ([#555](https://github.com/webpack/webpack-cli/pull/555))
* fix: fix clean all script ([6be0478](https://github.com/webpack/webpack-cli/commit/6be0478))
* Update schema-utils to the latest version 🚀 ([#565](https://github.com/webpack/webpack-cli/pull/565))
* update pkg.lock ([76c8277](https://github.com/webpack/webpack-cli/commit/76c8277))
* remove editorconfig from testfixtures ([#560](https://github.com/webpack/webpack-cli/pull/560))
* lint: fix tslint warnings ([cf0bf4a](https://github.com/webpack/webpack-cli/commit/cf0bf4a))
* lint: turn off console log warning ([db5f570](https://github.com/webpack/webpack-cli/commit/db5f570))
* lint: remove or replace console.log with console.error ([e425642](https://github.com/webpack/webpack-cli/commit/e425642))
* package: update lerna to version 3.0.0 ([08c424d](https://github.com/webpack/webpack-cli/commit/08c424d))
* scripts: update ts watch ([336ad3e](https://github.com/webpack/webpack-cli/commit/336ad3e))
* tests: added first ts test for info package ([#584](https://github.com/webpack/webpack-cli/pull/584))

## CLI

* allow array value for --ouput-library ([#559](https://github.com/webpack/webpack-cli/pull/559))

## Docs

* fixed latest changelog link ([#556](https://github.com/webpack/webpack-cli/pull/556))
* migrate documentaion ([#554](https://github.com/webpack/webpack-cli/pull/554))
* init documentaion ([#547](https://github.com/webpack/webpack-cli/pull/547))
* contribution: fix the setup workflow #591 ([#597](https://github.com/webpack/webpack-cli/pull/597))
* typedoc: add ts docs ([#571](https://github.com/webpack/webpack-cli/pull/571))

## Fix

* generate-loader: include example template in npm package ([d26ea82](https://github.com/webpack/webpack-cli/commit/d26ea82))
* generate-plugin: include example template in npm package ([77fa723](https://github.com/webpack/webpack-cli/commit/77fa723))
* package: update import-local to version 2.0.0 🚀 ([#576](https://github.com/webpack/webpack-cli/pull/576))
* prettier: add parser, filePath ([#553](https://github.com/webpack/webpack-cli/pull/553))
* schema: resolve references in schema ([#605](https://github.com/webpack/webpack-cli/pull/605))

## Misc

* Revert "cli: allow array value for --ouput-library (#559)" ([#561](https://github.com/webpack/webpack-cli/pull/561))

<a name="3.1.0"></a>
# 3.1.0 (2018-07-18)
[Full Changelog](https://github.com/webpack/webpack-cli/compare/v3.0.8...v.3.1.0)
Expand Down
18 changes: 13 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,16 @@ In case you are suggesting a new feature, we will match your idea with our curre
* `git clone <your-clone-url> && cd webpack-cli`

### Setup with npm
* Install the dependencies:
- `npm install`

* To run the entire test suite:
* Install the dependencies and bootstrap the packages:

```bash
npm install
npm link
npm link webpack-cli
```

* To run the tests with:
- `npm run test`

* To test a single CLI (flag) test case:
Expand All @@ -54,7 +60,7 @@ In case you are suggesting a new feature, we will match your idea with our curre
* Install the dependencies and link them

```bash
yarn install
yarn
yarn link
yarn link webpack-cli
```
Expand Down Expand Up @@ -130,6 +136,8 @@ In case you've got a small change in most of the cases your pull request would b

Our commit messages format follows the [angular.js commits format](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format).

You can use `npm run commit` script to have an interactive way for making commits that follow our guidelines.

We don't use the scope. The template of a commit would look like this:

### Commit Message Format
Expand All @@ -146,14 +154,14 @@ format that includes a **type** and a **subject**:

This is the list of *type* of commits that we accept:
* ast
* break
* chore
* cli
* docs
* feat
* fix
* misc
* tests
* break

The **header** is mandatory.

Expand Down
57 changes: 45 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,71 @@
<img width="200" height="200" src="https://webpack.js.org/assets/icon-square-big.svg">
</a>
</div>
<p align="center">
The official CLI of webpack
</p>
<br>

[![npm](https://img.shields.io/npm/v/webpack-cli.svg)](https://www.npmjs.com/package/webpack-cli)
[![Build Status](https://travis-ci.org/webpack/webpack-cli.svg)](https://travis-ci.org/webpack/webpack-cli)
[![Build status](https://ci.appveyor.com/api/projects/status/c2a37nlrfv9mg64f?svg=true)](https://ci.appveyor.com/project/ev1stensberg/webpack-cli)
[![Build2 Status](https://dev.azure.com/webpack/webpack/_apis/build/status/webpack.webpack-cli)](https://dev.azure.com/webpack/webpack/_build/latest?definitionId=4)
[![Dependency Status](https://david-dm.org/webpack/webpack-cli.svg)](https://david-dm.org/webpack/webpack-cli)
[![Code Climate](https://codeclimate.com/github/webpack/webpack-cli/badges/gpa.svg)](https://codeclimate.com/github/webpack/webpack-cli)
[![chat on gitter](https://badges.gitter.im/webpack/webpack.svg)](https://gitter.im/webpack/webpack)
[![Greenkeeper badge](https://badges.greenkeeper.io/webpack/webpack-cli.svg)](https://greenkeeper.io/)
[![Install Size](https://packagephobia.now.sh/badge?p=webpack-cli)](https://packagephobia.now.sh/result?p=webpack-cli)

# Webpack CLI
# webpack CLI

Webpack CLI encapsulates all code related to CLI handling. It captures options and sends them to webpack compiler. You can also find functionality for initializing a project and migrating between versions.
* [About](#about)
- [How to install](#how-to-install)
* [Getting Started](#getting-started)
* [webpack CLI Scaffolds](#webpack-cli-scaffolds)
* Commands
- [`webpack-cli init`](./packages/init/README.md#webpack-cli-init)
- [`webpack-cli add`](./packages/add/README.md#webpack-cli-add)
- [`webpack-cli info`](./packages/info/README.md#webpack-cli-info)
- [`webpack-cli migrate`](./packages/migrate/README.md#webpack-cli-migrate)
- [`webpack-cli remove`](./packages/remove/README.md#webpack-cli-remove)
- [`webpack-cli generate-plugin`](./packages/generate-plugin/README.md#webpack-cli-generate-plugin)
- [`webpack-cli generate-loader`](./packages/generate-loader/README.md#webpack-cli-generate-loader)
- [`webpack-cli serve`](./packages/serve/README.md#webpack-cli-serve)
- [`webpack-cli update`](./packages/update/README.md#webpack-cli-update)
* [webpack.config.js](https://webpack.js.org/concepts/configuration/)
* [Contributing and Internal Documentation](#contributing-and-internal-documentation)

## Migration from webpack v1 to v2
## About

The `migrate` feature eases the transition from [version 1](http://webpack.github.io/docs/) to [version 2](https://gist.github.com/sokra/27b24881210b56bbaff7). `migrate` also allows users to switch to the new version of webpack without having to extensively [refactor](https://webpack.js.org/guides/migrating/).
webpack CLI is a CLI tool for providing a flexible set of commands for developers to increase speed when setting up a custom webpack project. As of webpack v4, webpack is not expecting a configuration file but often, developers want to create a more custom webpack configuration based on their use-cases and needs. Exactly all these cases with webpack CLI we are providing a set of tools to improve the setup of custom webpack configuration.

`webpack-cli migrate <config>`
### How to install

[Read more about migrating](MIGRATE.md)
When you have followed the [Getting Started](https://webpack.js.org/guides/getting-started/) guide of webpack then webpack CLI is already installed!

## Creating new webpack projects
Otherwise `npm install --save-dev webpack-cli` or `yarn add webpack-cli --dev` will install it.

The `init` feature allows users to get started with webpack, fast. Through scaffolding, people can create their own configuration in order to faster initialize new projects for various of use cases.
### Commands

`webpack-cli init webpack-scaffold-<package>`
Supporting developers is an important task for webpack CLI. Thus, webpack CLI provides different commands for many common tasks. We organize webpack CLI as a [multi-package repository](https://github.com/lerna/lerna). Every command has a dedicated subfolder in the `packages` Folder.

[Read more about scaffolding](SCAFFOLDING.md)
## Getting started

When you have followed the [Getting Started](https://webpack.js.org/guides/getting-started/) guide of webpack then webpack CLI is already installed! Otherwise, you would need to install webpack CLI and the packages you want to use. If we want to use the `init` functionality to create a new `webpack.config.js` configuration file:

```sh
npm i webpack-cli @webpack-cli/init
npx webpack-cli init
```

You will answer many questions when running the `init` so webpack CLI can provide the best fitting configuration.

## webpack CLI Scaffolds

With v3 of webpack CLI, we introduced scaffolding as an integral part of the CLI. Our goal is to simplify the creation of webpack configurations for different purposes. Additionally, sharing such solutions with the community is beneficial and with webpack Addon's we want to allow this. We provide `webpack-scaffold` as a utility suite for creating these add-ons. It contains functions that could be of use for creating an addon yourself.

You can read more about [Scaffolding](./SCAFFOLDING.md) or check out the example project [How do I compose a webpack-addon?](https://github.com/ev1stensberg/webpack-addons-demo).

## Contributing and Internal Documentation

The webpack family welcomes any contributor, small or big. We are happy to elaborate, guide you through the source code and find issues you might want to work on! To get started have a look at our [documentation on contributing](CONTRIBUTING.md), or our [Internal Documentation](https://webpack.github.io/webpack-cli/)
The webpack family welcomes any contributor, small or big. We are happy to elaborate, guide you through the source code and find issues you might want to work on! To get started have a look at our [documentation on contributing](CONTRIBUTING.md).

84 changes: 84 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
jobs:
- job: linux
pool:
vmImage: ubuntu-16.04
strategy:
maxParallel: 3
matrix:
node-10:
node_version: ^10.10.0
node-8:
node_version: ^8.12.0
node-6:
node_version: ^6.14.4
steps:
- task: NodeTool@0
displayName: "Install Node.js"
inputs:
versionSpec: $(node_version)
- script: |
npm install -g npm@latest
displayName: "Install npm"
- script: |
npm ci
displayName: "Install dependencies"
- script: |
./node_modules/.bin/lerna bootstrap
displayName: "Lerna bootstrap"
- script: |
npm test
displayName: "Run tests"
- job: macos
pool:
vmImage: "macOS 10.13"
strategy:
maxParallel: 3
matrix:
node-10:
node_version: ^10.10.0
node-8:
node_version: ^8.12.0
steps:
- task: NodeTool@0
displayName: "Install Node.js"
inputs:
versionSpec: $(node_version)
- script: |
npm install -g npm@latest
displayName: "Install npm"
- script: |
npm ci
displayName: "Install dependencies"
- script: |
./node_modules/.bin/lerna bootstrap
displayName: "Lerna bootstrap"
- script: |
npm test
displayName: "Run tests"
- job: windows
pool:
vmImage: vs2017-win2016
strategy:
maxParallel: 3
matrix:
node-8:
node_version: ^8.12.0
node-6:
node_version: ^6.14.4
steps:
- task: NodeTool@0
displayName: "Install Node.js"
inputs:
versionSpec: $(node_version)
- script: |
npm install -g npm@latest
displayName: "Install npm"
- script: |
npm ci
displayName: "Install dependencies"
- script: |
./node_modules/.bin/lerna.cmd bootstrap
displayName: "Lerna bootstrap"
- script: |
npm test
displayName: "Run tests"

0 comments on commit 258473f

Please sign in to comment.