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

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

@@ -1,4 +1,4 @@
1
-import { LayoutType, isLayoutType } from './LayoutType';
1
+import { LayoutType } from './LayoutType';
2 2
 
3 3
 describe('LayoutType', () => {
4 4
   it('is an enum', () => {
@@ -9,11 +9,4 @@ describe('LayoutType', () => {
9 9
     expect(LayoutType[name]).toEqual(LayoutType.Stack);
10 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,7 +9,3 @@ export enum LayoutType {
9 9
   TopTabs = 'TopTabs',
10 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,19 +0,0 @@
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,4 +0,0 @@
1
-#!/bin/bash -e
2
-
3
-brew tap wix/brew
4
-brew install wix/brew/applesimutils