Browse Source

removed old scripts, LayoutType proper enum

Daniel Zlotin 6 years ago
parent
commit
12ff504583

+ 2
- 2
lib/src/commands/LayoutTreeCrawler.ts View File

1
 import * as _ from 'lodash';
1
 import * as _ from 'lodash';
2
 import { OptionsProcessor } from './OptionsProcessor';
2
 import { OptionsProcessor } from './OptionsProcessor';
3
-import { LayoutType, isLayoutType } from './LayoutType';
3
+import { LayoutType } from './LayoutType';
4
 
4
 
5
 export interface Data {
5
 export interface Data {
6
   name?: string;
6
   name?: string;
58
   }
58
   }
59
 
59
 
60
   _assertKnownLayoutType(type) {
60
   _assertKnownLayoutType(type) {
61
-    if (!isLayoutType(type)) {
61
+    if (!LayoutType[type]) {
62
       throw new Error(`Unknown layout type ${type}`);
62
       throw new Error(`Unknown layout type ${type}`);
63
     }
63
     }
64
   }
64
   }

+ 1
- 8
lib/src/commands/LayoutType.test.ts View File

1
-import { LayoutType, isLayoutType } from './LayoutType';
1
+import { LayoutType } from './LayoutType';
2
 
2
 
3
 describe('LayoutType', () => {
3
 describe('LayoutType', () => {
4
   it('is an enum', () => {
4
   it('is an enum', () => {
9
     expect(LayoutType[name]).toEqual(LayoutType.Stack);
9
     expect(LayoutType[name]).toEqual(LayoutType.Stack);
10
     expect(LayoutType['asdasd']).toEqual(undefined); //tslint:disable-line
10
     expect(LayoutType['asdasd']).toEqual(undefined); //tslint:disable-line
11
   });
11
   });
12
-
13
-  it('isLayoutType', () => {
14
-    expect(isLayoutType('')).toBe(false);
15
-    expect(isLayoutType('asdasd')).toBe(false);
16
-    expect(isLayoutType('TopTabs')).toBe(true);
17
-    expect(isLayoutType('isLayoutType')).toBe(false);
18
-  });
19
 });
12
 });

+ 0
- 4
lib/src/commands/LayoutType.ts View File

9
   TopTabs = 'TopTabs',
9
   TopTabs = 'TopTabs',
10
   ExternalComponent = 'ExternalComponent'
10
   ExternalComponent = 'ExternalComponent'
11
 }
11
 }
12
-
13
-export function isLayoutType(name: string): boolean {
14
-  return !!LayoutType[name];
15
-}

+ 0
- 19
scripts/env/env-android.sh View File

1
-#!/bin/bash -e
2
-
3
-scriptdir="$(dirname "${BASH_SOURCE[0]}")"
4
-
5
-export ANDROID_HOME=$HOME/android-sdk
6
-export PATH=$PATH:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools
7
-
8
-mkdir $ANDROID_HOME
9
-
10
-# fix for https://code.google.com/p/android/issues/detail?id=223424
11
-mkdir -p ~/.android
12
-touch ~/.android/repositories.cfg
13
-
14
-echo "Downloading Android SDK"
15
-curl https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip > android-sdk.zip
16
-unzip android-sdk.zip -d $ANDROID_HOME
17
-
18
-echo "Accepting Android Licenses"
19
-yes | sdkmanager --licenses

+ 0
- 4
scripts/env/env-ios.sh View File

1
-#!/bin/bash -e
2
-
3
-brew tap wix/brew
4
-brew install wix/brew/applesimutils