commit 38aef2c40d5b9ba0b6ad3fb5b3b9baa809ded835 Author: CRT Date: Fri Oct 9 15:02:07 2026 +0000 Scaffold Capacitor 8 plugin package (capacitor-levelplay) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0373d8e --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +# node +node_modules/ +*.tgz + +# SwiftPM / Xcode +.build/ +.swiftpm/ +DerivedData/ +xcuserdata/ +*.xcodeproj/ +Package.resolved + +# Android +android/build/ +android/.gradle/ +android/local.properties +android/.idea/ +*.iml + +.DS_Store diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..02c6a85 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 VOX Games + +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. diff --git a/package.json b/package.json new file mode 100644 index 0000000..c6a275d --- /dev/null +++ b/package.json @@ -0,0 +1,61 @@ +{ + "name": "capacitor-levelplay", + "version": "0.1.0", + "description": "Capacitor 8 plugin for Unity LevelPlay (ironSource) rewarded and interstitial ads. Swift Package Manager first, ad-unit API.", + "main": "dist/plugin.cjs.js", + "module": "dist/esm/index.js", + "types": "dist/esm/index.d.ts", + "unpkg": "dist/plugin.js", + "files": [ + "android/src/main/", + "android/build.gradle", + "android/proguard-rules.pro", + "dist/", + "ios/Sources", + "Package.swift", + "CapacitorLevelplay.podspec" + ], + "author": "VOX Games", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://git.crt.fyi/CRT/capacitor-levelplay.git" + }, + "keywords": [ + "capacitor", + "plugin", + "native", + "levelplay", + "ironsource", + "unity", + "ads", + "rewarded", + "interstitial" + ], + "scripts": { + "build": "rm -rf dist && tsc && rollup -c rollup.config.mjs", + "typecheck": "tsc --noEmit", + "verify:ios": "xcodebuild build -scheme CapacitorLevelplay -destination 'generic/platform=iOS Simulator'", + "verify:web": "bun run build", + "prepublishOnly": "bun run build" + }, + "devDependencies": { + "@capacitor/core": "^8.0.0", + "rollup": "^4.53.3", + "typescript": "^5.9.3" + }, + "peerDependencies": { + "@capacitor/core": ">=8.0.0" + }, + "capacitor": { + "ios": { + "src": "ios" + }, + "android": { + "src": "android" + } + }, + "publishConfig": { + "access": "public" + } +} diff --git a/rollup.config.mjs b/rollup.config.mjs new file mode 100644 index 0000000..ea61509 --- /dev/null +++ b/rollup.config.mjs @@ -0,0 +1,22 @@ +export default { + input: 'dist/esm/index.js', + output: [ + { + file: 'dist/plugin.js', + format: 'iife', + name: 'capacitorLevelPlay', + globals: { + '@capacitor/core': 'capacitorExports', + }, + sourcemap: true, + inlineDynamicImports: true, + }, + { + file: 'dist/plugin.cjs.js', + format: 'cjs', + sourcemap: true, + inlineDynamicImports: true, + }, + ], + external: ['@capacitor/core'], +}; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..2bf6f98 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "allowUnreachableCode": false, + "declaration": true, + "esModuleInterop": true, + "inlineSources": true, + "lib": ["dom", "es2017"], + "module": "esnext", + "moduleResolution": "node", + "noFallthroughCasesInSwitch": true, + "noUnusedLocals": true, + "noUnusedParameters": false, + "outDir": "dist/esm", + "pretty": true, + "sourceMap": true, + "strict": true, + "target": "es2017" + }, + "files": ["src/index.ts"] +}