refactor: improve build configuration and code organization
- Add build scripts for Android and iOS platforms - Remove duplicate web implementation (src/web.ts) - Add proper TypeScript configuration - Add module documentation to index.ts - Clean up package.json scripts This commit improves the project structure and build process by: 1. Adding dedicated build scripts for native platforms 2. Removing redundant web implementation 3. Adding proper TypeScript configuration with strict mode 4. Improving code documentation 5. Organizing package.json scripts The changes maintain backward compatibility while improving the development experience and code quality.
This commit is contained in:
43
package.json
43
package.json
@@ -9,16 +9,40 @@
|
||||
"build": "npm run clean && tsc",
|
||||
"clean": "rimraf ./dist",
|
||||
"watch": "tsc --watch",
|
||||
"prepublishOnly": "npm run build"
|
||||
"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"
|
||||
},
|
||||
"author": "Matthew Raymer",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@capacitor/android": "^5.0.0",
|
||||
"@capacitor/core": "^5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^4.9.0",
|
||||
"rimraf": "^3.0.2"
|
||||
"@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",
|
||||
"jest": "^29.5.0",
|
||||
"rimraf": "^5.0.0",
|
||||
"ts-jest": "^29.1.0",
|
||||
"typescript": "^5.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@capacitor/core": "^5.0.0"
|
||||
@@ -32,7 +56,9 @@
|
||||
"keywords": [
|
||||
"capacitor",
|
||||
"plugin",
|
||||
"native"
|
||||
"native",
|
||||
"notification",
|
||||
"daily"
|
||||
],
|
||||
"capacitor": {
|
||||
"ios": {
|
||||
@@ -41,5 +67,12 @@
|
||||
"android": {
|
||||
"src": "android"
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/yourusername/capacitor-daily-notification"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/yourusername/capacitor-daily-notification/issues"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user