diff --git a/.all-contributorsrc b/.all-contributorsrc new file mode 100644 index 00000000..3cb8e717 --- /dev/null +++ b/.all-contributorsrc @@ -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 +} diff --git a/.dependabot/config.yml b/.dependabot/config.yml new file mode 100644 index 00000000..c06d19ef --- /dev/null +++ b/.dependabot/config.yml @@ -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 \ No newline at end of file diff --git a/.eslintignore b/.eslintignore index 9d5b4bb1..827de64b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,3 @@ **/node_modules -scripts/ +dist/ !.*.js \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 95b275af..8c483018 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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'], - }, - }, - }, }; diff --git a/.gitignore b/.gitignore index 98b61fd4..208d4618 100644 --- a/.gitignore +++ b/.gitignore @@ -123,4 +123,5 @@ $RECYCLE.BIN/ *.lnk -/scripts +/dist +!bin \ No newline at end of file diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 679ff0ca..00000000 --- a/.npmignore +++ /dev/null @@ -1,119 +0,0 @@ -### Linux ### -*~ - -# temporary files which can be created if a process still has a handle open of a deleted file -.fuse_hidden* - -# KDE directory preferences -.directory - -# Linux trash folder which might appear on any partition or disk -.Trash-* - -# .nfs files are created when an open file is removed but is still being accessed -.nfs* - -### macOS ### -*.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -### Node ### -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Typescript v1 declaration files -typings/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env - - -### Windows ### -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Folder config file -Desktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msm -*.msp - -# Windows shortcuts -*.lnk - - -/src \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index bb9f4627..97582e93 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -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" } \ No newline at end of file diff --git a/README.md b/README.md index b32a424b..e5bbc206 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 @@ -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 ``` @@ -47,12 +44,12 @@ $ cordova plugin add cordova-plugin-webpack ```shell $ cordova { prepare | platform add | build | run } [ [...]] - [-- [--webpackConfig | --livereload]] + [-- [--webpack.