Skip to content

Commit

Permalink
fix demo apps
Browse files Browse the repository at this point in the history
  • Loading branch information
bradmartin committed Feb 27, 2020
1 parent 8ede3fa commit 99a2f71
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 130 deletions.
9 changes: 3 additions & 6 deletions demo-ng/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
100 changes: 1 addition & 99 deletions demo/app/package.json
Original file line number Diff line number Diff line change
@@ -1,106 +1,8 @@
{
"name": "tns-template-hello-world-ts",
"main": "app.js",
"version": "1.6.0",
"author": {
"name": "Telerik",
"email": "[email protected]"
},
"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://[email protected]/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": "[email protected]",
"_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": "[email protected]"
},
"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": "[email protected]"
},
{
"name": "erjangavalji",
"email": "[email protected]"
},
{
"name": "fatme",
"email": "[email protected]"
},
{
"name": "hdeshev",
"email": "[email protected]"
},
{
"name": "kerezov",
"email": "[email protected]"
},
{
"name": "ligaz",
"email": "[email protected]"
},
{
"name": "nsndeck",
"email": "[email protected]"
},
{
"name": "rosen-vladimirov",
"email": "[email protected]"
},
{
"name": "sdobrev",
"email": "[email protected]"
},
{
"name": "tailsu",
"email": "[email protected]"
},
{
"name": "teobugslayer",
"email": "[email protected]"
},
{
"name": "valio.stoychev",
"email": "[email protected]"
}
],
"_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!"
}
}
13 changes: 8 additions & 5 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,28 @@
"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",
"karma": "4.1.0",
"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": {
Expand Down
10 changes: 5 additions & 5 deletions demo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"]
}
2 changes: 1 addition & 1 deletion demo/tsconfig.tns.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"module": "es2015",
"module": "esNext",
"moduleResolution": "node"
}
}
26 changes: 13 additions & 13 deletions demo/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,21 @@ 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!');
}

const platforms = ['ios', 'android'];
const projectRoot = __dirname;

if (env.platform) {
platforms.push(env.platform);
}

// Default destination inside platforms/<platform>/...
const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot));

Expand Down Expand Up @@ -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';
Expand All @@ -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');

Expand Down Expand Up @@ -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$/,
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 99a2f71

Please sign in to comment.