This commit is contained in:
PatrickJS 2015-03-07 14:25:10 -08:00 коммит произвёл Tsvetomir Tsonev
Коммит 56c76ab10d
227 изменённых файлов: 21058 добавлений и 0 удалений

57
.angular-cli.json Normal file
Просмотреть файл

@ -0,0 +1,57 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "angular-seed-project"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "seed",
"styles": [
"styles.scss"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"project": "src/tsconfig.app.json"
},
{
"project": "src/tsconfig.spec.json"
},
{
"project": "e2e/tsconfig.e2e.json"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "scss",
"component": {}
}
}

13
.editorconfig Normal file
Просмотреть файл

@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false

11
.github/CONTRIBUTING.md поставляемый Normal file
Просмотреть файл

@ -0,0 +1,11 @@
## Read and contribute to the Wiki
Make sure you read the [Wiki](https://github.com/AngularClass/angular2-webpack-starter/wiki).
## Submitting Pull Requests
If you're changing the structure of the repository please create an issue first.
## Submitting bug reports
Make sure you are on latest changes and that you ran this command `npm run clean:install` after updating your local repository. If you can, please provide more information about your environment such as browser, operating system, node version, and npm version.

36
.github/ISSUE_TEMPLATE.md поставляемый Normal file
Просмотреть файл

@ -0,0 +1,36 @@
**Note: for support questions, please use one of these channels:** [Chat: AngularClass.slack](http://angularclass.com/member-join/) or [Twitter: @AngularClass](https://twitter.com/AngularClass)
* **I'm submitting a ...**
[ ] bug report
[ ] feature request
[ ] question about the decisions made in the repository
* **Do you want to request a *feature* or report a *bug*?**
* **What is the current behavior?**
* **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem** via
https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
* **What is the expected behavior?**
* **What is the motivation / use case for changing the behavior?**
* **Please tell us about your environment:**
- Angular version: 2.0.0-beta.X
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

13
.github/PULL_REQUEST_TEMPLATE.md поставляемый Normal file
Просмотреть файл

@ -0,0 +1,13 @@
* **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)
* **What is the current behavior?** (You can also link to an open issue here)
* **What is the new behavior (if this is a feature change)?**
* **Other information**:

46
.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1,46 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# dependencies
/node_modules
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
testem.log
/typings
yarn.lock
# e2e
/e2e/*.js
/e2e/*.map
# System Files
.DS_Store
Thumbs.db
# Secrets
nginx/keys

8
Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,8 @@
# You are free to change the contents of this file
FROM nginx
# NGINX configurations
COPY ./nginx/conf.d /etc/nginx/conf.d
# Copy built app to wwwroot
COPY dist /usr/share/nginx/html

45
README.md Normal file
Просмотреть файл

@ -0,0 +1,45 @@
# Angular NativeScript Seed
Build truly web and native applications using NativeScript and Angular. This seed allows your project to share code between the environments; having complete control over dependencies.
## Highlights
- i18n Translations
- Lazy Loaded Modules
- Angular CLI // Webpack // Testing
- Target Phone and Tablet Templates Individually
- Docker build provided using NGINX to serve web content and load balance reverse proxied backends. (See nginx folder for setup instructions)
## Getting Started
Web is setup from the root.
```
npm i
```
Mobile is setup from the `nativescript` folder.
```
cd nativescript
npm i
```
Each platform is run respective to it's folder. View available commands here:
- [Seed Commands](https://github.com/TeamMaestro/angular-native-seed/wiki/Seed-Commands)
## How To's
- [Integrating Angular Material (`@angular/material`)](https://github.com/TeamMaestro/angular-native-seed/wiki/Integrating-Material-for-Web)
## Workspace Options
- [VSCode WorkSpace Settings](https://github.com/TeamMaestro/angular-native-seed/wiki/Optional:-VSCode-WorkSpace-Settings)
| | |
|:---: |:---:|
|![Web Preview](https://i.gyazo.com/1ba4d3be7b7332ce91bd6715dc752d8b.gif)|![Native Preview](https://i.gyazo.com/0a88b56cff9af632f618e5b123502f5f.gif)|
# Contributors
[<img alt="Don Burgess" src="https://avatars1.githubusercontent.com/u/7612751?v=3&s=117" width="117">](https://github.com/db3dev) | [<img alt="Sean perkins" src="https://avatars1.githubusercontent.com/u/13732623?v=3&s=117" width="117">](https://github.com/sean-perkins) |
:---: |:---: |
[Don Burgess](https://github.com/db3dev) |[Sean Perkins](https://github.com/sean-perkins)|

10
docker-compose.yml Normal file
Просмотреть файл

@ -0,0 +1,10 @@
version: "2"
services:
angular-native-seed:
build: .
image: angularnativeseed
ports:
- "8080:80"
- "443:443"
volumes:
- ./nginx/keys/:/etc/nginx/keys

14
e2e/app.e2e-spec.ts Normal file
Просмотреть файл

@ -0,0 +1,14 @@
import { LoopPage } from './app.po';
describe('loop App', () => {
let page: LoopPage;
beforeEach(() => {
page = new LoopPage();
});
it('should display message saying app works', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('loop works!');
});
});

11
e2e/app.po.ts Normal file
Просмотреть файл

@ -0,0 +1,11 @@
import { browser, element, by } from 'protractor';
export class LoopPage {
navigateTo() {
return browser.get('/');
}
getParagraphText() {
return element(by.css('loop-root h1')).getText();
}
}

12
e2e/tsconfig.e2e.json Normal file
Просмотреть файл

@ -0,0 +1,12 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es5",
"types":[
"jasmine",
"node"
]
}
}

44
karma.conf.js Normal file
Просмотреть файл

@ -0,0 +1,44 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
files: [
{ pattern: './src/test.ts', watched: false }
],
preprocessors: {
'./src/test.ts': ['@angular/cli']
},
mime: {
'text/x-typescript': ['ts','tsx']
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: config.angularCli && config.angularCli.codeCoverage
? ['progress', 'coverage-istanbul']
: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};

16
nativescript/.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1,16 @@
node_modules
yarn.lock
platforms
hooks
app/**/*
!app/vendor-platform.android.ts
!app/vendor-platform.ios.ts
!app/vendor.ts
src/app
src/assets
src/node_modules
src/platforms
times.html

Просмотреть файл

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="__PACKAGE__"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"/>
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="__APILEVEL__"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:name="com.tns.NativeScriptApplication"
android:allowBackup="true"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name="com.tns.NativeScriptActivity"
android:label="@string/title_activity_kimera"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/LaunchScreenTheme">
<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.tns.ErrorReportActivity"/>
</application>
</manifest>

Просмотреть файл

@ -0,0 +1,16 @@
// Add your native dependencies here:
// Uncomment to add recyclerview-v7 dependency
//dependencies {
// compile 'com.android.support:recyclerview-v7:+'
//}
android {
defaultConfig {
generatedDensities = []
applicationId = "__PACKAGE__"
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}

Двоичные данные
nativescript/App_Resources/Android/drawable-hdpi/background.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.4 KiB

Двоичные данные
nativescript/App_Resources/Android/drawable-hdpi/icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 11 KiB

Двоичные данные
nativescript/App_Resources/Android/drawable-hdpi/logo.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 32 KiB

Двоичные данные
nativescript/App_Resources/Android/drawable-ldpi/background.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.3 KiB

Двоичные данные
nativescript/App_Resources/Android/drawable-ldpi/icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 6.0 KiB

Двоичные данные
nativescript/App_Resources/Android/drawable-ldpi/logo.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 10 KiB

Двоичные данные
nativescript/App_Resources/Android/drawable-mdpi/background.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.9 KiB

Двоичные данные
nativescript/App_Resources/Android/drawable-mdpi/icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 7.4 KiB

Двоичные данные
nativescript/App_Resources/Android/drawable-mdpi/logo.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 16 KiB

Просмотреть файл

@ -0,0 +1,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="fill">
<item>
<bitmap android:gravity="fill" android:src="@drawable/background" />
</item>
<item>
<bitmap android:gravity="center" android:src="@drawable/logo" />
</item>
</layer-list>

Двоичные данные
nativescript/App_Resources/Android/drawable-xhdpi/background.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.3 KiB

Двоичные данные
nativescript/App_Resources/Android/drawable-xhdpi/icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 39 KiB

Двоичные данные
nativescript/App_Resources/Android/drawable-xhdpi/logo.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 54 KiB

Двоичные данные
nativescript/App_Resources/Android/drawable-xxhdpi/background.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 10 KiB

Двоичные данные
nativescript/App_Resources/Android/drawable-xxhdpi/icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 41 KiB

Двоичные данные
nativescript/App_Resources/Android/drawable-xxhdpi/logo.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 116 KiB

Двоичные данные
nativescript/App_Resources/Android/drawable-xxxhdpi/background.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.9 KiB

Двоичные данные
nativescript/App_Resources/Android/drawable-xxxhdpi/icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 46 KiB

Двоичные данные
nativescript/App_Resources/Android/drawable-xxxhdpi/logo.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 193 KiB

Просмотреть файл

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ns_accent">#3d5afe</color>
</resources>

Просмотреть файл

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Application theme -->
<style name="AppTheme" parent="AppThemeBase">
<item name="android:datePickerStyle">@style/SpinnerDatePicker</item>
<item name="android:timePickerStyle">@style/SpinnerTimePicker</item>
</style>
<!-- Default style for DatePicker - in spinner mode -->
<style name="SpinnerDatePicker" parent="android:Widget.Material.Light.DatePicker">
<item name="android:datePickerMode">spinner</item>
</style>
<!-- Default style for TimePicker - in spinner mode -->
<style name="SpinnerTimePicker" parent="android:Widget.Material.Light.TimePicker">
<item name="android:timePickerMode">spinner</item>
</style>
<style name="NativeScriptToolbarStyle" parent="NativeScriptToolbarStyleBase">
<item name="android:elevation">4dp</item>
</style>
</resources>

Просмотреть файл

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ns_primary">#F5F5F5</color>
<color name="ns_primaryDark">#757575</color>
<color name="ns_accent">#33B5E5</color>
<color name="ns_blue">#272734</color>
</resources>

Просмотреть файл

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- theme to use FOR launch screen-->
<style name="LaunchScreenThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
<item name="toolbarStyle">@style/NativeScriptToolbarStyle</item>
<item name="colorPrimary">@color/ns_primary</item>
<item name="colorPrimaryDark">@color/ns_primaryDark</item>
<item name="colorAccent">@color/ns_accent</item>
<item name="android:windowBackground">@drawable/splash_screen</item>
<item name="android:windowActionBarOverlay">true</item>
<item name="android:windowTranslucentStatus">true</item>
</style>
<style name="LaunchScreenTheme" parent="LaunchScreenThemeBase">
</style>
<!-- theme to use AFTER launch screen is loaded-->
<style name="AppThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
<item name="toolbarStyle">@style/NativeScriptToolbarStyle</item>
<item name="colorPrimary">@color/ns_primary</item>
<item name="colorPrimaryDark">@color/ns_primaryDark</item>
<item name="colorAccent">@color/ns_accent</item>
</style>
<style name="AppTheme" parent="AppThemeBase">
</style>
<!-- theme for actioon-bar -->
<style name="NativeScriptToolbarStyleBase" parent="Widget.AppCompat.Toolbar">
<item name="android:background">@color/ns_primary</item>
<item name="theme">@style/ThemeOverlay.AppCompat.ActionBar</item>
<item name="popupTheme">@style/ThemeOverlay.AppCompat</item>
</style>
<style name="NativeScriptToolbarStyle" parent="NativeScriptToolbarStyleBase">
</style>
</resources>

Просмотреть файл

@ -0,0 +1,128 @@
{
"images" : [
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon-29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon-29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon-29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "icon-40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "icon-40@3x.png",
"scale" : "3x"
},
{
"size" : "57x57",
"idiom" : "iphone",
"filename" : "icon-57.png",
"scale" : "1x"
},
{
"size" : "57x57",
"idiom" : "iphone",
"filename" : "icon-57@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "icon-60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "icon-60@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "icon-29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "icon-29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "icon-40.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "icon-40@2x.png",
"scale" : "2x"
},
{
"size" : "50x50",
"idiom" : "ipad",
"filename" : "icon-50.png",
"scale" : "1x"
},
{
"size" : "50x50",
"idiom" : "ipad",
"filename" : "icon-50@2x.png",
"scale" : "2x"
},
{
"size" : "72x72",
"idiom" : "ipad",
"filename" : "icon-72.png",
"scale" : "1x"
},
{
"size" : "72x72",
"idiom" : "ipad",
"filename" : "icon-72@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "icon-76.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "icon-76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "icon-83.5@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.3 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.9 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.8 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.0 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.3 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 7.3 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 31 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 36 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 32 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 38 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 7.2 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 11 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 33 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 41 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 9.8 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 9.7 KiB

Просмотреть файл

@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Просмотреть файл

@ -0,0 +1,158 @@
{
"images" : [
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "736h",
"filename" : "Default-736h@3x.png",
"minimum-system-version" : "8.0",
"orientation" : "portrait",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "736h",
"filename" : "Default-Landscape@3x.png",
"minimum-system-version" : "8.0",
"orientation" : "landscape",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "667h",
"filename" : "Default-667h@2x.png",
"minimum-system-version" : "8.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "Default@2x.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "retina4",
"filename" : "Default-568h@2x.png",
"minimum-system-version" : "7.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"filename" : "Default-Portrait.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "Default-Landscape.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"filename" : "Default-Portrait@2x.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "Default-Landscape@2x.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "Default.png",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "Default@2x.png",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "Default-568h@2x.png",
"extent" : "full-screen",
"subtype" : "retina4",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"filename" : "Default-Portrait.png",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "Default-Landscape.png",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"filename" : "Default-Portrait@2x.png",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "Default-Landscape@2x.png",
"extent" : "full-screen",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 62 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 112 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 180 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 61 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 187 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 198 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 60 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 182 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 20 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 61 KiB

Просмотреть файл

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchScreen-AspectFill.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchScreen-AspectFill@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.9 KiB

Просмотреть файл

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchScreen-Center.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchScreen-Center@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Двоичные данные
nativescript/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png поставляемый Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 65 KiB

Двоичные данные
nativescript/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png поставляемый Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 202 KiB

Просмотреть файл

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiresFullScreen</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LaunchScreen.AspectFill" translatesAutoresizingMaskIntoConstraints="NO" id="wtH-rr-YfP">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LaunchScreen.Center" translatesAutoresizingMaskIntoConstraints="NO" id="s1z-aa-wYv">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="xb3-aO-Qok" firstAttribute="top" secondItem="wtH-rr-YfP" secondAttribute="bottom" id="5FO-pR-qKb"/>
<constraint firstItem="wtH-rr-YfP" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="Awn-b8-xf1"/>
<constraint firstItem="s1z-aa-wYv" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="CiP-yX-1sg"/>
<constraint firstAttribute="trailing" secondItem="wtH-rr-YfP" secondAttribute="trailing" id="RXg-rW-UK8"/>
<constraint firstItem="s1z-aa-wYv" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="agC-wa-3bd"/>
<constraint firstItem="wtH-rr-YfP" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="cch-8E-tYu"/>
<constraint firstItem="xb3-aO-Qok" firstAttribute="top" secondItem="s1z-aa-wYv" secondAttribute="bottom" id="fNc-Ro-KaG"/>
<constraint firstAttribute="trailing" secondItem="s1z-aa-wYv" secondAttribute="trailing" id="qoI-OC-Zk7"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="510" y="238"/>
</scene>
</scenes>
<resources>
<image name="LaunchScreen.AspectFill" width="768" height="1024"/>
<image name="LaunchScreen.Center" width="40" height="40"/>
</resources>
</document>

Просмотреть файл

@ -0,0 +1,7 @@
// You can add custom settings here
// for example you can uncomment the following line to force distribution code signing
// CODE_SIGN_IDENTITY = iPhone Distribution
// 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
// DEVELOPMENT_TEAM = YOUR_TEAM_ID;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;

169
nativescript/gulpfile.js Normal file
Просмотреть файл

@ -0,0 +1,169 @@
const gulp = require('gulp');
const rename = require('gulp-rename');
const replace = require('gulp-string-replace')
const debug = require('gulp-debug');
const del = require('del');
const SRC = 'src/';
const DEST = 'app/';
function removeTns (path) {
path.basename = path.basename.replace('.tns', '');
}
function removePhone (path) {
path.basename = path.basename.replace('.phone', '');
}
gulp.task('clean.Dist', () => {
return del([
'app/**/*',
'!**/vendor.ts',
'!**/vendor-platform.android.ts',
'!**/vendor-platform.ios.ts'
]);
});
gulp.task('resources.App_Resources', () => {
return gulp.src(['App_Resources/**/*'], {follow: true})
.pipe(gulp.dest(`${DEST}App_Resources`));
});
gulp.task('resources.Assets', () => {
return gulp.src([`${SRC}**/*`, `!${SRC}app/`, `!${SRC}test/`, '!**/*.spec.*', '!**/*.js', '!**/*.ts', '!**/*.scss', '!**/*.html'], {follow: true})
// .pipe(debug({title: 'resources.Assets'}))
.pipe(gulp.dest(DEST));
});
gulp.task('project.Typescript', () => {
return gulp.src([`${SRC}**/*.ts`, '!**/*.tns.*', '!**/*.spec.*'], {follow: true})
// .pipe(debug({title: 'project.Typescript'}))
.pipe(gulp.dest(DEST));
});
gulp.task('project.Styles', () => {
return gulp.src([`${SRC}**/*.scss`, `!${SRC}**/dashboard.style.scss`, '!**/*.tns.*'], {follow: true})
.pipe(gulp.dest(DEST));
});
gulp.task('tns.Typescript', () => {
return gulp.src([`${SRC}**/*.tns.ts`], {follow: true})
.pipe(rename(removeTns))
// .pipe(debug({title: 'tns.Typescript'}))
.pipe(gulp.dest(DEST, {overwrite: true}));
});
gulp.task('tns.Templates', () => {
return gulp.src([`${SRC}**/*.tns.html`, `${SRC}**/*.tns.ios.html`, `${SRC}**/*.tns.android.html`], {follow: true})
.pipe(rename(removeTns))
// .pipe(debug({title: 'tns.Templates'}))
.pipe(gulp.dest(DEST, {overwrite: true}));
});
gulp.task('tns.Styles', () => {
return gulp.src([`${SRC}**/*.tns.scss`, `${SRC}**/*.tns.ios.scss`, `${SRC}**/*.tns.android.scss`], {follow: true})
.pipe(rename(removeTns))
// .pipe(debug({title: 'tns.Styles'}))
.pipe(gulp.dest(DEST, {overwrite: true}));
});
gulp.task('phone.Typescript', () => {
return gulp.src([`${SRC}**/*.tns.phone.ts`], {follow: true})
.pipe(rename(removeTns))
.pipe(rename(removePhone))
// .pipe(debug({title: 'phone.Typescript'}))
.pipe(gulp.dest(DEST, {overwrite: true}));
});
gulp.task('phone.Templates', () => {
return gulp.src([`${SRC}**/*.tns.phone.html`, `${SRC}**/*.tns.ios.phone.html`, `${SRC}**/*.tns.android.phone.html`], {follow: true})
.pipe(rename(removeTns))
.pipe(rename(removePhone))
// .pipe(debug({title: 'phone.Templates'}))
.pipe(gulp.dest(DEST, {overwrite: true}));
});
gulp.task('phone.Styles', () => {
return gulp.src([`${SRC}**/*.tns.phone.scss`, `${SRC}**/*.tns.ios.phone.scss`, `${SRC}**/*.tns.android.phone.scss`], {follow: true})
.pipe(rename(removeTns))
.pipe(rename(removePhone))
// .pipe(debug({title: 'phone.Styles'}))
.pipe(gulp.dest(DEST, {overwrite: true}));
});
gulp.task(
'build.Default',
gulp.series(
'clean.Dist',
'resources.App_Resources',
'resources.Assets',
'project.Typescript',
'project.Styles',
'tns.Templates',
'tns.Styles',
'tns.Typescript'
)
);
gulp.task(
'build.Phone',
gulp.series(
'build.Default',
'phone.Typescript',
'phone.Templates',
'phone.Styles'
)
);
/**
* For non webpack builds, scss needs to be converted to css
*/
gulp.task('tns.ComponentStyles', () => {
return gulp.src([`${DEST}/**/*.component.ts`], {follow: true})
.pipe(replace('.scss\'', '.css\'', { logs: { enabled: false }}))
// .pipe(debug({title: 'tns.ComponentStyles'}))
.pipe(gulp.dest(DEST, {overwrite: true}));
});
gulp.task(
'build.cli.Default',
gulp.series(
'build.Default',
'tns.ComponentStyles'
)
);
gulp.task(
'build.cli.Phone',
gulp.series(
'build.Phone',
'tns.ComponentStyles'
)
);
gulp.task('tns.Livesync', () => {
return gulp.watch([`${SRC}**/*.tns.html`, `${SRC}/**/*.tns.scss`, `${SRC}/**/*.component.ts`])
.on('change', (file) => {
var outputDest = file.replace(SRC, DEST);
outputDest = outputDest.substring(0, outputDest.lastIndexOf('/'));
gulp.src([file])
.pipe(rename(removeTns))
.pipe(replace('.scss\'', '.css\'', { logs: { enabled: false }}))
.pipe(debug({title: 'tns.Livesync'}))
.pipe(gulp.dest(outputDest, {overwrite: true}));
});
});
gulp.task('tns.Livesync.Phone', () => {
return gulp.watch([`${SRC}**/*.tns.phone.html`, `${SRC}/**/*.tns.phone.scss`, `${SRC}/**/*.component.ts`])
.on('change', (file) => {
var outputDest = file.replace(SRC, DEST);
outputDest = outputDest.substring(0, outputDest.lastIndexOf('/'));
gulp.src([file])
.pipe(rename(removeTns))
.pipe(rename(removePhone))
.pipe(replace('.scss\'', '.css\'', { logs: { enabled: false }}))
.pipe(debug({title: 'tns.Livesync.Phone'}))
.pipe(gulp.dest(outputDest, {overwrite: true}));
});
});

6503
nativescript/package-lock.json сгенерированный Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

95
nativescript/package.json Normal file
Просмотреть файл

@ -0,0 +1,95 @@
{
"name": "angular-native-seed",
"version": "0.0.0",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "com.domain.project",
"tns-ios": {
"version": "3.1.0"
},
"tns-android": {
"version": "3.2.0"
}
},
"dependencies": {
"@angular/animations": "~4.1.0",
"@angular/common": "~4.1.0",
"@angular/compiler": "~4.1.0",
"@angular/core": "~4.1.0",
"@angular/forms": "~4.1.0",
"@angular/http": "~4.1.0",
"@angular/platform-browser": "~4.1.0",
"@angular/platform-browser-dynamic": "~4.1.0",
"@angular/router": "~4.1.0",
"@ngx-translate/core": "^6.0.1",
"@ngx-translate/http-loader": "0.0.3",
"@progress/kendo-theme-bootstrap": "^2.8.1",
"@progress/kendo-theme-default": "^2.42.0",
"bootstrap": "^4.0.0-beta",
"jquery": "^3.2.1",
"nativescript-angular": "^3.0.0",
"nativescript-theme-core": "~1.0.2",
"popper.js": "^1.12.5",
"reflect-metadata": "~0.1.8",
"rxjs": "~5.3.0",
"tns-core-modules": "^3.0.0",
"trace": "^3.0.0",
"typescript": "~2.2.0",
"zone.js": "~0.8.2"
},
"devDependencies": {
"@angular/compiler-cli": "~4.1.0",
"@ngtools/webpack": "~1.5.5",
"@types/jasmine": "^2.5.47",
"babel-traverse": "6.25.0",
"babel-types": "6.25.0",
"babylon": "6.17.4",
"copy-webpack-plugin": "~4.0.1",
"css-loader": "0.28.2",
"del": "^2.2.2",
"extract-text-webpack-plugin": "~2.1.0",
"gulp": "gulpjs/gulp#4.0",
"gulp-debug": "^3.1.0",
"gulp-rename": "^1.2.2",
"gulp-string-replace": "^0.4.0",
"lazy": "1.0.11",
"nativescript-css-loader": "~0.26.0",
"nativescript-dev-android-snapshot": "^0.*.*",
"nativescript-dev-sass": "^1.3.2",
"nativescript-dev-typescript": "~0.4.5",
"nativescript-dev-webpack": "^0.6.2",
"nativescript-telerik-ui": "^3.0.0",
"nativescript-theme-core": "^1.0.0",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.0.2",
"typescript": "~2.2.0",
"webpack": "~2.6.0",
"webpack-sources": "~0.2.3"
},
"scripts": {
"prepPhone": "gulp build.Phone",
"prepTablet": "gulp build.Default",
"prepCLIPhone": "gulp build.cli.Phone",
"prepCLITablet": "gulp build.cli.Default",
"ios": "npm run prepCLITablet && tns run ios",
"ios.phone": "npm run prepCLIPhone && tns run ios",
"android": "npm run prepCLITablet && tns run android",
"android.phone": "npm run prepCLIPhone && tns run android",
"phone-ios-bundle": "npm run prepPhone && tns prepare ios && npm run start-ios-bundle --uglify",
"tablet-ios-bundle": "npm run prepTablet && tns prepare ios && npm run start-ios-bundle --uglify",
"build.phone-ios-bundle": "npm run prepPhone && tns prepare ios && npm run build-ios-bundle --uglify",
"build.tablet-ios-bundle": "npm run prepTablet && tns prepare ios && npm run build-ios-bundle --uglify",
"phone-android-bundle": "npm run prepPhone && tns prepare android && npm run start-android-bundle --uglify",
"tablet-android-bundle": "npm run prepTablet && tns prepare android && npm run start-android-bundle --uglify",
"build.phone-android-bundle": "npm run prepPhone && tns prepare android && npm run build-android-bundle --uglify",
"build.tablet-android-bundle": "npm run prepTablet && tns prepare android && npm run build-android-bundle --uglify",
"ns-bundle": "ns-bundle",
"livesync": "gulp tns.Livesync",
"livesync.phone": "gulp tns.Livesync.Phone",
"publish-ios-bundle": "npm run ns-bundle --ios --publish-app",
"start-android-bundle": "npm run ns-bundle --android --run-app",
"start-ios-bundle": "npm run ns-bundle --ios --run-app",
"build-android-bundle": "npm run ns-bundle --android --build-app",
"build-ios-bundle": "npm run ns-bundle --ios --build-app"
}
}

201
nativescript/src/LICENSE Normal file
Просмотреть файл

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Просмотреть файл

@ -0,0 +1,102 @@
SegmentedBar, ActionBar {
border-color: transparent;
background-color: theme-color(primary);
color: white;
}
.issue-open {
background-color: theme-color(success); // #2AC46D;
}
.issue-closed {
background-color: theme-color(danger); //#CF3257;
}
.tag,.avatar-small {
border-radius: 2;
border-width: 0;
margin: 2;
}
.tag {
height: 16;
padding: 2 4;
color: white;
font-weight: bold;
font-size: 10;
margin-top: 12;
margin-bottom: 16;
}
.avatar-small {
height: 16;
width: 16;
margin-top: 12;
margin-bottom: 16;
}
.avatar-big {
height: 40;
width: 40;
border-radius: 20;
border-width: 0;
horizontal-align: left;
}
.username {
color: theme-color(primary);
vertical-align: center;
margin: 0 12;
}
.status-image {
margin: 16;
width: 20;
height: 20;
vertical-align: top;
}
.issue-number {
horizontal-align: right;
vertical-align: top;
margin: 16;
color: #888888;
}
.issue-title {
margin-top: 16;
}
.author {
color: #888888;
font-size: 12;
}
.status-tag {
padding: 2 6;
font-size: 10;
font-weight: bold;
color: white;
margin: 20 16;
border-radius: 2;
border-width: 0;
background-color: rgba(100, 100, 100, 0.3);
horizontal-align: left;
}
.title {
color: white;
margin: 0 16;
font-size: 18;
font-weight: bold;
}
.section-title {
font-size: 14;
color: #888888;
}
.link-btn {
color: theme-color(primary);
}

Просмотреть файл

@ -0,0 +1,13 @@
import { Directive, ElementRef } from "@angular/core";
import { Page } from "ui/page";
@Directive({
selector: "ActionBar"
})
export class ActionBarDirective {
constructor(private page: Page) {
this.page.on("navigatedTo", () => {
page.actionBar.update();
});
}
}

Просмотреть файл

Просмотреть файл

@ -0,0 +1,4 @@
@import '~bootstrap/scss/functions';
@import '~bootstrap/scss/variables';
@import 'app-common';
@import '~nativescript-theme-core/css/core.light.css';

Просмотреть файл

Просмотреть файл

@ -0,0 +1,3 @@
@import 'app-common';
@import '~nativescript-theme-core/css/core.light.css';

Просмотреть файл

@ -0,0 +1,6 @@
// this import should be first in order to load some required settings (like globals and reflect-metadata)
import { platformNativeScript } from 'nativescript-angular/platform-static';
import { AppModuleNgFactory } from './app/app.module.ngfactory';
platformNativeScript().bootstrapModuleFactory(AppModuleNgFactory);

6
nativescript/src/main.ts Normal file
Просмотреть файл

@ -0,0 +1,6 @@
// this import should be first in order to load some required settings (like globals and reflect-metadata)
import { platformNativeScriptDynamic } from 'nativescript-angular/platform';
import { AppModule } from './app/app.module';
platformNativeScriptDynamic().bootstrapModule(AppModule);

Просмотреть файл

@ -0,0 +1,8 @@
{
"android": {
"v8Flags": "--expose_gc"
},
"main": "main.js",
"name": "tns-template-hello-world-ng",
"version": "2.6.0"
}

Просмотреть файл

@ -0,0 +1,18 @@
import { Directive, ElementRef } from "@angular/core";
import { Page } from "ui/page";
import { isAndroid } from "platform";
@Directive({
selector: "SearchBar"
})
export class SearchBarDirective {
constructor(private element: ElementRef, private page: Page) {
this.page.on("navigatedTo", () => {
const bar = this.element.nativeElement;
if (isAndroid) {
bar.android.clearFocus();
}
});
}
}

Просмотреть файл

@ -0,0 +1,15 @@
import { Directive, ElementRef } from "@angular/core";
import { Color } from "color";
@Directive({
selector: "SegmentedBar"
})
export class SegmentedBarDirective {
constructor(private element: ElementRef) {
const bar = element.nativeElement;
if (bar.ios) {
const c = new Color("white");
bar.ios.tintColor = c.ios;
}
}
}

Просмотреть файл

@ -0,0 +1,42 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"app/*": ["app/app/*"],
"~/app/*": ["app/app/*"],
"ui/*": ["node_modules/tns-core-modules/ui/*"],
"platform": ["node_modules/tns-core-modules/platform"],
"image-source": ["node_modules/tns-core-modules/image-source"],
"xml": ["node_modules/tns-core-modules/xml"],
"xhr": ["node_modules/tns-core-modules/xhr"],
"text": ["node_modules/tns-core-modules/text"],
"data": ["node_modules/tns-core-modules/data"],
"fetch": ["node_modules/tns-core-modules/fetch"],
"trace": ["node_modules/tns-core-modules/trace"],
"fps-meter": ["node_modules/tns-core-modules/fps-meter"],
"color": ["node_modules/tns-core-modules/color"],
"application-settings": ["node_modules/tns-core-modules/application-settings"],
"http": ["node_modules/tns-core-modules/http"],
"camera": ["node_modules/tns-core-modules/camera"],
"console": ["node_modules/tns-core-modules/console"],
"timer": ["node_modules/tns-core-modules/timer"],
"utils": ["node_modules/tns-core-modules/utils"],
"location": ["node_modules/tns-core-modules/location"],
"file-system": ["node_modules/tns-core-modules/file-system"],
"application": ["node_modules/tns-core-modules/application"],
"image-asset": ["node_modules/tns-core-modules/image-asset"],
"connectivity": ["node_modules/tns-core-modules/connectivity"],
"globals": ["node_modules/tns-core-modules/globals"]
}
},
"exclude": [
"node_modules",
"platforms",
"src"
],
"angularCompilerOptions": {
"skipMetadataEmit": true,
"genDir": "./"
}
}

Просмотреть файл

@ -0,0 +1,52 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"app/*": [
"app/app/*"
],
"~/app/*": [
"app/app/*"
],
"*": [
"./node_modules/tns-core-modules/*",
"./node_modules/*"
]
},
"target": "es5",
"module": "commonjs",
"declaration": false,
"removeComments": true,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"dom",
"es6",
"es2015.iterable"
],
"pretty": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noImplicitAny": false,
"noImplicitReturns": true,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"typeRoots": [
"node_modules/@types",
"node_modules"
],
"types": [
"jasmine"
]
},
"include": [
"app/**/*"
],
"exclude": [
"node_modules",
"**/*.aot.ts",
"hooks",
"src"
]
}

