Skip to content

Commit 6606075

Browse files
committed
chore: update config to match other plugins
1 parent a455299 commit 6606075

7 files changed

Lines changed: 83 additions & 19 deletions

File tree

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.java]
13+
indent_size = 4
14+
15+
[*.md]
16+
trim_trailing_whitespace = false

.versionrc.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
types: [
3+
{ type: 'feat', section: 'Features' },
4+
{ type: 'fix', section: 'Bug Fixes' },
5+
{ type: 'chore', section: 'Maintenance' },
6+
{ type: 'docs', section: 'Docs' },
7+
{ type: 'style', section: 'Style' },
8+
{ type: 'refactor', section: 'Refactoring' },
9+
{ type: 'perf', section: 'Performance' },
10+
{ type: 'test', hidden: true },
11+
],
12+
};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ require 'json'
33
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
44

55
Pod::Spec.new do |s|
6-
s.name = 'WillsubCapacitorLogger'
6+
s.name = 'AparajitaCapacitorLogger'
77
s.version = package['version']
88
s.summary = package['description']
99
s.license = package['license']

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright 2020-present Aparajita Fishman
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
"Software"), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

package.json

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@
66
"module": "dist/esm/index.js",
77
"types": "dist/esm/index.d.ts",
88
"scripts": {
9+
"clean": "rimraf ./dist",
10+
"build": "npm run clean && tsc && rollup -c rollup.config.js",
11+
"watch": "nodemon -w ./src -w tsconfig.json -w rollup.config.js --exec 'npm run build --silent' -e ts",
912
"lint": "npm run prettier && npm run swiftlint",
1013
"lint.fix": "npm run prettier.fix && npm run swiftlint.fix",
1114
"prettier": "prettier --check --plugin=./node_modules/prettier-plugin-java \"**/*.{css,html,ts,js,java}\"",
1215
"prettier.fix": "prettier --write --check --plugin=./node_modules/prettier-plugin-java \"**/*.{css,html,ts,js,java}\"",
13-
"swiftlint": "node-swiftlint",
14-
"swiftlint.fix": "node-swiftlint autocorrect",
15-
"build": "npm run clean && tsc && rollup -c rollup.config.js",
16-
"clean": "rimraf ./dist",
17-
"watch": "nodemon -w ./src -w tsconfig.json -w rollup.config.js --exec 'pnpm build' -e ts",
18-
"prepublishOnly": "npm run build"
16+
"swiftlint": "cd ios; node-swiftlint; cd ..",
17+
"swiftlint.fix": "cd ios; node-swiftlint --fix; cd ..",
18+
"docgen": "docgen --api WSLoggerPlugin --output-readme README.md",
19+
"release": "standard-version",
20+
"push": "git push --follow-tags origin main && npm publish"
1921
},
2022
"author": "Aparajita Fishman",
2123
"license": "MIT",
@@ -38,15 +40,25 @@
3840
"@capacitor/core": "^2.4.2"
3941
},
4042
"files": [
41-
"dist/",
42-
"ios/",
43-
"android/",
44-
"WillsubNpmCapacitorLogger.podspec"
43+
"dist/esm/*.d.ts",
44+
"dist/esm/*.js",
45+
"ios/Plugin",
46+
"ios/Podfile",
47+
"ios/Podfile.lock",
48+
"android/build.gradle",
49+
"android/gradle.properties",
50+
"android/settings.gradle",
51+
"android/src/main",
52+
"*.podspec"
4553
],
4654
"keywords": [
4755
"capacitor",
4856
"plugin",
49-
"native"
57+
"native",
58+
"logging",
59+
"logger",
60+
"ios",
61+
"android"
5062
],
5163
"capacitor": {
5264
"ios": {

rollup.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import commonjs from '@rollup/plugin-commonjs';
12
import nodeResolve from '@rollup/plugin-node-resolve';
23

34
export default {
@@ -15,7 +16,8 @@ export default {
1516
nodeResolve({
1617
// allowlist of dependencies to bundle in
1718
// @see https://github.com/rollup/plugins/tree/master/packages/node-resolve#resolveonly
18-
resolveOnly: ['lodash'],
19+
resolveOnly: ['@aparajita/capacitor-native-decorator', 'tslib'],
1920
}),
21+
commonjs(),
2022
],
2123
};

tsconfig.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
22
"compilerOptions": {
3-
"allowUnreachableCode": false,
3+
"strict": true,
4+
"allowSyntheticDefaultImports": true,
45
"declaration": true,
5-
"esModuleInterop": true,
6+
"experimentalDecorators": true,
7+
"importHelpers": true,
68
"lib": [
79
"dom",
810
"esnext"
911
],
1012
"module": "esnext",
1113
"moduleResolution": "node",
12-
"noFallthroughCasesInSwitch": true,
14+
"noImplicitAny": true,
1315
"noUnusedLocals": true,
1416
"noUnusedParameters": true,
1517
"outDir": "dist/esm",
16-
"pretty": true,
1718
"sourceMap": true,
18-
"strict": true,
19-
"target": "esnext"
19+
"target": "es2017"
2020
},
2121
"files": [
2222
"src/index.ts"

0 commit comments

Comments
 (0)