refactor(plugin): modernize plugin architecture and improve type definitions
- Update package.json with modern build tooling and dependencies - Streamline and enhance TypeScript definitions for better type safety - Reorganize plugin structure for better maintainability - Add comprehensive interface definitions for notification features - Implement proper build configuration with rollup - Update tsconfig.json for stricter type checking and ES2020 modules Breaking Changes: - Changed module structure to use ES modules - Updated interface definitions with stricter typing - Removed redundant notification options - Simplified API surface while maintaining core functionality Dependencies: - Upgrade @capacitor dependencies to v5.7.8 - Add rollup and typescript build tools - Update test framework configuration
This commit is contained in:
76
package.json
76
package.json
@@ -1,65 +1,53 @@
|
||||
{
|
||||
"name": "capacitor-daily-notification",
|
||||
"version": "0.0.1",
|
||||
"description": "Capacitor plugin for daily notifications with network content",
|
||||
"name": "@timesafari/daily-notification-plugin",
|
||||
"version": "1.0.0",
|
||||
"description": "A Capacitor plugin for scheduling and managing daily notifications on Android devices",
|
||||
"main": "dist/plugin.js",
|
||||
"module": "dist/esm/index.js",
|
||||
"types": "dist/types/index.d.ts",
|
||||
"types": "dist/esm/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "npm run clean && tsc",
|
||||
"build": "npm run clean && tsc && rollup -c rollup.config.js",
|
||||
"clean": "rimraf ./dist",
|
||||
"watch": "tsc --watch",
|
||||
"prepublishOnly": "npm run build",
|
||||
"build:android": "chmod +x scripts/build-native.sh && ./scripts/build-native.sh --platform android",
|
||||
"build:ios": "chmod +x scripts/build-native.sh && ./scripts/build-native.sh --platform ios",
|
||||
"build:native": "chmod +x scripts/build-native.sh && ./scripts/build-native.sh --platform all",
|
||||
"test:android": "cd android && ./gradlew test",
|
||||
"test:ios": "cd ios && xcodebuild test -scheme DailyNotificationPlugin -destination 'platform=iOS Simulator,name=iPhone 14'",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
"test:coverage": "jest --coverage",
|
||||
"lint": "eslint . --ext .ts",
|
||||
"lint:fix": "eslint . --ext .ts --fix",
|
||||
"validate": "npm run lint && npm run build && npm run test:android",
|
||||
"validate:ios": "npm run lint && npm run build && npm run test:ios",
|
||||
"preinstall": "node scripts/check-environment.js",
|
||||
"postinstall": "node scripts/setup-native.js"
|
||||
"format": "prettier --write \"src/**/*.ts\""
|
||||
},
|
||||
"keywords": [
|
||||
"capacitor",
|
||||
"android",
|
||||
"notification",
|
||||
"daily",
|
||||
"plugin"
|
||||
],
|
||||
"author": "Matthew Raymer",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@capacitor/android": "^5.0.0",
|
||||
"@capacitor/core": "^5.0.0",
|
||||
"@capacitor/ios": "^5.0.0"
|
||||
"@capacitor/core": "^5.7.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@capacitor/android": "^5.7.8",
|
||||
"@capacitor/cli": "^5.0.0",
|
||||
"@jest/globals": "^29.5.0",
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/node": "^20.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
||||
"@typescript-eslint/parser": "^6.0.0",
|
||||
"eslint": "^8.0.0",
|
||||
"@capacitor/ios": "^5.0.0",
|
||||
"@types/jest": "^29.5.0",
|
||||
"@types/node": "^18.15.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.57.0",
|
||||
"@typescript-eslint/parser": "^5.57.0",
|
||||
"eslint": "^8.37.0",
|
||||
"jest": "^29.5.0",
|
||||
"rimraf": "^5.0.0",
|
||||
"prettier": "^2.8.7",
|
||||
"rimraf": "^4.4.0",
|
||||
"rollup": "^3.20.0",
|
||||
"rollup-plugin-typescript2": "^0.31.0",
|
||||
"ts-jest": "^29.1.0",
|
||||
"typescript": "^5.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@capacitor/core": "^5.0.0"
|
||||
},
|
||||
"files": [
|
||||
"dist/",
|
||||
"ios/",
|
||||
"android/",
|
||||
"CapacitorDailyNotification.podspec"
|
||||
],
|
||||
"keywords": [
|
||||
"capacitor",
|
||||
"plugin",
|
||||
"native",
|
||||
"notification",
|
||||
"daily"
|
||||
"DailyNotificationPlugin.podspec"
|
||||
],
|
||||
"capacitor": {
|
||||
"ios": {
|
||||
@@ -75,5 +63,17 @@
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/yourusername/capacitor-daily-notification/issues"
|
||||
},
|
||||
"jest": {
|
||||
"preset": "ts-jest",
|
||||
"testEnvironment": "node",
|
||||
"moduleFileExtensions": [
|
||||
"ts",
|
||||
"tsx",
|
||||
"js",
|
||||
"jsx",
|
||||
"json",
|
||||
"node"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user