Просмотреть файл

@ -0,0 +1,195 @@
const { resolve, join } = require("path");
const webpack = require("webpack");
const nsWebpack = require("nativescript-dev-webpack");
const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const { AotPlugin } = require("@ngtools/webpack");
let mainSheet;
module.exports = env => {
const platform = getPlatform(env);
mainSheet = `app.${platform}.css`;
// Default destination inside platforms/<platform>/...
const path = resolve(nsWebpack.getAppPath(platform));
const entry = {
// Discover entry module from package.json
bundle: `./${nsWebpack.getEntryModule()}`,
// Vendor entry with third-party libraries
vendor: `./vendor`,
// Entry for stylesheet with global application styles
[mainSheet]: `./${mainSheet}`,
};
const rules = getRules();
const plugins = getPlugins(platform, env);
const extensions = getExtensions(platform);
return {
context: resolve("./app"),
target: nativescriptTarget,
entry,
output: {
pathinfo: true,
path,
libraryTarget: "commonjs2",
filename: "[name].js",
},
resolve: {
extensions,
// Resolve {N} system modules from tns-core-modules
modules: [
"node_modules/tns-core-modules",
"node_modules",
],
alias: {
'~': resolve("./app")
}
},
node: {
// Disable node shims that conflict with NativeScript
"http": false,
"timers": false,
"setImmediate": false,
"fs": "empty",
},
module: { rules },
plugins,
};
};
function getPlatform(env) {
return env.android ? "android" :
env.ios ? "ios" :
() => { throw new Error("You need to provide a target platform!") };
}
function getRules() {
return [
{
test: /\.html$|\.xml$/,
use: [
"raw-loader",
]
},
// Root stylesheet gets extracted with bundled dependencies
{
test: new RegExp(mainSheet),
use: ExtractTextPlugin.extract([
{
loader: "resolve-url-loader",
options: { silent: true },
},
"nativescript-css-loader",
"nativescript-dev-webpack/platform-css-loader",
]),
},
// Other CSS files get bundled using the raw loader
{
test: /\.css$/,
exclude: new RegExp(mainSheet),
use: [
"raw-loader",
]
},
// SASS support
{
test: /\.scss$/,
use: [
"raw-loader",
"resolve-url-loader",
"sass-loader",
]
},
// Compile TypeScript files with ahead-of-time compiler.
{
test: /\.ts$/,
loaders: [
"nativescript-dev-webpack/tns-aot-loader",
"@ngtools/webpack",
]
}
];
}
function getPlugins(platform, env) {
let plugins = [
new ExtractTextPlugin(mainSheet),
// Vendor libs go to the vendor.js chunk
new webpack.optimize.CommonsChunkPlugin({
name: ["vendor"],
}),
// Define useful constants like TNS_WEBPACK
new webpack.DefinePlugin({
"global.TNS_WEBPACK": "true",
}),
// Copy assets to out dir. Add your own globs as needed.
new CopyWebpackPlugin([
{ from: mainSheet },
{ from: "css/**" },
{ from: "fonts/**" },
{ from: "**/*.jpg" },
{ from: "**/*.png" },
{ from: "**/*.xml" },
{ from: "assets/**" },
], { ignore: ["App_Resources/**"] }),
// Generate a bundle starter script and activate it in package.json
new nsWebpack.GenerateBundleStarterPlugin([
"./vendor",
"./bundle",
]),
// Angular AOT compiler
new AotPlugin({
tsConfigPath: "tsconfig.aot.json",
entryModule: resolve(__dirname, "app/app/app.module#AppModule"),
typeChecking: false
}),
// Resolve .ios.css and .android.css component stylesheets
new nsWebpack.UrlResolvePlugin({platform}),
];
if (env.uglify) {
plugins.push(new webpack.LoaderOptionsPlugin({ minimize: true }));
// Work around an Android issue by setting compress = false
const compress = platform !== "android";
plugins.push(new webpack.optimize.UglifyJsPlugin({
mangle: { except: nsWebpack.uglifyMangleExcludes },
compress,
}));
}
return plugins;
}
// Resolve platform-specific modules like module.android.js
function getExtensions(platform) {
return Object.freeze([
`.${platform}.ts`,
`.${platform}.js`,
".aot.ts",
".ts",
".js",
".css",
`.${platform}.css`,
]);
}

