Skip to content

Commit

Permalink
Merge pull request #30 from kotarella1110/v1
Browse files Browse the repository at this point in the history
Release v1.0.0
  • Loading branch information
kotarella1110 authored Mar 24, 2020
2 parents 212dfaa + 41b0259 commit 7f0ed47
Show file tree
Hide file tree
Showing 35 changed files with 7,622 additions and 4,779 deletions.
38 changes: 38 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"projectName": "cordova-plugin-webpack",
"projectOwner": "kotarella1110",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 100,
"commit": true,
"commitConvention": "angular",
"contributors": [
{
"login": "kotarella1110",
"name": "Kotaro Sugawara",
"avatar_url": "https://avatars1.githubusercontent.com/u/12913947?v=4",
"profile": "https://qiita.com/kotarella1110",
"contributions": [
"code",
"doc",
"ideas",
"infra",
"test"
]
},
{
"login": "JimmyMultani",
"name": "Jimmy Multani",
"avatar_url": "https://avatars0.githubusercontent.com/u/1281284?v=4",
"profile": "http://jimmymultani.com",
"contributions": [
"doc",
"code"
]
}
],
"contributorsPerLine": 7
}
36 changes: 36 additions & 0 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: 1
update_configs:
- package_manager: "javascript"
directory: "/"
update_schedule: "live"
default_reviewers:
- "kotarella1110"
allowed_updates:
- match:
dependency_type: "direct"
update_type: "all"
- match:
dependency_type: "indirect"
update_type: "security"
ignored_updates:
- match:
dependency_name: "webpack"
version_requirement: ">= 5.0"
- match:
dependency_name: "webpack-cli"
version_requirement: ">= 4.0"
- match:
dependency_name: "webpack-dev-server"
version_requirement: ">= 4.0"
automerged_updates:
- match:
dependency_type: "development"
update_type: "all"
- match:
dependency_type: "production"
update_type: "semver:patch"
version_requirement_updates: "increase_versions"
commit_message:
prefix: "fix"
prefix_development: "chore"
include_scope: true
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
**/node_modules
scripts/
dist/
!.*.js
30 changes: 6 additions & 24 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,14 @@ module.exports = {
node: true,
browser: true,
},
extends: ['airbnb-base', 'plugin:prettier/recommended'],
plugins: ['@typescript-eslint'],
parser: '@typescript-eslint/parser',
extends: [
'airbnb-typescript/base',
'prettier',
'prettier/@typescript-eslint',
],
plugins: ['prettier'],
parserOptions: {
sourceType: 'module',
project: './tsconfig.json',
createDefaultProgram: true,
},
rules: {
'prettier/prettier': [
'error',
{
singleQuote: true,
trailingComma: 'all',
},
],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'no-useless-constructor': 'off',
'@typescript-eslint/no-useless-constructor': 'error',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.ts'],
},
},
},
};
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,5 @@ $RECYCLE.BIN/
*.lnk


/scripts
/dist
!bin
119 changes: 0 additions & 119 deletions .npmignore

This file was deleted.

