├── src
├── platforms
│ ├── ios
│ │ ├── build.xcconfig
│ │ ├── Info.plist
│ │ └── README.md
│ └── android
│ │ ├── include.gradle
│ │ ├── AndroidManifest.xml
│ │ └── README.md
├── .npmignore
├── angular
│ ├── package.json
│ ├── index.d.ts
│ ├── index.ts
│ ├── index.metadata.json
│ ├── index.ngsummary.json
│ ├── app.module.ngsummary.json
│ ├── app.module.ts
│ ├── app.module.metadata.json
│ ├── index.ngfactory.ts
│ └── app.module.ngfactory.ts
├── references.d.ts
├── auto-fit-text.common.d.ts
├── auto-fit-text.ios.d.ts
├── auto-fit-text.common.ts
├── index.d.ts
├── auto-fit-text.android.d.ts
├── auto-fit-text.common.metadata.json
├── index.ngsummary.json
├── auto-fit-text.common.ngsummary.json
├── auto-fit-text.ios.ngsummary.json
├── auto-fit-text.android.ngsummary.json
├── auto-fit-text.ios.metadata.json
├── auto-fit-text.android.metadata.json
├── tsconfig.json
├── auto-fit-text.ios.ts
├── auto-fit-text.android.ts
├── tsconfig.aot.json
├── package.json
└── scripts
│ └── postclone.js
├── demo-ng
├── app
│ ├── vendor-platform.ios.ts
│ ├── App_Resources
│ │ ├── iOS
│ │ │ ├── Assets.xcassets
│ │ │ │ ├── Contents.json
│ │ │ │ ├── AppIcon.appiconset
│ │ │ │ │ ├── icon-29.png
│ │ │ │ │ ├── icon-40.png
│ │ │ │ │ ├── icon-76.png
│ │ │ │ │ ├── icon-29@2x.png
│ │ │ │ │ ├── icon-29@3x.png
│ │ │ │ │ ├── icon-40@2x.png
│ │ │ │ │ ├── icon-40@3x.png
│ │ │ │ │ ├── icon-60@2x.png
│ │ │ │ │ ├── icon-60@3x.png
│ │ │ │ │ ├── icon-76@2x.png
│ │ │ │ │ ├── icon-83.5@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── LaunchImage.launchimage
│ │ │ │ │ ├── Default.png
│ │ │ │ │ ├── Default@2x.png
│ │ │ │ │ ├── Default-568h@2x.png
│ │ │ │ │ ├── Default-667h@2x.png
│ │ │ │ │ ├── Default-736h@3x.png
│ │ │ │ │ ├── Default-Portrait.png
│ │ │ │ │ ├── Default-Landscape.png
│ │ │ │ │ ├── Default-Landscape@2x.png
│ │ │ │ │ ├── Default-Landscape@3x.png
│ │ │ │ │ ├── Default-Portrait@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── LaunchScreen.Center.imageset
│ │ │ │ │ ├── LaunchScreen-Center.png
│ │ │ │ │ ├── LaunchScreen-Center@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ │ └── LaunchScreen.AspectFill.imageset
│ │ │ │ │ ├── LaunchScreen-AspectFill.png
│ │ │ │ │ ├── LaunchScreen-AspectFill@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ ├── build.xcconfig
│ │ │ ├── Info.plist
│ │ │ └── LaunchScreen.storyboard
│ │ └── Android
│ │ │ ├── values-v21
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ │ ├── drawable-hdpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── drawable-ldpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── drawable-mdpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── drawable-xhdpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── drawable-xxhdpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── values
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ │ ├── drawable-nodpi
│ │ │ └── splash_screen.xml
│ │ │ ├── app.gradle
│ │ │ └── AndroidManifest.xml
│ ├── package.json
│ ├── app.component.ts
│ ├── main.aot.ts
│ ├── vendor.ts
│ ├── app.component.html
│ ├── vendor-platform.android.ts
│ ├── app.css
│ ├── app.module.ts
│ ├── main.ts
│ └── README.md
├── tsconfig.aot.json
├── tsconfig.json
└── package.json
├── demo
├── app
│ ├── app.css
│ ├── app.ts
│ ├── App_Resources
│ │ ├── iOS
│ │ │ ├── Assets.xcassets
│ │ │ │ ├── Contents.json
│ │ │ │ ├── AppIcon.appiconset
│ │ │ │ │ ├── icon-29.png
│ │ │ │ │ ├── icon-40.png
│ │ │ │ │ ├── icon-50.png
│ │ │ │ │ ├── icon-57.png
│ │ │ │ │ ├── icon-72.png
│ │ │ │ │ ├── icon-76.png
│ │ │ │ │ ├── icon-29@2x.png
│ │ │ │ │ ├── icon-29@3x.png
│ │ │ │ │ ├── icon-40@2x.png
│ │ │ │ │ ├── icon-40@3x.png
│ │ │ │ │ ├── icon-50@2x.png
│ │ │ │ │ ├── icon-57@2x.png
│ │ │ │ │ ├── icon-60@2x.png
│ │ │ │ │ ├── icon-60@3x.png
│ │ │ │ │ ├── icon-72@2x.png
│ │ │ │ │ ├── icon-76@2x.png
│ │ │ │ │ ├── icon-83.5@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── LaunchImage.launchimage
│ │ │ │ │ ├── Default.png
│ │ │ │ │ ├── Default@2x.png
│ │ │ │ │ ├── Default-568h@2x.png
│ │ │ │ │ ├── Default-667h@2x.png
│ │ │ │ │ ├── Default-736h@3x.png
│ │ │ │ │ ├── Default-Portrait.png
│ │ │ │ │ ├── Default-Landscape.png
│ │ │ │ │ ├── Default-Portrait@2x.png
│ │ │ │ │ ├── Default-Landscape@2x.png
│ │ │ │ │ ├── Default-Landscape@3x.png
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── LaunchScreen.Center.imageset
│ │ │ │ │ ├── LaunchScreen-Center.png
│ │ │ │ │ ├── LaunchScreen-Center@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ │ └── LaunchScreen.AspectFill.imageset
│ │ │ │ │ ├── LaunchScreen-AspectFill.png
│ │ │ │ │ ├── LaunchScreen-AspectFill@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ ├── build.xcconfig
│ │ │ ├── Info.plist
│ │ │ └── LaunchScreen.storyboard
│ │ └── Android
│ │ │ ├── values-v21
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ │ ├── drawable-hdpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── drawable-ldpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── drawable-mdpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── drawable-xhdpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── drawable-xxhdpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── values
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ │ ├── drawable-nodpi
│ │ │ └── splash_screen.xml
│ │ │ ├── app.gradle
│ │ │ └── AndroidManifest.xml
│ ├── main-view-model.ts
│ ├── main-page.xml
│ ├── tests
│ │ └── tests.js
│ ├── main-page.ts
│ ├── tns_modules
│ │ └── nativescript-auto-fit-text
│ │ │ └── auto-fit-text.ts
│ └── package.json
├── .nsbuildinfo
├── package.json
├── tsconfig.json
└── karma.conf.js
├── assets
└── showoff.gif
├── publish
├── publish.sh
├── package.json
└── pack.sh
├── .gitignore
├── .travis.yml
├── README.md
├── tslint.json
└── LICENSE
/src/platforms/ios/build.xcconfig:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/demo-ng/app/vendor-platform.ios.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/.npmignore:
--------------------------------------------------------------------------------
1 | *.map
2 | *.ts
3 | !*.d.ts
4 | tsconfig.json
--------------------------------------------------------------------------------
/src/angular/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "index"
3 | }
--------------------------------------------------------------------------------
/src/angular/index.d.ts:
--------------------------------------------------------------------------------
1 | export declare class AutoFitTextModule {
2 | }
3 |
--------------------------------------------------------------------------------
/src/angular/index.ts:
--------------------------------------------------------------------------------
1 | export { AutoFitTextModule } from './app.module';
--------------------------------------------------------------------------------
/demo/app/app.css:
--------------------------------------------------------------------------------
1 | @import 'nativescript-theme-core/css/core.light.css';
2 |
--------------------------------------------------------------------------------
/assets/showoff.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/assets/showoff.gif
--------------------------------------------------------------------------------
/demo/app/app.ts:
--------------------------------------------------------------------------------
1 | import * as application from 'tns-core-modules/application';
2 | application.start({ moduleName: "main-page" });
3 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/demo/.nsbuildinfo:
--------------------------------------------------------------------------------
1 | {
2 | "prepareTime": "Wed Jul 05 2017 17:58:21 GMT+0100 (WEST)",
3 | "buildTime": "Wed Jul 05 2017 17:58:40 GMT+0100 (WEST)"
4 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d5afe
4 |
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d5afe
4 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-ldpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-mdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-xhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-xxhdpi/logo.png
--------------------------------------------------------------------------------
/src/references.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-ldpi/logo.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-mdpi/logo.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-xhdpi/logo.png
--------------------------------------------------------------------------------
/demo-ng/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "android": {
3 | "v8Flags": "--expose_gc"
4 | },
5 | "main": "main.js",
6 | "name": "tns-template-hello-world-ng",
7 | "version": "3.1.1"
8 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-xxhdpi/logo.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-ldpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-mdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-ldpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-mdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/Android/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-xhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-xxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-xxxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/Android/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/main-view-model.ts:
--------------------------------------------------------------------------------
1 | import { Observable } from 'tns-core-modules/data/observable';
2 |
3 | export class HelloWorldModel extends Observable {
4 |
5 | constructor() {
6 | super();
7 | }
8 | }
--------------------------------------------------------------------------------
/publish/publish.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | PACK_DIR=package;
4 |
5 | publish() {
6 | cd $PACK_DIR
7 | echo 'Publishing to npm...'
8 | npm publish *.tgz
9 | }
10 |
11 | ./pack.sh && publish
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
--------------------------------------------------------------------------------
/publish/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nativescript-publish",
3 | "version": "1.0.0",
4 | "description": "Publish helper",
5 | "devDependencies": {
6 | "ncp": "^2.0.0",
7 | "rimraf": "^2.5.0"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
--------------------------------------------------------------------------------
/src/auto-fit-text.common.d.ts:
--------------------------------------------------------------------------------
1 | import { Label } from "tns-core-modules/ui/label";
2 | import { AutoFitText as AutoFitTextDefenition } from '.';
3 | export declare class AutoFitTextBase extends Label implements AutoFitTextDefenition {
4 | }
5 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
--------------------------------------------------------------------------------
/src/auto-fit-text.ios.d.ts:
--------------------------------------------------------------------------------
1 | import { AutoFitTextBase } from './auto-fit-text.common';
2 | export declare class AutoFitText extends AutoFitTextBase {
3 | constructor();
4 | initNativeView(): void;
5 | disposeNativeView(): void;
6 | }
7 |
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/src/auto-fit-text.common.ts:
--------------------------------------------------------------------------------
1 | import { Label } from "tns-core-modules/ui/label";
2 | import { AutoFitText as AutoFitTextDefenition } from '.';
3 |
4 |
5 | export class AutoFitTextBase extends Label implements AutoFitTextDefenition {
6 |
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
--------------------------------------------------------------------------------
/src/index.d.ts:
--------------------------------------------------------------------------------
1 | import { Label } from 'tns-core-modules/ui/label';
2 |
3 | export declare class AutoFitText extends Label {
4 | // define your typings manually
5 | // or..
6 | // take the ios or android .d.ts files and copy/paste them here
7 | }
8 |
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
--------------------------------------------------------------------------------
/src/angular/index.metadata.json:
--------------------------------------------------------------------------------
1 | [{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./app.module","export":["AutoFitTextModule"]}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./app.module","export":["AutoFitTextModule"]}]}]
--------------------------------------------------------------------------------
/src/auto-fit-text.android.d.ts:
--------------------------------------------------------------------------------
1 | import { AutoFitTextBase } from './auto-fit-text.common';
2 | export declare class AutoFitText extends AutoFitTextBase {
3 | createNativeView(): Object;
4 | initNativeView(): void;
5 | disposeNativeView(): void;
6 | }
7 |
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opendomeco/nativescript-auto-fit-text/HEAD/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F5F5F5
4 | #757575
5 | #33B5E5
6 | #272734
7 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F5F5F5
4 | #757575
5 | #33B5E5
6 | #272734
7 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/build.xcconfig:
--------------------------------------------------------------------------------
1 | // You can add custom settings here
2 | // for example you can uncomment the following line to force distribution code signing
3 | // CODE_SIGN_IDENTITY = iPhone Distribution
4 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
5 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
6 |
--------------------------------------------------------------------------------
/demo-ng/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from "@angular/core";
2 |
3 | @Component({
4 | selector: "ns-app",
5 | templateUrl: "app.component.html",
6 | })
7 |
8 | export class AppComponent {
9 | string = 'asdasdasdasdasd';
10 | submit(value) {
11 | this.string = value;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/platforms/ios/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo-ng/app/main.aot.ts:
--------------------------------------------------------------------------------
1 | // this import should be first in order to load some required settings (like globals and reflect-metadata)
2 | import { platformNativeScript } from "nativescript-angular/platform-static";
3 |
4 | import { AppModuleNgFactory } from "./app.module.ngfactory";
5 |
6 | platformNativeScript().bootstrapModuleFactory(AppModuleNgFactory);
7 |
--------------------------------------------------------------------------------
/demo/app/main-page.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/platforms/android/include.gradle:
--------------------------------------------------------------------------------
1 | /* Include.gradle configuration: http://docs.nativescript.org/plugins/plugins#includegradle-specification */
2 |
3 | android {
4 | productFlavors {
5 | "nativescript-auto-fit-text" {
6 | dimension "nativescript-auto-fit-text"
7 | }
8 | }
9 | }
10 |
11 | dependencies {
12 | compile 'me.grantland:autofittextview:0.2.+'
13 | }
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/drawable-nodpi/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-nodpi/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/auto-fit-text.common.metadata.json:
--------------------------------------------------------------------------------
1 | [{"__symbolic":"module","version":3,"metadata":{"AutoFitTextBase":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"tns-core-modules/ui/label","name":"Label"}}}},{"__symbolic":"module","version":1,"metadata":{"AutoFitTextBase":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"tns-core-modules/ui/label","name":"Label"}}}}]
--------------------------------------------------------------------------------
/src/angular/index.ngsummary.json:
--------------------------------------------------------------------------------
1 | {"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbol":1,"members":[]}}],"symbols":[{"__symbol":0,"name":"AutoFitTextModule","filePath":"/Users/danielgek/WebProjects/nativescript-auto-fit-text/src/angular/index.d.ts"},{"__symbol":1,"name":"AutoFitTextModule","filePath":"/Users/danielgek/WebProjects/nativescript-auto-fit-text/src/angular/app.module.d.ts"}]}
--------------------------------------------------------------------------------
/demo/app/tests/tests.js:
--------------------------------------------------------------------------------
1 | var AutoFitText = require("nativescript-auto-fit-text").AutoFitText;
2 | var autoFitText = new AutoFitText();
3 |
4 | describe("greet function", function() {
5 | it("exists", function() {
6 | expect(autoFitText.greet).toBeDefined();
7 | });
8 |
9 | it("returns a string", function() {
10 | expect(autoFitText.greet()).toEqual("Hello, NS");
11 | });
12 | });
--------------------------------------------------------------------------------
/src/index.ngsummary.json:
--------------------------------------------------------------------------------
1 | {"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbolic":"class","extends":{"__symbol":1,"members":[]}}}],"symbols":[{"__symbol":0,"name":"AutoFitText","filePath":"/Users/danielgek/WebProjects/nativescript-auto-fit-text/src/index.d.ts"},{"__symbol":1,"name":"Label","filePath":"/Users/danielgek/WebProjects/nativescript-auto-fit-text/src/node_modules/tns-core-modules/ui/label/label.d.ts"}]}
--------------------------------------------------------------------------------
/demo-ng/app/vendor.ts:
--------------------------------------------------------------------------------
1 | require("./vendor-platform");
2 |
3 | require("reflect-metadata");
4 | require("@angular/platform-browser");
5 | require("@angular/core");
6 | require("@angular/common");
7 | require("@angular/forms");
8 | require("@angular/http");
9 | require("@angular/router");
10 |
11 | require("nativescript-angular/platform-static");
12 | require("nativescript-angular/forms");
13 | require("nativescript-angular/router");
14 |
--------------------------------------------------------------------------------
/demo-ng/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/app.gradle:
--------------------------------------------------------------------------------
1 | // Add your native dependencies here:
2 |
3 | // Uncomment to add recyclerview-v7 dependency
4 | //dependencies {
5 | // compile 'com.android.support:recyclerview-v7:+'
6 | //}
7 |
8 | android {
9 | defaultConfig {
10 | generatedDensities = []
11 | applicationId = "org.nativescript.demo"
12 | }
13 | aaptOptions {
14 | additionalParameters "--no-version-vectors"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/auto-fit-text.common.ngsummary.json:
--------------------------------------------------------------------------------
1 | {"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbolic":"class","extends":{"__symbol":1,"members":[]}}}],"symbols":[{"__symbol":0,"name":"AutoFitTextBase","filePath":"/Users/danielgek/WebProjects/nativescript-auto-fit-text/src/auto-fit-text.common.d.ts"},{"__symbol":1,"name":"Label","filePath":"/Users/danielgek/WebProjects/nativescript-auto-fit-text/src/node_modules/tns-core-modules/ui/label/label.d.ts"}]}
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/app.gradle:
--------------------------------------------------------------------------------
1 | // Add your native dependencies here:
2 |
3 | // Uncomment to add recyclerview-v7 dependency
4 | //dependencies {
5 | // compile 'com.android.support:recyclerview-v7:+'
6 | //}
7 |
8 | android {
9 | defaultConfig {
10 | generatedDensities = []
11 | applicationId = "org.nativescript.demong"
12 | }
13 | aaptOptions {
14 | additionalParameters "--no-version-vectors"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/demo/app/main-page.ts:
--------------------------------------------------------------------------------
1 | import * as observable from 'tns-core-modules/data/observable';
2 | import * as pages from 'tns-core-modules/ui/page';
3 | import {HelloWorldModel} from './main-view-model';
4 |
5 | // Event handler for Page 'loaded' event attached in main-page.xml
6 | export function pageLoaded(args: observable.EventData) {
7 | // Get the event sender
8 | let page = args.object;
9 | page.bindingContext = new HelloWorldModel();
10 | }
--------------------------------------------------------------------------------
/demo-ng/app/vendor-platform.android.ts:
--------------------------------------------------------------------------------
1 | require("application");
2 | if (!global["__snapshot"]) {
3 | // In case snapshot generation is enabled these modules will get into the bundle
4 | // but will not be required/evaluated.
5 | // The snapshot webpack plugin will add them to the tns-java-classes.js bundle file.
6 | // This way, they will be evaluated on app start as early as possible.
7 | require("ui/frame");
8 | require("ui/frame/activity");
9 | }
10 |
--------------------------------------------------------------------------------
/demo-ng/tsconfig.aot.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "paths": {
6 | "*": [
7 | "./node_modules/tns-core-modules/*",
8 | "./node_modules/*"
9 | ]
10 | },
11 | "skipLibCheck": true
12 | },
13 | "exclude": [
14 | "node_modules",
15 | "platforms"
16 | ],
17 | "angularCompilerOptions": {
18 | "skipMetadataEmit": true,
19 | "genDir": "./"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/platforms/android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/angular/app.module.ngsummary.json:
--------------------------------------------------------------------------------
1 | {"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbolic":"class"},"type":{"summaryKind":2,"type":{"reference":{"__symbol":0,"members":[]},"diDeps":[],"lifecycleHooks":[]},"entryComponents":[],"providers":[],"modules":[{"reference":{"__symbol":0,"members":[]},"diDeps":[],"lifecycleHooks":[]}],"exportedDirectives":[],"exportedPipes":[]}}],"symbols":[{"__symbol":0,"name":"AutoFitTextModule","filePath":"/Users/danielgek/WebProjects/nativescript-auto-fit-text/src/angular/app.module.d.ts"}]}
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-Center.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-Center@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-Center.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-Center@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-AspectFill.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-AspectFill@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-AspectFill.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-AspectFill@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/build.xcconfig:
--------------------------------------------------------------------------------
1 | // You can add custom settings here
2 | // for example you can uncomment the following line to force distribution code signing
3 | // CODE_SIGN_IDENTITY = iPhone Distribution
4 | // To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID;
6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
7 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
8 |
--------------------------------------------------------------------------------
/src/auto-fit-text.ios.ngsummary.json:
--------------------------------------------------------------------------------
1 | {"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbolic":"class","extends":{"__symbol":1,"members":[]},"members":{"__ctor__":[{"__symbolic":"constructor"}],"initNativeView":[{"__symbolic":"method"}],"disposeNativeView":[{"__symbolic":"method"}]}}}],"symbols":[{"__symbol":0,"name":"AutoFitText","filePath":"/Users/danielgek/WebProjects/nativescript-auto-fit-text/src/auto-fit-text.ios.d.ts"},{"__symbol":1,"name":"AutoFitTextBase","filePath":"/Users/danielgek/WebProjects/nativescript-auto-fit-text/src/auto-fit-text.common.d.ts"}]}
--------------------------------------------------------------------------------
/demo-ng/app/app.css:
--------------------------------------------------------------------------------
1 | /*
2 | In NativeScript, the app.css file is where you place CSS rules that
3 | you would like to apply to your entire application. Check out
4 | http://docs.nativescript.org/ui/styling for a full list of the CSS
5 | selectors and properties you can use to style UI components.
6 |
7 | /*
8 | In many cases you may want to use the NativeScript core theme instead
9 | of writing your own CSS rules. For a full list of class names in the theme
10 | refer to http://docs.nativescript.org/ui/theme.
11 | */
12 | @import 'nativescript-theme-core/css/core.light.css';
13 |
--------------------------------------------------------------------------------
/src/auto-fit-text.android.ngsummary.json:
--------------------------------------------------------------------------------
1 | {"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbolic":"class","extends":{"__symbol":1,"members":[]},"members":{"createNativeView":[{"__symbolic":"method"}],"initNativeView":[{"__symbolic":"method"}],"disposeNativeView":[{"__symbolic":"method"}]}}}],"symbols":[{"__symbol":0,"name":"AutoFitText","filePath":"/Users/danielgek/WebProjects/nativescript-auto-fit-text/src/auto-fit-text.android.d.ts"},{"__symbol":1,"name":"AutoFitTextBase","filePath":"/Users/danielgek/WebProjects/nativescript-auto-fit-text/src/auto-fit-text.common.d.ts"}]}
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode
2 | .idea
3 | .DS_Store
4 | *.js
5 | *.js.map
6 | *.log
7 | !src/scripts/*.js
8 | !seed-tests/*.js
9 | seed-tests/seed-copy/**/*.*
10 | seed-tests/seed-copy-new-git-repo/**/*.*
11 | demo/app/*.js
12 | !demo/karma.conf.js
13 | !demo/app/tests/*.js
14 | demo/*.d.ts
15 | !demo/references.d.ts
16 | demo/lib
17 | demo/platforms
18 | demo/node_modules
19 |
20 | demo-ng/app/*.js
21 | !demo-ng/karma.conf.js
22 | !demo-ng/app/tests/*.js
23 | demo-ng/*.d.ts
24 | !demo-ng/references.d.ts
25 | demo-ng/lib
26 | demo-ng/platforms
27 | demo-ng/node_modules
28 |
29 | node_modules
30 | publish/src
31 | publish/package
--------------------------------------------------------------------------------
/demo-ng/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
2 | import { NativeScriptModule } from "nativescript-angular/nativescript.module";
3 | import { AppComponent } from "./app.component";
4 | import { AutoFitTextModule } from "nativescript-auto-fit-text/angular"
5 |
6 | @NgModule({
7 | bootstrap: [
8 | AppComponent
9 | ],
10 | imports: [
11 | NativeScriptModule,
12 | AutoFitTextModule
13 | ],
14 | declarations: [
15 | AppComponent
16 | ],
17 | providers: [],
18 | schemas: [ NO_ERRORS_SCHEMA ]
19 | })
20 | export class AppModule {
21 | }
22 |
--------------------------------------------------------------------------------
/src/angular/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule, NO_ERRORS_SCHEMA, ModuleWithProviders } from '@angular/core';
2 | import { registerElement } from 'nativescript-angular/element-registry';
3 |
4 |
5 | @NgModule({
6 | declarations: [],
7 | imports: [],
8 | providers: [],
9 | schemas: [NO_ERRORS_SCHEMA]
10 | })
11 | export class AutoFitTextModule {
12 |
13 | static forRoot(): ModuleWithProviders {
14 | registerElement('AutoFitText', () => require('../').AutoFitText);
15 | return {
16 | ngModule: AutoFitTextModule,
17 | providers: [
18 | ]
19 | };
20 | }
21 | }
--------------------------------------------------------------------------------
/src/auto-fit-text.ios.metadata.json:
--------------------------------------------------------------------------------
1 | [{"__symbolic":"module","version":3,"metadata":{"AutoFitText":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./auto-fit-text.common","name":"AutoFitTextBase"},"members":{"__ctor__":[{"__symbolic":"constructor"}],"initNativeView":[{"__symbolic":"method"}],"disposeNativeView":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"AutoFitText":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./auto-fit-text.common","name":"AutoFitTextBase"},"members":{"__ctor__":[{"__symbolic":"constructor"}],"initNativeView":[{"__symbolic":"method"}],"disposeNativeView":[{"__symbolic":"method"}]}}}}]
--------------------------------------------------------------------------------
/src/auto-fit-text.android.metadata.json:
--------------------------------------------------------------------------------
1 | [{"__symbolic":"module","version":3,"metadata":{"AutoFitText":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./auto-fit-text.common","name":"AutoFitTextBase"},"members":{"createNativeView":[{"__symbolic":"method"}],"initNativeView":[{"__symbolic":"method"}],"disposeNativeView":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"AutoFitText":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./auto-fit-text.common","name":"AutoFitTextBase"},"members":{"createNativeView":[{"__symbolic":"method"}],"initNativeView":[{"__symbolic":"method"}],"disposeNativeView":[{"__symbolic":"method"}]}}}}]
--------------------------------------------------------------------------------
/demo-ng/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "target": "es5",
5 | "experimentalDecorators": true,
6 | "emitDecoratorMetadata": true,
7 | "noEmitHelpers": true,
8 | "noEmitOnError": true,
9 | "lib": [
10 | "es6",
11 | "dom",
12 | "es2015.iterable"
13 | ],
14 | "baseUrl": ".",
15 | "paths": {
16 | "*": [
17 | "./node_modules/tns-core-modules/*",
18 | "./node_modules/*"
19 | ]
20 | }
21 | },
22 | "exclude": [
23 | "node_modules",
24 | "platforms",
25 | "**/*.aot.ts"
26 | ]
27 | }
--------------------------------------------------------------------------------
/src/angular/app.module.metadata.json:
--------------------------------------------------------------------------------
1 | [{"__symbolic":"module","version":3,"metadata":{"AutoFitTextModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[],"imports":[],"providers":[],"schemas":[{"__symbolic":"reference","module":"@angular/core","name":"NO_ERRORS_SCHEMA"}]}]}]}}},{"__symbolic":"module","version":1,"metadata":{"AutoFitTextModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[],"imports":[],"providers":[],"schemas":[{"__symbolic":"reference","module":"@angular/core","name":"NO_ERRORS_SCHEMA"}]}]}]}}}]
--------------------------------------------------------------------------------
/src/platforms/ios/README.md:
--------------------------------------------------------------------------------
1 | # iOS permissions and dependencies
2 |
3 |
4 | * (Optional) Use Info.plist to describe any permissions, features or other configuration specifics required or used by your plugin for iOS.
5 | NOTE: The NativeScript CLI will not resolve any contradicting or duplicate entries during the merge. After the plugin is installed, you need to manually resolve such issues.
6 | * (Optional) Use build.xcconfig configuration to describe any plugin the native dependencies. If there are no such, this file can be removed. For more information, see the [build.xcconfig Specification section](http://docs.nativescript.org/plugins/plugins#buildxcconfig-specification).
7 |
8 |
9 | [Read more about nativescript plugins](http://docs.nativescript.org/plugins/plugins)
--------------------------------------------------------------------------------
/src/platforms/android/README.md:
--------------------------------------------------------------------------------
1 | # Android permissions and dependencies
2 |
3 | * (Optional) Use AndroidManifest.xml to describe any permissions, features or other configuration specifics required or used by your plugin for Android.
4 | NOTE: The NativeScript CLI will not resolve any contradicting or duplicate entries during the merge. After the plugin is installed, you need to manually resolve such issues.
5 |
6 | * (Optional) Use include.gradle configuration to describe any native dependencies. If there are no such, this file can be removed. For more information, see the [include.gradle Specification](http://docs.nativescript.org/plugins/plugins#includegradle-specification)
7 |
8 |
9 | [Read more about nativescript plugins](http://docs.nativescript.org/plugins/plugins)
--------------------------------------------------------------------------------
/demo-ng/app/main.ts:
--------------------------------------------------------------------------------
1 | // this import should be first in order to load some required settings (like globals and reflect-metadata)
2 | import { platformNativeScriptDynamic } from "nativescript-angular/platform";
3 |
4 | import { AppModule } from "./app.module";
5 |
6 | // A traditional NativeScript application starts by initializing global objects, setting up global CSS rules, creating, and navigating to the main page.
7 | // Angular applications need to take care of their own initialization: modules, components, directives, routes, DI providers.
8 | // A NativeScript Angular app needs to make both paradigms work together, so we provide a wrapper platform object, platformNativeScriptDynamic,
9 | // that sets up a NativeScript application and can bootstrap the Angular framework.
10 | platformNativeScriptDynamic().bootstrapModule(AppModule);
11 |
--------------------------------------------------------------------------------
/src/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "module": "commonjs",
5 | "declaration": true,
6 | "removeComments": true,
7 | "noLib": false,
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "lib": ["es6", "dom"],
11 | "sourceMap": true,
12 | "pretty": true,
13 | "allowUnreachableCode": false,
14 | "allowUnusedLabels": false,
15 | "noEmitHelpers": true,
16 | "noEmitOnError": false,
17 | "noImplicitAny": false,
18 | "noImplicitReturns": true,
19 | "noImplicitUseStrict": false,
20 | "noFallthroughCasesInSwitch": true,
21 | "noStrictGenericChecks": true
22 | },
23 | "exclude": [
24 | "node_modules"
25 | ],
26 | "compileOnSave": false
27 | }
--------------------------------------------------------------------------------
/demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "nativescript": {
3 | "id": "org.nativescript.demo",
4 | "tns-ios": {
5 | "version": "3.1.0"
6 | },
7 | "tns-android": {
8 | "version": "3.1.1"
9 | }
10 | },
11 | "dependencies": {
12 | "nativescript-auto-fit-text": "../src",
13 | "nativescript-theme-core": "^1.0.4",
14 | "nativescript-unit-test-runner": "^0.3.4",
15 | "tns-core-modules": "^3.1.0"
16 | },
17 | "devDependencies": {
18 | "babel-traverse": "6.12.0",
19 | "babel-types": "6.11.1",
20 | "babylon": "6.8.4",
21 | "filewalker": "0.1.2",
22 | "jasmine-core": "^2.5.2",
23 | "karma": "^1.3.0",
24 | "karma-jasmine": "^1.0.2",
25 | "karma-nativescript-launcher": "^0.4.0",
26 | "lazy": "1.0.11",
27 | "nativescript-dev-typescript": "^0.5.0",
28 | "typescript": "^2.2.2"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | matrix:
2 | include:
3 | - os: linux
4 | language: android
5 | jdk: oraclejdk8
6 | before_script:
7 | - echo no | android create avd --force -n test -t android-21 -b armeabi-v7a
8 | - emulator -avd test -no-audio -no-window &
9 | - android-wait-for-emulator
10 | before_install:
11 | - nvm install 6
12 | script: npm run test.android
13 | - os: osx
14 | language: node_js
15 | node_js: "6"
16 | jdk: oraclejdk8
17 | osx_image: xcode8.3
18 | script: npm run test.ios
19 |
20 | android:
21 | components:
22 | - tools
23 | - platform-tools
24 | - build-tools-23.0.2
25 | - android-23
26 | - extra-android-m2repository
27 | - sys-img-armeabi-v7a-android-21
28 |
29 | install:
30 | - npm install -g nativescript
31 | - tns usage-reporting disable
32 | - tns error-reporting disable
33 | - cd src
--------------------------------------------------------------------------------
/demo-ng/app/README.md:
--------------------------------------------------------------------------------
1 | # NativeScript Angular Template
2 |
3 | This template creates a "Hello, world" NativeScript app using TypeScript and Angular.
4 |
5 | You can create a new app that uses this template with either the `--template` option.
6 |
7 | ```
8 | tns create my-app-name --template tns-template-hello-world-ng
9 | ```
10 |
11 | Or the `--ng` shorthand.
12 |
13 | ```
14 | tns create my-app-name --ng
15 | ```
16 |
17 | > Note: Both commands will create a new NativeScript app that uses the latest version of this template published to [npm] (https://www.npmjs.com/package/tns-template-hello-world-ng).
18 |
19 | If you want to create a new app that uses the source of the template from the `master` branch, you can execute the following:
20 |
21 | ```
22 | tns create my-app-name --template https://github.com/NativeScript/template-hello-world-ng.git#master
23 | ```
24 |
25 | **NB:** Please, have in mind that the master branch may refer to dependencies that are not on NPM yet!
26 |
--------------------------------------------------------------------------------
/src/auto-fit-text.ios.ts:
--------------------------------------------------------------------------------
1 | import { AutoFitTextBase } from './auto-fit-text.common';
2 |
3 | export class AutoFitText extends AutoFitTextBase {
4 |
5 | constructor() {
6 | super();
7 | let label: UILabel = this.nativeView;
8 | label.font = label.font.fontWithSize(200);
9 | label.adjustsFontSizeToFitWidth = true;
10 | label.textAlignment = NSTextAlignment.Center;
11 | }
12 |
13 | initNativeView(): void {
14 | (this.nativeView).owner = this;
15 | super.initNativeView();
16 | }
17 |
18 | disposeNativeView(): void {
19 | // Remove reference from native view to this instance.
20 | (this.nativeView).owner = null;
21 |
22 | // If you want to recycle nativeView and have modified the nativeView
23 | // without using Property or CssProperty (e.g. outside our property system - 'setNative' callbacks)
24 | // you have to reset it to its initial state here.
25 | super.disposeNativeView();
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
14 |
15 |
16 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
14 |
15 |
16 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/demo/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "module": "commonjs",
5 | "declaration": false,
6 | "removeComments": true,
7 | "noLib": false,
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "lib": [
11 | "es6",
12 | "dom"
13 | ],
14 | "pretty": true,
15 | "allowUnreachableCode": false,
16 | "allowUnusedLabels": false,
17 | "noEmitHelpers": true,
18 | "noEmitOnError": false,
19 | "noImplicitAny": false,
20 | "noImplicitReturns": true,
21 | "noImplicitUseStrict": false,
22 | "noFallthroughCasesInSwitch": true,
23 | "baseUrl": ".",
24 | "paths": {
25 | "*": [
26 | "./node_modules/tns-core-modules/*",
27 | "./node_modules/*"
28 | ]
29 | }
30 | },
31 | "exclude": [
32 | "node_modules",
33 | "platforms"
34 | ],
35 | "compileOnSave": false
36 | }
--------------------------------------------------------------------------------
/demo/app/tns_modules/nativescript-auto-fit-text/auto-fit-text.ts:
--------------------------------------------------------------------------------
1 | import { AutoFitTextBase } from './auto-fit-text.common';
2 |
3 | export class AutoFitText extends AutoFitTextBase {
4 |
5 | constructor() {
6 | super();
7 | let label: UILabel = this.nativeView;
8 | label.font = label.font.fontWithSize(200);
9 | label.adjustsFontSizeToFitWidth = true;
10 | label.textAlignment = NSTextAlignment.Center;
11 | }
12 |
13 | initNativeView(): void {
14 | (this.nativeView).owner = this;
15 | super.initNativeView();
16 | }
17 |
18 | disposeNativeView(): void {
19 | // Remove reference from native view to this instance.
20 | (this.nativeView).owner = null;
21 |
22 | // If you want to recycle nativeView and have modified the nativeView
23 | // without using Property or CssProperty (e.g. outside our property system - 'setNative' callbacks)
24 | // you have to reset it to its initial state here.
25 | super.disposeNativeView();
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/auto-fit-text.android.ts:
--------------------------------------------------------------------------------
1 | import { AutoFitTextBase } from './auto-fit-text.common';
2 | import * as utils from 'tns-core-modules/utils/utils';
3 |
4 | declare var me: any;
5 |
6 | export class AutoFitText extends AutoFitTextBase {
7 |
8 | public createNativeView(): Object {
9 | const textField: android.widget.TextView = super.createNativeView() as android.widget.TextView;
10 | textField.setMaxLines(1);
11 | textField.setSingleLine();
12 | textField.setMaxHeight(200);
13 | textField.setTextSize(200);
14 | textField.setMinHeight(40);
15 | textField.setTextAlignment(android.widget.TextView.TEXT_ALIGNMENT_CENTER);
16 |
17 | me.grantland.widget.AutofitHelper.create(textField);
18 | return textField;
19 | }
20 |
21 | initNativeView(): void {
22 | (this.nativeView).owner = this;
23 | super.initNativeView();
24 | }
25 |
26 | disposeNativeView(): void {
27 | (this.nativeView).owner = null;
28 | super.disposeNativeView();
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/tsconfig.aot.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "module": "es2015",
5 | "moduleResolution": "node",
6 | "removeComments": true,
7 | "experimentalDecorators": true,
8 | "noEmitHelpers": true,
9 | "noEmitOnError": false,
10 | "skipLibCheck": true,
11 | "lib": [
12 | "es6",
13 | "dom"
14 | ],
15 | "types": [],
16 | "baseUrl": ".",
17 | "paths": {
18 | "*": [
19 | "./node_modules/tns-core-modules/*",
20 | "./node_modules/*"
21 | ]
22 | }
23 | },
24 | "files": [
25 | "node_modules/tns-platform-declarations/android.d.ts",
26 | "node_modules/tns-platform-declarations/ios.d.ts",
27 | "auto-fit-text.android.ts",
28 | "auto-fit-text.ios.ts",
29 | "angular/app.module.ts",
30 | "angular/index.ts"
31 | ],
32 | "exclude": [
33 | "node_modules"
34 | ],
35 | "compileOnSave": false,
36 | "angularCompilerOptions": {
37 | "strictMetadataEmit": true
38 | }
39 | }
--------------------------------------------------------------------------------
/src/angular/index.ngfactory.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileoverview This file is generated by the Angular template compiler.
3 | * Do not edit.
4 | * @suppress {suspiciousCode,uselessCode,missingProperties,missingOverride}
5 | */
6 | /* tslint:disable */
7 |
8 |
9 | import * as i0 from '@angular/core';
10 | import * as i1 from './index';
11 | export const AutoFitTextModuleNgFactory:i0.NgModuleFactory = i0.ɵcmf(i1.AutoFitTextModule,
12 | ([] as any[]),(_l:any) => {
13 | return i0.ɵmod([i0.ɵmpd(512,i0.ComponentFactoryResolver,i0.ɵCodegenComponentFactoryResolver,
14 | [[8,([] as any[])],[3,i0.ComponentFactoryResolver],i0.NgModuleRef]),i0.ɵmpd(512,
15 | i1.AutoFitTextModule,i1.AutoFitTextModule,([] as any[]))]);
16 | });
17 | //# sourceMappingURL=data:application/json;base64,eyJmaWxlIjoiL1VzZXJzL2RhbmllbGdlay9XZWJQcm9qZWN0cy9uYXRpdmVzY3JpcHQtYXV0by1maXQtdGV4dC9zcmMvYW5ndWxhci9pbmRleC5uZ2ZhY3RvcnkudHMiLCJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJuZzovLy9Vc2Vycy9kYW5pZWxnZWsvV2ViUHJvamVjdHMvbmF0aXZlc2NyaXB0LWF1dG8tZml0LXRleHQvc3JjL2FuZ3VsYXIvaW5kZXgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiICJdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7OzsifQ==
18 |
--------------------------------------------------------------------------------
/src/angular/app.module.ngfactory.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileoverview This file is generated by the Angular template compiler.
3 | * Do not edit.
4 | * @suppress {suspiciousCode,uselessCode,missingProperties,missingOverride}
5 | */
6 | /* tslint:disable */
7 |
8 |
9 | import * as i0 from '@angular/core';
10 | import * as i1 from './app.module';
11 | export const AutoFitTextModuleNgFactory:i0.NgModuleFactory = i0.ɵcmf(i1.AutoFitTextModule,
12 | ([] as any[]),(_l:any) => {
13 | return i0.ɵmod([i0.ɵmpd(512,i0.ComponentFactoryResolver,i0.ɵCodegenComponentFactoryResolver,
14 | [[8,([] as any[])],[3,i0.ComponentFactoryResolver],i0.NgModuleRef]),i0.ɵmpd(512,
15 | i1.AutoFitTextModule,i1.AutoFitTextModule,([] as any[]))]);
16 | });
17 | //# sourceMappingURL=data:application/json;base64,eyJmaWxlIjoiL1VzZXJzL2RhbmllbGdlay9XZWJQcm9qZWN0cy9uYXRpdmVzY3JpcHQtYXV0by1maXQtdGV4dC9zcmMvYW5ndWxhci9hcHAubW9kdWxlLm5nZmFjdG9yeS50cyIsInZlcnNpb24iOjMsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIm5nOi8vL1VzZXJzL2RhbmllbGdlay9XZWJQcm9qZWN0cy9uYXRpdmVzY3JpcHQtYXV0by1maXQtdGV4dC9zcmMvYW5ndWxhci9hcHAubW9kdWxlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIiAiXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7Ozs7In0=
18 |
--------------------------------------------------------------------------------
/publish/pack.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | SOURCE_DIR=../src;
4 | TO_SOURCE_DIR=src;
5 | PACK_DIR=package;
6 | ROOT_DIR=..;
7 | PUBLISH=--publish
8 |
9 | install(){
10 | npm i
11 | }
12 |
13 | pack() {
14 |
15 | echo 'Clearing /src and /package...'
16 | node_modules/.bin/rimraf "$TO_SOURCE_DIR"
17 | node_modules/.bin/rimraf "$PACK_DIR"
18 |
19 | # copy src
20 | echo 'Copying src...'
21 | node_modules/.bin/ncp "$SOURCE_DIR" "$TO_SOURCE_DIR"
22 |
23 | # copy README & LICENSE to src
24 | echo 'Copying README and LICENSE to /src...'
25 | node_modules/.bin/ncp "$ROOT_DIR"/LICENSE "$TO_SOURCE_DIR"/LICENSE
26 | node_modules/.bin/ncp "$ROOT_DIR"/README.md "$TO_SOURCE_DIR"/README.md
27 |
28 | # compile package and copy files required by npm
29 | echo 'Building /src...'
30 | cd "$TO_SOURCE_DIR"
31 | node_modules/.bin/tsc
32 | cd ..
33 |
34 | echo 'Creating package...'
35 | # create package dir
36 | mkdir "$PACK_DIR"
37 |
38 | # create the package
39 | cd "$PACK_DIR"
40 | npm pack ../"$TO_SOURCE_DIR"
41 |
42 | # delete source directory used to create the package
43 | cd ..
44 | node_modules/.bin/rimraf "$TO_SOURCE_DIR"
45 | }
46 |
47 | install && pack
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AutoFitText
2 |
3 | This plugin is based on the Nativescript Label implementation but with changes to adjust the font size according of the label's width
4 |
5 | 
6 |
7 | ## Prerequisites / Requirements
8 |
9 | This plugin is only tested with **{N} > 3.0.0**
10 |
11 | ## Installation
12 |
13 | Describe your plugin installation steps. Ideally it would be something like:
14 |
15 | ```javascript
16 | tns plugin add nativescript-auto-fit-text
17 | ```
18 |
19 | ## Usage
20 |
21 | ### Angular
22 | ```typescript
23 | import { AutoFitTextModule } from "nativescript-auto-fit-text/angular"
24 |
25 | @NgModule({
26 | ...
27 | imports: [
28 | AutoFitTextModule
29 | ],
30 | ...
31 | })
32 | export class AppModule { }
33 |
34 | ```
35 |
36 | ```html
37 |
38 | ```
39 |
40 | ### Vanilla Nativescript
41 |
42 | ```html
43 |
44 |
45 |
46 |
47 |
48 | ```
49 |
50 | ## Credits
51 |
52 | [@grantland - android-autofittextview](https://github.com/grantland/android-autofittextview)
53 |
54 | ## License
55 |
56 | Apache License Version 2.0, January 2004
57 |
58 |
59 |
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "class-name": true,
4 | "comment-format": [
5 | true,
6 | "check-space"
7 | ],
8 | "indent": [
9 | true,
10 | "spaces"
11 | ],
12 | "no-duplicate-variable": true,
13 | "no-eval": true,
14 | "no-internal-module": true,
15 | "no-trailing-whitespace": true,
16 | "no-var-keyword": true,
17 | "one-line": [
18 | true,
19 | "check-open-brace",
20 | "check-whitespace"
21 | ],
22 | "quotemark": [
23 | false,
24 | "double"
25 | ],
26 | "semicolon": [
27 | true,
28 | "always"
29 | ],
30 | "triple-equals": [
31 | true,
32 | "allow-null-check"
33 | ],
34 | "typedef-whitespace": [
35 | true,
36 | {
37 | "call-signature": "nospace",
38 | "index-signature": "nospace",
39 | "parameter": "nospace",
40 | "property-declaration": "nospace",
41 | "variable-declaration": "nospace"
42 | }
43 | ],
44 | "variable-name": [
45 | true,
46 | "ban-keywords"
47 | ],
48 | "whitespace": [
49 | true,
50 | "check-branch",
51 | "check-decl",
52 | "check-operator",
53 | "check-separator",
54 | "check-type"
55 | ]
56 | }
57 | }
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
28 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
28 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiresFullScreen
28 |
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiresFullScreen
28 |
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/Android/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
21 |
22 |
23 |
31 |
32 |
34 |
35 |
36 |
42 |
43 |
45 |
46 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
21 |
22 |
23 |
31 |
32 |
34 |
35 |
36 |
42 |
43 |
45 |
46 |
--------------------------------------------------------------------------------
/demo/karma.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = function(config) {
2 | config.set({
3 |
4 | // base path that will be used to resolve all patterns (eg. files, exclude)
5 | basePath: '',
6 |
7 |
8 | // frameworks to use
9 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
10 | frameworks: ['jasmine'],
11 |
12 |
13 | // list of files / patterns to load in the browser
14 | files: [
15 | 'app/**/*.js',
16 | ],
17 |
18 |
19 | // list of files to exclude
20 | exclude: [
21 | ],
22 |
23 |
24 | // preprocess matching files before serving them to the browser
25 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
26 | preprocessors: {
27 | },
28 |
29 |
30 | // test results reporter to use
31 | // possible values: 'dots', 'progress'
32 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter
33 | reporters: ['progress'],
34 |
35 |
36 | // web server port
37 | port: 9876,
38 |
39 |
40 | // enable / disable colors in the output (reporters and logs)
41 | colors: true,
42 |
43 |
44 | // level of logging
45 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
46 | logLevel: config.LOG_INFO,
47 |
48 |
49 | // enable / disable watching file and executing tests whenever any file changes
50 | autoWatch: true,
51 |
52 |
53 | // start these browsers
54 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
55 | browsers: [],
56 |
57 | customLaunchers: {
58 | android: {
59 | base: 'NS',
60 | platform: 'android'
61 | },
62 | ios: {
63 | base: 'NS',
64 | platform: 'ios'
65 | },
66 | ios_simulator: {
67 | base: 'NS',
68 | platform: 'ios',
69 | arguments: ['--emulator']
70 | }
71 | },
72 |
73 | // Continuous Integration mode
74 | // if true, Karma captures browsers, runs the tests and exits
75 | singleRun: true
76 | });
77 | };
78 |
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "29x29",
5 | "idiom" : "iphone",
6 | "filename" : "icon-29.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "29x29",
11 | "idiom" : "iphone",
12 | "filename" : "icon-29@2x.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "icon-29@3x.png",
19 | "scale" : "3x"
20 | },
21 | {
22 | "size" : "40x40",
23 | "idiom" : "iphone",
24 | "filename" : "icon-40@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "40x40",
29 | "idiom" : "iphone",
30 | "filename" : "icon-40@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "60x60",
35 | "idiom" : "iphone",
36 | "filename" : "icon-60@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "60x60",
41 | "idiom" : "iphone",
42 | "filename" : "icon-60@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "29x29",
47 | "idiom" : "ipad",
48 | "filename" : "icon-29.png",
49 | "scale" : "1x"
50 | },
51 | {
52 | "size" : "29x29",
53 | "idiom" : "ipad",
54 | "filename" : "icon-29@2x.png",
55 | "scale" : "2x"
56 | },
57 | {
58 | "size" : "40x40",
59 | "idiom" : "ipad",
60 | "filename" : "icon-40.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "40x40",
65 | "idiom" : "ipad",
66 | "filename" : "icon-40@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "76x76",
71 | "idiom" : "ipad",
72 | "filename" : "icon-76.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "76x76",
77 | "idiom" : "ipad",
78 | "filename" : "icon-76@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "83.5x83.5",
83 | "idiom" : "ipad",
84 | "filename" : "icon-83.5@2x.png",
85 | "scale" : "2x"
86 | }
87 | ],
88 | "info" : {
89 | "version" : 1,
90 | "author" : "xcode"
91 | }
92 | }
--------------------------------------------------------------------------------
/demo-ng/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "NativeScript Application",
3 | "license": "SEE LICENSE IN ",
4 | "readme": "NativeScript Application",
5 | "repository": "",
6 | "nativescript": {
7 | "id": "org.nativescript.demong",
8 | "tns-ios": {
9 | "version": "3.2.0"
10 | },
11 | "tns-android": {
12 | "version": "3.2.0"
13 | }
14 | },
15 | "dependencies": {
16 | "@angular/animations": "~4.2.6",
17 | "@angular/common": "~4.2.6",
18 | "@angular/compiler": "~4.2.6",
19 | "@angular/core": "~4.2.6",
20 | "@angular/forms": "~4.2.6",
21 | "@angular/http": "~4.2.6",
22 | "@angular/platform-browser": "~4.2.6",
23 | "@angular/router": "~4.2.6",
24 | "nativescript-angular": "~4.2.0",
25 | "nativescript-auto-fit-text": "../src",
26 | "nativescript-theme-core": "~1.0.4",
27 | "reflect-metadata": "~0.1.8",
28 | "rxjs": "~5.4.3",
29 | "tns-core-modules": "~3.2.0",
30 | "zone.js": "~0.8.2"
31 | },
32 | "devDependencies": {
33 | "@angular/compiler-cli": "~4.2.6",
34 | "@ngtools/webpack": "~1.6.0",
35 | "babel-traverse": "6.25.0",
36 | "babel-types": "6.25.0",
37 | "babylon": "6.17.4",
38 | "copy-webpack-plugin": "~4.0.1",
39 | "extract-text-webpack-plugin": "~3.0.0",
40 | "lazy": "1.0.11",
41 | "nativescript-css-loader": "~0.26.0",
42 | "nativescript-dev-typescript": "~0.5.0",
43 | "nativescript-dev-webpack": "^0.8.0",
44 | "nativescript-worker-loader": "~0.8.1",
45 | "raw-loader": "~0.5.1",
46 | "resolve-url-loader": "~2.1.0",
47 | "typescript": "~2.5.3",
48 | "webpack": "~3.2.0",
49 | "webpack-bundle-analyzer": "^2.8.2",
50 | "webpack-sources": "~1.0.1"
51 | },
52 | "scripts": {
53 | "ns-bundle": "ns-bundle",
54 | "start-android-bundle": "npm run ns-bundle --android --run-app",
55 | "start-ios-bundle": "npm run ns-bundle --ios --run-app",
56 | "build-android-bundle": "npm run ns-bundle --android --build-app",
57 | "build-ios-bundle": "npm run ns-bundle --ios --build-app",
58 | "publish-ios-bundle": "npm run ns-bundle --ios --publish-app",
59 | "generate-android-snapshot": "generate-android-snapshot --targetArchs arm,arm64,ia32 --install"
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/demo/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tns-template-hello-world-ts",
3 | "main": "app.js",
4 | "version": "1.6.0",
5 | "author": {
6 | "name": "Telerik",
7 | "email": "support@telerik.com"
8 | },
9 | "description": "Nativescript hello-world-ts project template",
10 | "license": "Apache-2.0",
11 | "keywords": [
12 | "telerik",
13 | "mobile",
14 | "nativescript",
15 | "{N}",
16 | "tns",
17 | "appbuilder",
18 | "template"
19 | ],
20 | "repository": {
21 | "type": "git",
22 | "url": "git+ssh://git@github.com/NativeScript/template-hello-world-ts.git"
23 | },
24 | "bugs": {
25 | "url": "https://github.com/NativeScript/template-hello-world-ts/issues"
26 | },
27 | "homepage": "https://github.com/NativeScript/template-hello-world-ts",
28 | "android": {
29 | "v8Flags": "--expose_gc"
30 | },
31 | "devDependencies": {
32 | "nativescript-dev-typescript": "^0.3.0"
33 | },
34 | "_id": "tns-template-hello-world-ts@1.6.0",
35 | "_shasum": "a567c2b9a56024818c06596dab9629d155c5b8a8",
36 | "_resolved": "https://registry.npmjs.org/tns-template-hello-world-ts/-/tns-template-hello-world-ts-1.6.0.tgz",
37 | "_from": "tns-template-hello-world-ts@latest",
38 | "scripts": {},
39 | "_npmVersion": "2.14.7",
40 | "_nodeVersion": "4.2.2",
41 | "_npmUser": {
42 | "name": "enchev",
43 | "email": "vladimir.enchev@gmail.com"
44 | },
45 | "dist": {
46 | "shasum": "a567c2b9a56024818c06596dab9629d155c5b8a8",
47 | "tarball": "http://registry.npmjs.org/tns-template-hello-world-ts/-/tns-template-hello-world-ts-1.6.0.tgz"
48 | },
49 | "maintainers": [
50 | {
51 | "name": "enchev",
52 | "email": "vladimir.enchev@gmail.com"
53 | },
54 | {
55 | "name": "erjangavalji",
56 | "email": "erjan.gavalji@gmail.com"
57 | },
58 | {
59 | "name": "fatme",
60 | "email": "hfatme@gmail.com"
61 | },
62 | {
63 | "name": "hdeshev",
64 | "email": "hristo@deshev.com"
65 | },
66 | {
67 | "name": "kerezov",
68 | "email": "d.kerezov@gmail.com"
69 | },
70 | {
71 | "name": "ligaz",
72 | "email": "stefan.dobrev@gmail.com"
73 | },
74 | {
75 | "name": "nsndeck",
76 | "email": "nedyalko.nikolov@telerik.com"
77 | },
78 | {
79 | "name": "rosen-vladimirov",
80 | "email": "rosen.vladimirov.91@gmail.com"
81 | },
82 | {
83 | "name": "sdobrev",
84 | "email": "stefan.dobrev@gmail.com"
85 | },
86 | {
87 | "name": "tailsu",
88 | "email": "tailsu@gmail.com"
89 | },
90 | {
91 | "name": "teobugslayer",
92 | "email": "teobugslayer@gmail.com"
93 | },
94 | {
95 | "name": "valio.stoychev",
96 | "email": "valio.stoychev@gmail.com"
97 | }
98 | ],
99 | "_npmOperationalInternal": {
100 | "host": "packages-5-east.internal.npmjs.com",
101 | "tmp": "tmp/tns-template-hello-world-ts-1.6.0.tgz_1455717516189_0.6427943941671401"
102 | },
103 | "directories": {},
104 | "readme": "ERROR: No README data found!"
105 | }
106 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "29x29",
5 | "idiom" : "iphone",
6 | "filename" : "icon-29.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "29x29",
11 | "idiom" : "iphone",
12 | "filename" : "icon-29@2x.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "icon-29@3x.png",
19 | "scale" : "3x"
20 | },
21 | {
22 | "size" : "40x40",
23 | "idiom" : "iphone",
24 | "filename" : "icon-40@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "40x40",
29 | "idiom" : "iphone",
30 | "filename" : "icon-40@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "57x57",
35 | "idiom" : "iphone",
36 | "filename" : "icon-57.png",
37 | "scale" : "1x"
38 | },
39 | {
40 | "size" : "57x57",
41 | "idiom" : "iphone",
42 | "filename" : "icon-57@2x.png",
43 | "scale" : "2x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "icon-60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "icon-60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "29x29",
59 | "idiom" : "ipad",
60 | "filename" : "icon-29.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "29x29",
65 | "idiom" : "ipad",
66 | "filename" : "icon-29@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "40x40",
71 | "idiom" : "ipad",
72 | "filename" : "icon-40.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "40x40",
77 | "idiom" : "ipad",
78 | "filename" : "icon-40@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "50x50",
83 | "idiom" : "ipad",
84 | "filename" : "icon-50.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "50x50",
89 | "idiom" : "ipad",
90 | "filename" : "icon-50@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "72x72",
95 | "idiom" : "ipad",
96 | "filename" : "icon-72.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "72x72",
101 | "idiom" : "ipad",
102 | "filename" : "icon-72@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "76x76",
107 | "idiom" : "ipad",
108 | "filename" : "icon-76.png",
109 | "scale" : "1x"
110 | },
111 | {
112 | "size" : "76x76",
113 | "idiom" : "ipad",
114 | "filename" : "icon-76@2x.png",
115 | "scale" : "2x"
116 | },
117 | {
118 | "size" : "83.5x83.5",
119 | "idiom" : "ipad",
120 | "filename" : "icon-83.5@2x.png",
121 | "scale" : "2x"
122 | }
123 | ],
124 | "info" : {
125 | "version" : 1,
126 | "author" : "xcode"
127 | }
128 | }
--------------------------------------------------------------------------------
/src/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nativescript-auto-fit-text",
3 | "version": "1.0.1",
4 | "description": "AutoFitText NativeScript plugin.",
5 | "main": "auto-fit-text",
6 | "typings": "index.d.ts",
7 | "nativescript": {
8 | "platforms": {
9 | "android": "3.2.0",
10 | "ios": "3.2.0"
11 | }
12 | },
13 | "scripts": {
14 | "tsc": "tsc -skipLibCheck",
15 | "build": "node --max-old-space-size=8192 ./node_modules/.bin/ngc -p tsconfig.aot.json",
16 | "postclone": "npm i && node scripts/postclone.js && cd ../demo && npm i && cd ../src && npm run plugin.link",
17 | "test.android": "npm i && npm run build && npm run tslint && cd ../demo && tns build android && tns test android --justlaunch",
18 | "test.ios": "npm i && npm run build && npm run tslint && cd ../demo && tns build ios && tns test ios --justlaunch",
19 | "tslint": "cd .. && tslint \"**/*.ts\" --config tslint.json --exclude \"**/node_modules/**\"",
20 | "plugin.link": "npm link && cd ../demo && npm link nativescript-auto-fit-text && cd ../demo-ng && npm link nativescript-auto-fit-text && cd ../src",
21 | "plugin.tscwatch": "npm run build -- -w",
22 | "demo.ios": "npm i && npm run build && cd ../demo && tns run ios --syncAllFiles",
23 | "demo.android": "npm i && npm run build && cd ../demo && tns run android --syncAllFiles",
24 | "demo.ng.ios": "npm i && npm run build && cd ../demo-ng && npm run start-ios-bundle -- --syncAllFiles",
25 | "demo.ng.android": "npm i && npm run build && cd ../demo-ng && tns run android --syncAllFiles"
26 | },
27 | "repository": {
28 | "type": "git",
29 | "url": "https://github.com/danielgek/nativescript-auto-fit-text.git"
30 | },
31 | "keywords": [
32 | "NativeScript",
33 | "JavaScript",
34 | "Android",
35 | "iOS",
36 | "AutoFitText",
37 | "Adjust font to with"
38 | ],
39 | "author": {
40 | "name": "Daniel Leal",
41 | "email": "danielgek@gmail.com"
42 | },
43 | "bugs": {
44 | "url": "https://github.com/danielgek/nativescript-auto-fit-text/issues"
45 | },
46 | "license": "Apache-2.0",
47 | "homepage": "https://github.com/danielgek/nativescript-auto-fit-text",
48 | "readmeFilename": "README.md",
49 | "peerDependencies": {
50 | "tns-core-modules": "^3.1.0"
51 | },
52 | "devDependencies": {
53 | "@angular/common": "~4.2.6",
54 | "@angular/compiler": "~4.2.6",
55 | "@angular/compiler-cli": "~4.2.6",
56 | "@angular/core": "~4.2.6",
57 | "@angular/forms": "~4.2.6",
58 | "@angular/http": "~4.2.6",
59 | "@angular/platform-browser": "~4.2.6",
60 | "@angular/platform-browser-dynamic": "~4.2.6",
61 | "@angular/router": "~4.2.6",
62 | "nativescript-angular": "^4.2.0",
63 | "tns-core-modules": "^3.2.0",
64 | "tns-platform-declarations": "^3.2.0",
65 | "typescript": "^2.5.3",
66 | "prompt": "^1.0.0",
67 | "rimraf": "^2.5.0",
68 | "rxjs": "^5.4.3",
69 | "zone.js": "^0.8.4",
70 | "tslint": "^5.0.0"
71 | },
72 | "dependencies": {},
73 | "bootstrapper": "nativescript-plugin-seed"
74 | }
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/demo-ng/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "extent" : "full-screen",
5 | "idiom" : "iphone",
6 | "subtype" : "736h",
7 | "filename" : "Default-736h@3x.png",
8 | "minimum-system-version" : "8.0",
9 | "orientation" : "portrait",
10 | "scale" : "3x"
11 | },
12 | {
13 | "extent" : "full-screen",
14 | "idiom" : "iphone",
15 | "subtype" : "736h",
16 | "filename" : "Default-Landscape@3x.png",
17 | "minimum-system-version" : "8.0",
18 | "orientation" : "landscape",
19 | "scale" : "3x"
20 | },
21 | {
22 | "extent" : "full-screen",
23 | "idiom" : "iphone",
24 | "subtype" : "667h",
25 | "filename" : "Default-667h@2x.png",
26 | "minimum-system-version" : "8.0",
27 | "orientation" : "portrait",
28 | "scale" : "2x"
29 | },
30 | {
31 | "orientation" : "portrait",
32 | "idiom" : "iphone",
33 | "filename" : "Default@2x.png",
34 | "extent" : "full-screen",
35 | "minimum-system-version" : "7.0",
36 | "scale" : "2x"
37 | },
38 | {
39 | "extent" : "full-screen",
40 | "idiom" : "iphone",
41 | "subtype" : "retina4",
42 | "filename" : "Default-568h@2x.png",
43 | "minimum-system-version" : "7.0",
44 | "orientation" : "portrait",
45 | "scale" : "2x"
46 | },
47 | {
48 | "orientation" : "portrait",
49 | "idiom" : "ipad",
50 | "filename" : "Default-Portrait.png",
51 | "extent" : "full-screen",
52 | "minimum-system-version" : "7.0",
53 | "scale" : "1x"
54 | },
55 | {
56 | "orientation" : "landscape",
57 | "idiom" : "ipad",
58 | "filename" : "Default-Landscape.png",
59 | "extent" : "full-screen",
60 | "minimum-system-version" : "7.0",
61 | "scale" : "1x"
62 | },
63 | {
64 | "orientation" : "portrait",
65 | "idiom" : "ipad",
66 | "filename" : "Default-Portrait@2x.png",
67 | "extent" : "full-screen",
68 | "minimum-system-version" : "7.0",
69 | "scale" : "2x"
70 | },
71 | {
72 | "orientation" : "landscape",
73 | "idiom" : "ipad",
74 | "filename" : "Default-Landscape@2x.png",
75 | "extent" : "full-screen",
76 | "minimum-system-version" : "7.0",
77 | "scale" : "2x"
78 | },
79 | {
80 | "orientation" : "portrait",
81 | "idiom" : "iphone",
82 | "filename" : "Default.png",
83 | "extent" : "full-screen",
84 | "scale" : "1x"
85 | },
86 | {
87 | "orientation" : "portrait",
88 | "idiom" : "iphone",
89 | "filename" : "Default@2x.png",
90 | "extent" : "full-screen",
91 | "scale" : "2x"
92 | },
93 | {
94 | "orientation" : "portrait",
95 | "idiom" : "iphone",
96 | "filename" : "Default-568h@2x.png",
97 | "extent" : "full-screen",
98 | "subtype" : "retina4",
99 | "scale" : "2x"
100 | },
101 | {
102 | "orientation" : "portrait",
103 | "idiom" : "ipad",
104 | "extent" : "to-status-bar",
105 | "scale" : "1x"
106 | },
107 | {
108 | "orientation" : "portrait",
109 | "idiom" : "ipad",
110 | "filename" : "Default-Portrait.png",
111 | "extent" : "full-screen",
112 | "scale" : "1x"
113 | },
114 | {
115 | "orientation" : "landscape",
116 | "idiom" : "ipad",
117 | "extent" : "to-status-bar",
118 | "scale" : "1x"
119 | },
120 | {
121 | "orientation" : "landscape",
122 | "idiom" : "ipad",
123 | "filename" : "Default-Landscape.png",
124 | "extent" : "full-screen",
125 | "scale" : "1x"
126 | },
127 | {
128 | "orientation" : "portrait",
129 | "idiom" : "ipad",
130 | "extent" : "to-status-bar",
131 | "scale" : "2x"
132 | },
133 | {
134 | "orientation" : "portrait",
135 | "idiom" : "ipad",
136 | "filename" : "Default-Portrait@2x.png",
137 | "extent" : "full-screen",
138 | "scale" : "2x"
139 | },
140 | {
141 | "orientation" : "landscape",
142 | "idiom" : "ipad",
143 | "extent" : "to-status-bar",
144 | "scale" : "2x"
145 | },
146 | {
147 | "orientation" : "landscape",
148 | "idiom" : "ipad",
149 | "filename" : "Default-Landscape@2x.png",
150 | "extent" : "full-screen",
151 | "scale" : "2x"
152 | }
153 | ],
154 | "info" : {
155 | "version" : 1,
156 | "author" : "xcode"
157 | }
158 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "extent" : "full-screen",
5 | "idiom" : "iphone",
6 | "subtype" : "736h",
7 | "filename" : "Default-736h@3x.png",
8 | "minimum-system-version" : "8.0",
9 | "orientation" : "portrait",
10 | "scale" : "3x"
11 | },
12 | {
13 | "extent" : "full-screen",
14 | "idiom" : "iphone",
15 | "subtype" : "736h",
16 | "filename" : "Default-Landscape@3x.png",
17 | "minimum-system-version" : "8.0",
18 | "orientation" : "landscape",
19 | "scale" : "3x"
20 | },
21 | {
22 | "extent" : "full-screen",
23 | "idiom" : "iphone",
24 | "subtype" : "667h",
25 | "filename" : "Default-667h@2x.png",
26 | "minimum-system-version" : "8.0",
27 | "orientation" : "portrait",
28 | "scale" : "2x"
29 | },
30 | {
31 | "orientation" : "portrait",
32 | "idiom" : "iphone",
33 | "filename" : "Default@2x.png",
34 | "extent" : "full-screen",
35 | "minimum-system-version" : "7.0",
36 | "scale" : "2x"
37 | },
38 | {
39 | "extent" : "full-screen",
40 | "idiom" : "iphone",
41 | "subtype" : "retina4",
42 | "filename" : "Default-568h@2x.png",
43 | "minimum-system-version" : "7.0",
44 | "orientation" : "portrait",
45 | "scale" : "2x"
46 | },
47 | {
48 | "orientation" : "portrait",
49 | "idiom" : "ipad",
50 | "filename" : "Default-Portrait.png",
51 | "extent" : "full-screen",
52 | "minimum-system-version" : "7.0",
53 | "scale" : "1x"
54 | },
55 | {
56 | "orientation" : "landscape",
57 | "idiom" : "ipad",
58 | "filename" : "Default-Landscape.png",
59 | "extent" : "full-screen",
60 | "minimum-system-version" : "7.0",
61 | "scale" : "1x"
62 | },
63 | {
64 | "orientation" : "portrait",
65 | "idiom" : "ipad",
66 | "filename" : "Default-Portrait@2x.png",
67 | "extent" : "full-screen",
68 | "minimum-system-version" : "7.0",
69 | "scale" : "2x"
70 | },
71 | {
72 | "orientation" : "landscape",
73 | "idiom" : "ipad",
74 | "filename" : "Default-Landscape@2x.png",
75 | "extent" : "full-screen",
76 | "minimum-system-version" : "7.0",
77 | "scale" : "2x"
78 | },
79 | {
80 | "orientation" : "portrait",
81 | "idiom" : "iphone",
82 | "filename" : "Default.png",
83 | "extent" : "full-screen",
84 | "scale" : "1x"
85 | },
86 | {
87 | "orientation" : "portrait",
88 | "idiom" : "iphone",
89 | "filename" : "Default@2x.png",
90 | "extent" : "full-screen",
91 | "scale" : "2x"
92 | },
93 | {
94 | "orientation" : "portrait",
95 | "idiom" : "iphone",
96 | "filename" : "Default-568h@2x.png",
97 | "extent" : "full-screen",
98 | "subtype" : "retina4",
99 | "scale" : "2x"
100 | },
101 | {
102 | "orientation" : "portrait",
103 | "idiom" : "ipad",
104 | "extent" : "to-status-bar",
105 | "scale" : "1x"
106 | },
107 | {
108 | "orientation" : "portrait",
109 | "idiom" : "ipad",
110 | "filename" : "Default-Portrait.png",
111 | "extent" : "full-screen",
112 | "scale" : "1x"
113 | },
114 | {
115 | "orientation" : "landscape",
116 | "idiom" : "ipad",
117 | "extent" : "to-status-bar",
118 | "scale" : "1x"
119 | },
120 | {
121 | "orientation" : "landscape",
122 | "idiom" : "ipad",
123 | "filename" : "Default-Landscape.png",
124 | "extent" : "full-screen",
125 | "scale" : "1x"
126 | },
127 | {
128 | "orientation" : "portrait",
129 | "idiom" : "ipad",
130 | "extent" : "to-status-bar",
131 | "scale" : "2x"
132 | },
133 | {
134 | "orientation" : "portrait",
135 | "idiom" : "ipad",
136 | "filename" : "Default-Portrait@2x.png",
137 | "extent" : "full-screen",
138 | "scale" : "2x"
139 | },
140 | {
141 | "orientation" : "landscape",
142 | "idiom" : "ipad",
143 | "extent" : "to-status-bar",
144 | "scale" : "2x"
145 | },
146 | {
147 | "orientation" : "landscape",
148 | "idiom" : "ipad",
149 | "filename" : "Default-Landscape@2x.png",
150 | "extent" : "full-screen",
151 | "scale" : "2x"
152 | }
153 | ],
154 | "info" : {
155 | "version" : 1,
156 | "author" : "xcode"
157 | }
158 | }
--------------------------------------------------------------------------------
/src/scripts/postclone.js:
--------------------------------------------------------------------------------
1 | var fs = require('fs');
2 | var prompt = require('prompt');
3 | var rimraf = require('rimraf');
4 | var exec = require('child_process').exec;
5 |
6 | var class_name,
7 | inputParams = {
8 | plugin_name: undefined,
9 | github_username: undefined,
10 | init_git: undefined
11 | },
12 | seed_plugin_name = "yourplugin",
13 | seed_class_name = "YourPlugin",
14 | seed_demo_property_name = "yourPlugin",
15 | seed_github_username = "YourName",
16 | demo_folder = "../demo",
17 | screenshots_dir = "../screenshots",
18 | seed_tests_dir = "../seed-tests"
19 | filesToReplace = {
20 | readmeFile: { source: "README.md", destination: "../README.md"},
21 | travisFile: { source: ".travis.yml", destination: "../.travis.yml"}
22 | };
23 |
24 | console.log('NativeScript Plugin Seed Configuration');
25 |
26 | var parseArgv = function() {
27 | var argv = Array.prototype.slice.call(process.argv, 2);
28 | var result = {};
29 | argv.forEach(function(pairString) {
30 | var pair = pairString.split('=');
31 | result[pair[0]] = pair[1];
32 | });
33 | return result;
34 | };
35 | var argv = parseArgv();
36 |
37 | if (argv.gitHubUsername !== undefined && argv.pluginName !== undefined && argv.initGit !== undefined) {
38 | inputParams.github_username = argv.gitHubUsername;
39 | inputParams.plugin_name = argv.pluginName;
40 | inputParams.init_git = argv.initGit
41 | }
42 |
43 | askGithubUsername();
44 |
45 | function askGithubUsername() {
46 | if (inputParams.github_username !== undefined) {
47 | askPluginName();
48 | } else {
49 | prompt.start();
50 | prompt.get({
51 | name: 'github_username',
52 | description: 'What is your GitHub username (used for updating package.json)? Example: NathanWalker / EddyVerbruggen'
53 | }, function(err, result) {
54 | if (err) {
55 | return console.log(err);
56 | }
57 | if (!result.github_username) {
58 | return console.log("Your GitHub username is required to configure plugin's package.json.");
59 | }
60 | inputParams.github_username = result.github_username;
61 | askPluginName();
62 | });
63 | }
64 | }
65 |
66 | function askPluginName() {
67 | if (inputParams.plugin_name !== undefined) {
68 | generateClassName();
69 | } else {
70 | prompt.get({
71 | name: 'plugin_name',
72 | description: 'What will be the name of your plugin? Use lowercase characters and dashes only. Example: yourplugin / google-maps / bluetooth'
73 | }, function(err, result) {
74 | if (err) {
75 | return console.log(err);
76 | }
77 | if (!result.plugin_name) {
78 | return console.log("Your plugin name is required to correct the file names and classes.");
79 | }
80 |
81 | inputParams.plugin_name = result.plugin_name;
82 |
83 | if(inputParams.plugin_name.startsWith("nativescript-")){
84 | inputParams.plugin_name = inputParams.plugin_name.replace("nativescript-", "");
85 | }
86 |
87 | generateClassName();
88 | });
89 | }
90 | }
91 |
92 | function generateClassName() {
93 | // the classname becomes 'GoogleMaps' when plugin_name is 'google_maps'
94 | class_name = "";
95 | var plugin_name_parts = inputParams.plugin_name.split("-");
96 | for (var p in plugin_name_parts) {
97 | var part = plugin_name_parts[p];
98 | class_name += (part[0].toUpperCase() + part.substr(1));
99 | }
100 | console.log('Using ' + class_name + ' as the TypeScript Class name..');
101 | renameFiles();
102 | }
103 |
104 | function renameFiles() {
105 | console.log('Will now rename some files..');
106 | var files = fs.readdirSync(".");
107 | for (var f in files) {
108 | var file = files[f];
109 | if (file.indexOf(seed_plugin_name) === 0) {
110 | var newName = inputParams.plugin_name + file.substr(file.indexOf("."));
111 | fs.renameSync(file, newName);
112 | }
113 | }
114 |
115 | adjustScripts();
116 | }
117 |
118 | function adjustScripts() {
119 | console.log('Adjusting scripts..');
120 |
121 | // add all files in the root
122 | var files = fs.readdirSync(".");
123 |
124 | // add include.gradle
125 | files.push("platforms/android/include.gradle");
126 |
127 | // add demo's package.json
128 | files.push(demo_folder + "/package.json");
129 |
130 | // add the demo files
131 | var demoFiles = fs.readdirSync(demo_folder + "/app/");
132 | for (var d in demoFiles) {
133 | var demoFile = demoFiles[d];
134 | files.push(demo_folder + "/app/" + demoFile);
135 | }
136 | // add the tests
137 | files.push(demo_folder + "/app/tests/tests.js");
138 |
139 | // prepare and cache a few Regexp thingies
140 | var regexp_seed_plugin_name = new RegExp(seed_plugin_name, "g");
141 | var regexp_seed_class_name = new RegExp(seed_class_name, "g");
142 | var regexp_seed_demo_property_name = new RegExp(seed_demo_property_name, "g");
143 | var regexp_seed_github_username = new RegExp(seed_github_username, "g");
144 |
145 | for (var f in files) {
146 | var file = files[f];
147 |
148 | if (fs.lstatSync(file).isFile()) {
149 | var contents = fs.readFileSync(file, 'utf8');
150 | var result = contents.replace(regexp_seed_plugin_name, inputParams.plugin_name);
151 | result = result.replace(regexp_seed_class_name, class_name);
152 | result = result.replace(regexp_seed_demo_property_name, class_name[0].toLowerCase() + class_name.substr(1));
153 | result = result.replace(regexp_seed_github_username, inputParams.github_username);
154 | fs.writeFileSync(file, result);
155 | }
156 | }
157 |
158 | replaceFiles();
159 | }
160 |
161 | function replaceFiles() {
162 |
163 | for(key in filesToReplace){
164 | var file = filesToReplace[key];
165 | var contents = fs.readFileSync(file.source);
166 | fs.writeFileSync(file.destination, contents);
167 | fs.unlinkSync(file.source);
168 | }
169 |
170 | rimraf(screenshots_dir, function() {
171 | console.log('Screenshots removed.');
172 | rimraf(seed_tests_dir, function() {
173 | console.log('Seed tests removed.');
174 | askInitGit();
175 | });
176 | });
177 | }
178 |
179 | function askInitGit() {
180 | if (inputParams.init_git !== undefined) {
181 | initGit();
182 | } else {
183 | prompt.get({
184 | name: 'init_git',
185 | description: 'Do you want to init a fresh local git project? If you previously \'git clone\'d this repo that would be wise (y/n)',
186 | default: 'y'
187 | }, function(err, result) {
188 | if (err) {
189 | return console.log(err);
190 | }
191 |
192 | inputParams.init_git = result.init_git;
193 | initGit();
194 | });
195 | }
196 | }
197 |
198 | function initGit() {
199 | if (inputParams.init_git && inputParams.init_git.toLowerCase() === 'y') {
200 | rimraf.sync('../.git');
201 | exec('git init -q ..', function(err, stdout, stderr) {
202 | if (err) {
203 | console.log(err);
204 | finishSetup();
205 | } else {
206 | exec("git add '../*' '../.*'", function(err, stdout, stderr) {
207 | if (err) {
208 | console.log(err);
209 | }
210 | finishSetup();
211 | });
212 | }
213 | });
214 | } else {
215 | finishSetup();
216 | }
217 | }
218 |
219 | function finishSetup() {
220 | console.log("Configuration finished! If you're not happy with the result please clone the seed again and rerun this script.");
221 | console.log("You can now continue by running 'npm run plugin.tscwatch' in this window and in another one - 'npm run demo.ios' or 'npm run demo.android'!");
222 |
223 | process.exit();
224 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------