40
nginx/README.md Normal file
Просмотреть файл

@ -0,0 +1,40 @@
# Setting up NGNIX
You will need to complete the following tasks to setup your dockerized proxy server:
1. Include/Create SSL keys
2. Alter your backend upstream
3. Confirm your backend's path
## Include/Create SSL Keys
Have your key and csr in the nginx/keys directory as server.key and server.crt. These are copied into the docker image on build and used to serve your website or proxy your services.
### Generate your own self signed certificate
```bash
openssl req \
-newkey rsa:2048 -nodes -keyout nginx/keys/server.key \
-x509 -out nginx/keys/server.crt
```
This command from your project root will create the keys needed to start docker with self signed certificates. Note that if you are going to deploy this site for production you will want to replace these and rebuild your image with valid (purchased) SSL certificates. All the fields are optional. Do not set any challenge passwords.
If you want validated certificates but are not looking to purchase them; then checkout [Let's Encrypt](https://letsencrypt.org) which is a free SSL certification service.
## Alter your backend upstream
The upstream is a block used to load balance different destinations important to your proxy. In this example the upstream is used to proxy requests to your backend without worrying about XSS configurations.
We have preloaded some examples of what this looks like in the `nginx/conf.d/default.conf` file. You can certainly only specify one server in the block if that is your only server.
## Confirm your backend's path
Assuming your website uses a backend collection of APIs, you can setup your nginx service to reverse proxy to them avoiding any XSS configuration needs. The provided default.conf includes a `/api/` location block to serve as an example. You can replace api in `/api/` with any path you want to have forwarded to your backend.
There is only one setting you need to adjust in this block and that is the `proxy_cookie_domain`. Assuming you have a production domain you would change `meetmaestro.com` to be your domain. If you do not have a production domain it is safe to leave this as is or delete.
## Extending the configuration
You can include more servers or configuration settings by adding any named file in `nginx/conf.d`. These files are automatically consumed by nginx on startup.
[Visit NGINX's beginnner's guide](http://nginx.org/en/docs/beginners_guide.html) for additional help.

46
nginx/conf.d/default.conf Normal file
Просмотреть файл

@ -0,0 +1,46 @@
# This will load balance your backend to one or more destinations.
upstream backend {
# server api1.meetmaestro.com:3000;
# server api1.meetmaestro.com:3001;
# server api2.meetmaestro.com:3000;
server localhost:8080; # This is a circular reference that allows docker to start as the example project, it is not recommended to use this in actual development.
}
server {
listen 443 default_server;
listen [::]:443 default_server;
ssl_certificate /etc/nginx/keys/server.crt;
ssl_certificate_key /etc/nginx/keys/server.key;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_prefer_server_ciphers on;
# Reverse Proxy to Backend (Avoids XSS concerns) --Update api to be whatever your site uses to access your backend
location /api/ {
proxy_pass http://backend;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# IMPORTANT: Update meetmaestro.com to your production site. This will allow cookies to work as expected when using your deployment locally
proxy_cookie_domain localhost meetmaestro.com;
}
# Application
location / {
root /usr/share/nginx/html/;
try_files $uri /index.html;
gzip on;
gzip_types text/css text/javascript application/x-javascript application/json;
}
}

Просмотреть файл

@ -0,0 +1,4 @@
server {
listen *:80;
return 301 https://$host$request_uri;
}

3
nginx/conf.d/misc.conf Normal file
Просмотреть файл

@ -0,0 +1,3 @@
log_format gzip '[$time_local] ' '"$request" $status $bytes_sent';
access_log /dev/stdout;
charset utf-8;

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше