diff --git a/demo-ng/package.json b/demo-ng/package.json index a2fa152..db440ba 100644 --- a/demo-ng/package.json +++ b/demo-ng/package.json @@ -1,13 +1,10 @@ { "nativescript": { - "id": "org.nativescript.demong", - "tns-android": { - "version": "6.3.1" - } + "id": "org.nativescript.demong" }, "dependencies": { "@nativescript/angular": "~8.20.4", - "@nativescript/core": "^6.3.2", + "@nativescript/core": "^6.4.1", "@nstudio/nativescript-camera-plus": "file:../src", "@angular/animations": "8.2.14", "@angular/common": "^8.2.14", @@ -33,7 +30,7 @@ "@ngtools/webpack": "~8.3.21", "nativescript-dev-webpack": "~1.4.1", "tslint": "~6.0.0", - "typescript": "3.7.4" + "typescript": "3.7.5" }, "scripts": { "build.plugin": "cd ../src && npm run build", diff --git a/demo/app/package.json b/demo/app/package.json index df14883..1341be8 100644 --- a/demo/app/package.json +++ b/demo/app/package.json @@ -1,106 +1,8 @@ { "name": "tns-template-hello-world-ts", "main": "app.js", - "version": "1.6.0", - "author": { - "name": "Telerik", - "email": "support@telerik.com" - }, - "description": "Nativescript hello-world-ts project template", - "license": "Apache-2.0", - "keywords": [ - "telerik", - "mobile", - "nativescript", - "{N}", - "tns", - "appbuilder", - "template" - ], - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/NativeScript/template-hello-world-ts.git" - }, - "bugs": { - "url": "https://github.com/NativeScript/template-hello-world-ts/issues" - }, - "homepage": "https://github.com/NativeScript/template-hello-world-ts", "android": { "v8Flags": "--expose_gc", "markingMode": "none" - }, - "devDependencies": { - "nativescript-dev-typescript": "^0.3.0" - }, - "_id": "tns-template-hello-world-ts@1.6.0", - "_shasum": "a567c2b9a56024818c06596dab9629d155c5b8a8", - "_resolved": "https://registry.npmjs.org/tns-template-hello-world-ts/-/tns-template-hello-world-ts-1.6.0.tgz", - "_from": "tns-template-hello-world-ts@latest", - "scripts": {}, - "_npmVersion": "2.14.7", - "_nodeVersion": "4.2.2", - "_npmUser": { - "name": "enchev", - "email": "vladimir.enchev@gmail.com" - }, - "dist": { - "shasum": "a567c2b9a56024818c06596dab9629d155c5b8a8", - "tarball": "http://registry.npmjs.org/tns-template-hello-world-ts/-/tns-template-hello-world-ts-1.6.0.tgz" - }, - "maintainers": [ - { - "name": "enchev", - "email": "vladimir.enchev@gmail.com" - }, - { - "name": "erjangavalji", - "email": "erjan.gavalji@gmail.com" - }, - { - "name": "fatme", - "email": "hfatme@gmail.com" - }, - { - "name": "hdeshev", - "email": "hristo@deshev.com" - }, - { - "name": "kerezov", - "email": "d.kerezov@gmail.com" - }, - { - "name": "ligaz", - "email": "stefan.dobrev@gmail.com" - }, - { - "name": "nsndeck", - "email": "nedyalko.nikolov@telerik.com" - }, - { - "name": "rosen-vladimirov", - "email": "rosen.vladimirov.91@gmail.com" - }, - { - "name": "sdobrev", - "email": "stefan.dobrev@gmail.com" - }, - { - "name": "tailsu", - "email": "tailsu@gmail.com" - }, - { - "name": "teobugslayer", - "email": "teobugslayer@gmail.com" - }, - { - "name": "valio.stoychev", - "email": "valio.stoychev@gmail.com" - } - ], - "_npmOperationalInternal": { - "host": "packages-5-east.internal.npmjs.com", - "tmp": "tmp/tns-template-hello-world-ts-1.6.0.tgz_1455717516189_0.6427943941671401" - }, - "directories": {}, - "readme": "ERROR: No README data found!" + } } diff --git a/demo/package.json b/demo/package.json index 84271bc..666aa00 100644 --- a/demo/package.json +++ b/demo/package.json @@ -2,14 +2,17 @@ "nativescript": { "id": "org.nativescript.demo", "tns-android": { - "version": "6.3.1" + "version": "6.4.1" + }, + "tns-ios": { + "version": "6.4.2" } }, "dependencies": { "@nstudio/nativescript-camera-plus": "file:../src", "nativescript-theme-core": "^1.0.4", "nativescript-unit-test-runner": "0.7.0", - "@nativescript/core": "^6.3.2" + "@nativescript/core": "^6.4.1" }, "devDependencies": { "jasmine-core": "^2.5.2", @@ -17,10 +20,10 @@ "karma-jasmine": "2.0.1", "karma-nativescript-launcher": "^0.4.0", "nativescript-css-loader": "~0.26.1", - "nativescript-dev-webpack": "1.4.1", - "tns-platform-declarations": "^6.3.2", + "nativescript-dev-webpack": "1.5.1", + "tns-platform-declarations": "^6.4.1", "tslint": "~6.0.0", - "typescript": "^3.7.4", + "typescript": "~3.7.5", "karma-webpack": "3.0.5" }, "scripts": { diff --git a/demo/tsconfig.json b/demo/tsconfig.json index 90b9e53..fa77ca2 100644 --- a/demo/tsconfig.json +++ b/demo/tsconfig.json @@ -1,18 +1,18 @@ { "compilerOptions": { "module": "commonjs", - "target": "es2015", + "target": "es5", "experimentalDecorators": true, "emitDecoratorMetadata": true, + "skipLibCheck": true, "noEmitHelpers": true, "noEmitOnError": false, - "skipLibCheck": true, - "lib": ["es2017", "dom", "es6"], + "diagnostics": true, + "lib": ["es6", "dom"], "baseUrl": ".", "paths": { - "*": ["./node_modules/tns-core-modules/*", "./node_modules/*"], "~/*": ["app/*"] } }, - "exclude": ["node_modules", "platforms", "**/*.aot.ts"] + "exclude": ["node_modules", "platforms", "**/*.aot.ts", "../src/node_modules"] } diff --git a/demo/tsconfig.tns.json b/demo/tsconfig.tns.json index ce748fd..a066cc8 100644 --- a/demo/tsconfig.tns.json +++ b/demo/tsconfig.tns.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig", "compilerOptions": { - "module": "es2015", + "module": "esNext", "moduleResolution": "node" } } diff --git a/demo/webpack.config.js b/demo/webpack.config.js index e939df7..9310da2 100644 --- a/demo/webpack.config.js +++ b/demo/webpack.config.js @@ -14,9 +14,10 @@ const hashSalt = Date.now().toString(); module.exports = env => { // Add your custom Activities, Services and other Android app components here. - const appComponents = ['tns-core-modules/ui/frame', 'tns-core-modules/ui/frame/activity']; + const appComponents = env.appComponents || []; + appComponents.push(...['tns-core-modules/ui/frame', 'tns-core-modules/ui/frame/activity']); - const platform = env && ((env.android && 'android') || (env.ios && 'ios')); + const platform = env && ((env.android && 'android') || (env.ios && 'ios') || env.platform); if (!platform) { throw new Error('You need to provide a target platform!'); } @@ -24,6 +25,10 @@ module.exports = env => { const platforms = ['ios', 'android']; const projectRoot = __dirname; + if (env.platform) { + platforms.push(env.platform); + } + // Default destination inside platforms//... const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot)); @@ -53,13 +58,10 @@ module.exports = env => { const externals = nsWebpack.getConvertedExternals(env.externals); const appFullPath = resolve(projectRoot, appPath); - const hasRootLevelScopedModules = nsWebpack.hasRootLevelScopedModules({ - projectDir: projectRoot - }); + const hasRootLevelScopedModules = nsWebpack.hasRootLevelScopedModules({ projectDir: projectRoot }); let coreModulesPackageName = 'tns-core-modules'; - const alias = { - '~': appFullPath - }; + const alias = env.alias || {}; + alias['~'] = appFullPath; if (hasRootLevelScopedModules) { coreModulesPackageName = '@nativescript/core'; @@ -69,7 +71,8 @@ module.exports = env => { const entryModule = nsWebpack.getEntryModule(appFullPath, platform); const entryPath = `.${sep}${entryModule}.ts`; - const entries = { bundle: entryPath }; + const entries = env.entries || {}; + entries.bundle = entryPath; const tsConfigPath = resolve(projectRoot, 'tsconfig.tns.json'); @@ -206,10 +209,7 @@ module.exports = env => { use: 'nativescript-dev-webpack/hmr/hot-loader' }, - { - test: /\.(html|xml)$/, - use: 'nativescript-dev-webpack/xml-namespace-loader' - }, + { test: /\.(html|xml)$/, use: 'nativescript-dev-webpack/xml-namespace-loader' }, { test: /\.css$/, diff --git a/src/package.json b/src/package.json index d7b905c..aa89349 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { "name": "@nstudio/nativescript-camera-plus", - "version": "3.0.6", + "version": "3.0.7", "description": "An advanced, embeddable camera for NativeScript.", "main": "camera-plus", "typings": "index.d.ts",