10 changes: 4 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
// "editor.formatOnSave": false,
"eslint.autoFixOnSave": true,
"eslint.validate": [
"javascript",
{"language": "typescript", "autoFix": true },
]
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"typescript.tsdk": "node_modules/typescript/lib"
}
39 changes: 30 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
See [1.0.0 Roadmap](https://github.com/kotarella1110/cordova-plugin-webpack/issues/23) ([v1 branch](https://github.com/kotarella1110/cordova-plugin-webpack/tree/v1)). Feedback is welcome 🙏

---

# cordova-plugin-webpack

[![npm version](https://badge.fury.io/js/cordova-plugin-webpack.svg)](https://badge.fury.io/js/cordova-plugin-webpack)
Expand All @@ -22,7 +18,7 @@ Simply install this plugin to easily integrate webpack into your Cordova workflo

## Demo

![Demo](./media/cordova-plugin-webpack-demo.gif)
![Demo](https://github.com/kotarella1110/cordova-plugin-webpack/blob/master/media/cordova-plugin-webpack-demo.gif?raw=true)

## Features

Expand All @@ -38,6 +34,7 @@ Simply install this plugin to easily integrate webpack into your Cordova workflo
## Installation

```shell
$ npm install -D webpack@4 webpack-cli@3 webpack-dev-server@3
$ cordova plugin add cordova-plugin-webpack
```

Expand All @@ -47,12 +44,12 @@ $ cordova plugin add cordova-plugin-webpack

```shell
$ cordova { prepare | platform add | build | run } [<platform> [...]]
[-- [--webpackConfig <webpackConfig> | --livereload]]
[-- [--webpack.<option> <value> | --livereload]]
```
| Option | Description | Default | Aliases |
|--------|-------------|---------|---------|
| `--webpackConfig` | Path to a webpack configuration file | `webpack.config.js` or `webpackfile.js` in your project root directory. | `-w` |
| `--webpack.<option>` | Passed to [webpack-cli options](https://webpack.js.org/api/cli/) or [webpack-dev-server options](https://webpack.js.org/configuration/dev-server/). eg: `--webpack.config example.config.js` <br> **Note: Some options such as [Stats Options](https://webpack.js.org/api/cli/#stats-options) and [Watch Options](https://webpack.js.org/api/cli/#watch-options) are not yet supported.** | `-w` |
| `--livereload` | Enables LiveReload (HMR) | `false` | `-l` |
### Examples
Expand All @@ -63,7 +60,9 @@ $ cordova { prepare | platform add | build | run } [<platform> [...]]
```shell
$ cordova prepare
$ cordova build -- --webpackConfig path/to/dir/webpack.config.js
$ cordova build -- --webpack.config path/to/dir/webpack.config.js
$ cordova build android -- --webpack.mode=production
$ cordova build ios -- --webpack.env.prod
```
#### Live Reload (HMR)
Expand All @@ -72,7 +71,8 @@ $ cordova build -- --webpackConfig path/to/dir/webpack.config.js
```shell
$ cordova prepare -- --livereload
$ cordova run -- -w path/to/dir/webpack.config.babel.js -l
$ cordova run ios -- -w.config path/to/dir/webpack.config.babel.js -l
$ cordova run android -- --livereload --webpack.port=8888 --webpack.watch-content-base=false
```
## Usage
Expand Down Expand Up @@ -240,6 +240,27 @@ module.exports = {
Contributions are always welcome! Please read the [contributing](./CONTRIBUTING.md) first.
## Contributors
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://qiita.com/kotarella1110"><img src="https://avatars1.githubusercontent.com/u/12913947?v=4" width="100px;" alt=""/><br /><sub><b>Kotaro Sugawara</b></sub></a><br /><a href="https://github.com/kotarella1110/cordova-plugin-webpack/commits?author=kotarella1110" title="Code">💻</a> <a href="https://github.com/kotarella1110/cordova-plugin-webpack/commits?author=kotarella1110" title="Documentation">📖</a> <a href="#ideas-kotarella1110" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-kotarella1110" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/kotarella1110/cordova-plugin-webpack/commits?author=kotarella1110" title="Tests">⚠️</a></td>
<td align="center"><a href="http://jimmymultani.com"><img src="https://avatars0.githubusercontent.com/u/1281284?v=4" width="100px;" alt=""/><br /><sub><b>Jimmy Multani</b></sub></a><br /><a href="https://github.com/kotarella1110/cordova-plugin-webpack/commits?author=JimmyMultani" title="Documentation">📖</a> <a href="https://github.com/kotarella1110/cordova-plugin-webpack/commits?author=JimmyMultani" title="Code">💻</a></td>
</tr>
</table>
<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
## License
[Apache-2.0](./LICENSE) © [Kotaro Sugawara](https://twitter.com/kotarella1110)
Loading

0 comments on commit 7f0ed47

Please sign in to comment.