Skip to content

Commit

Permalink
chore: update config to match other plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
aparajita committed Apr 8, 2021
1 parent a455299 commit 6606075
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 19 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.java]
indent_size = 4

[*.md]
trim_trailing_whitespace = false
12 changes: 12 additions & 0 deletions .versionrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
types: [
{ type: 'feat', section: 'Features' },
{ type: 'fix', section: 'Bug Fixes' },
{ type: 'chore', section: 'Maintenance' },
{ type: 'docs', section: 'Docs' },
{ type: 'style', section: 'Style' },
{ type: 'refactor', section: 'Refactoring' },
{ type: 'perf', section: 'Performance' },
{ type: 'test', hidden: true },
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require 'json'
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

Pod::Spec.new do |s|
s.name = 'WillsubCapacitorLogger'
s.name = 'AparajitaCapacitorLogger'
s.version = package['version']
s.summary = package['description']
s.license = package['license']
Expand Down
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright 2020-present Aparajita Fishman

MIT License

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34 changes: 23 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@
"module": "dist/esm/index.js",
"types": "dist/esm/index.d.ts",
"scripts": {
"clean": "rimraf ./dist",
"build": "npm run clean && tsc && rollup -c rollup.config.js",
"watch": "nodemon -w ./src -w tsconfig.json -w rollup.config.js --exec 'npm run build --silent' -e ts",
"lint": "npm run prettier && npm run swiftlint",
"lint.fix": "npm run prettier.fix && npm run swiftlint.fix",
"prettier": "prettier --check --plugin=./node_modules/prettier-plugin-java \"**/*.{css,html,ts,js,java}\"",
"prettier.fix": "prettier --write --check --plugin=./node_modules/prettier-plugin-java \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"swiftlint.fix": "node-swiftlint autocorrect",
"build": "npm run clean && tsc && rollup -c rollup.config.js",
"clean": "rimraf ./dist",
"watch": "nodemon -w ./src -w tsconfig.json -w rollup.config.js --exec 'pnpm build' -e ts",
"prepublishOnly": "npm run build"
"swiftlint": "cd ios; node-swiftlint; cd ..",
"swiftlint.fix": "cd ios; node-swiftlint --fix; cd ..",
"docgen": "docgen --api WSLoggerPlugin --output-readme README.md",
"release": "standard-version",
"push": "git push --follow-tags origin main && npm publish"
},
"author": "Aparajita Fishman",
"license": "MIT",
Expand All @@ -38,15 +40,25 @@
"@capacitor/core": "^2.4.2"
},
"files": [
"dist/",
"ios/",
"android/",
"WillsubNpmCapacitorLogger.podspec"
"dist/esm/*.d.ts",
"dist/esm/*.js",
"ios/Plugin",
"ios/Podfile",
"ios/Podfile.lock",
"android/build.gradle",
"android/gradle.properties",
"android/settings.gradle",
"android/src/main",
"*.podspec"
],
"keywords": [
"capacitor",
"plugin",
"native"
"native",
"logging",
"logger",
"ios",
"android"
],
"capacitor": {
"ios": {
Expand Down
4 changes: 3 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import commonjs from '@rollup/plugin-commonjs';
import nodeResolve from '@rollup/plugin-node-resolve';

export default {
Expand All @@ -15,7 +16,8 @@ export default {
nodeResolve({
// allowlist of dependencies to bundle in
// @see https://github.com/rollup/plugins/tree/master/packages/node-resolve#resolveonly
resolveOnly: ['lodash'],
resolveOnly: ['@aparajita/capacitor-native-decorator', 'tslib'],
}),
commonjs(),
],
};
12 changes: 6 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"compilerOptions": {
"allowUnreachableCode": false,
"strict": true,
"allowSyntheticDefaultImports": true,
"declaration": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"importHelpers": true,
"lib": [
"dom",
"esnext"
],
"module": "esnext",
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"outDir": "dist/esm",
"pretty": true,
"sourceMap": true,
"strict": true,
"target": "esnext"
"target": "es2017"
},
"files": [
"src/index.ts"
Expand Down

0 comments on commit 6606075

Please sign in to comment.