Skip to content

Commit

Permalink
setup
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanWalker committed Jun 6, 2016
1 parent f42073e commit dd9b048
Show file tree
Hide file tree
Showing 9,350 changed files with 748,867 additions and 44 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,9 @@ testem.log
#System Files
.DS_Store
Thumbs.db

nativescript/app/app
nativescript/hooks
nativescript/node_modules
src/app/**/*.js
src/app/**/*.js.map
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.DS_Store": true,
"src/app/**/*.js": true,
"nativescript/platforms": true
}
}
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Render NativeScript views on the web

## Goals

Interop/Reusability between NativeScript and web templates.

## Why

* Ability to statically render a web app from a NativeScript (only) app
* Say you have a NativeScript only mobile app but now want to build a web app based on it's features
* In the future, you could run your views through a compiler which would spit out html equivalents to begin developing your complimentary web app quickly
* Expand platform delivery options for NativeScript apps
* Broaden the horizons for what may be possible with NativeScript views

## Current Status

**Experimental**.

## What's next

* Build out remaning NativeScript components as web components. [See Issues]().
* Ability to render the inverse direction: Statically generate NativeScript view templates from HTML web templates to quickly bring a web app into the NativeScript world.

## Background

https://github.com/NativeScript/NativeScript/issues/1612


3 changes: 2 additions & 1 deletion angular-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ module.exports = function(defaults) {
'es6-shim/es6-shim.js',
'reflect-metadata/*.js',
'rxjs/**/*.js',
'@angular/**/*.js'
'@angular/**/*.js',
'hammerjs/*.js'
]
});
};
13 changes: 13 additions & 0 deletions nativescript/app/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
node_modules
built
tags
typings
.baseDir.ts
.tscache

app/**/*.js
app/**/*.map
platforms
lib

*.tgz
40 changes: 40 additions & 0 deletions nativescript/app/App_Resources/Android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?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">

<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>
15 changes: 15 additions & 0 deletions nativescript/app/App_Resources/Android/app.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Add your native dependencies here:

// Uncomment to add recyclerview-v7 dependency
//dependencies {
// compile 'com.android.support:recyclerview-v7:+'
//}

android {
defaultConfig {
generatedDensities = []
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added nativescript/app/App_Resources/iOS/Default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added nativescript/app/App_Resources/iOS/Icon-Small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions nativescript/app/App_Resources/iOS/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?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>CFBundleIconFile</key>
<string>icon.png</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>icon-40</string>
<string>icon-60</string>
<string>icon-72</string>
<string>icon-76</string>
<string>Icon-Small</string>
<string>Icon-Small-50</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
<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>
5 changes: 5 additions & 0 deletions nativescript/app/App_Resources/iOS/build.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// You can add custom settings here
// for example you can uncomment the following line to force distribution code signing
// CODE_SIGN_IDENTITY = iPhone Distribution
// ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
// ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = Brand Assets;
Binary file added nativescript/app/App_Resources/iOS/icon-40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added nativescript/app/App_Resources/iOS/icon-60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added nativescript/app/App_Resources/iOS/icon-72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added nativescript/app/App_Resources/iOS/icon-76.png
Binary file added nativescript/app/App_Resources/iOS/icon.png
23 changes: 23 additions & 0 deletions nativescript/app/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Copyright (c) 2015, Telerik AD
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19 changes: 19 additions & 0 deletions nativescript/app/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
button, label, stack-layout {
horizontal-align: center;
}

button {
font-size: 36;
}

.title {
font-size: 30;
margin: 20;
}

.message {
font-size: 20;
color: #284848;
text-align: center;
margin: 0 20;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("nativescript-angular/hooks/before-livesync");
11 changes: 11 additions & 0 deletions nativescript/app/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions nativescript/app/main.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions nativescript/app/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// this import should be first in order to load some required settings (like globals and reflect-metadata)
import {nativeScriptBootstrap} from "nativescript-angular/application";
import {NS_ROUTER_PROVIDERS, NS_ROUTER_DIRECTIVES} from "nativescript-angular/router";
import {HTTP_PROVIDERS} from "@angular/http";
import {MagicService} from "nativescript-ng2-magic";
MagicService.ROUTER_DIRECTIVES = NS_ROUTER_DIRECTIVES;

// import your root component here
import {AppComponent} from "./app/";

nativeScriptBootstrap(AppComponent, [NS_ROUTER_PROVIDERS, HTTP_PROVIDERS], { startPageActionBarHidden: false });
57 changes: 57 additions & 0 deletions nativescript/app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"nativescript": {
"id": "org.nativescript.helloworldng"
},
"name": "tns-template-hello-world-ng",
"main": "main.js",
"version": "2.0.3",
"author": {
"name": "Telerik",
"email": "[email protected]"
},
"description": "Nativescript Angular Hello World template",
"license": "BSD",
"keywords": [
"telerik",
"mobile",
"angular",
"nativescript",
"{N}",
"tns",
"appbuilder",
"template"
],
"repository": {
"type": "git",
"url": "git://github.com/NativeScript/template-hello-world-ng.git"
},
"homepage": "https://github.com/NativeScript/template-hello-world-ng",
"android": {
"v8Flags": "--expose_gc"
},
"dependencies": {
"@angular/common": "2.0.0-rc.1",
"@angular/compiler": "2.0.0-rc.1",
"@angular/core": "2.0.0-rc.1",
"@angular/http": "2.0.0-rc.1",
"@angular/platform-browser": "2.0.0-rc.1",
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
"@angular/platform-server": "2.0.0-rc.1",
"@angular/router": "2.0.0-rc.1",
"@angular/router-deprecated": "2.0.0-rc.1",
"nativescript-angular": "0.1.1",
"tns-core-modules": "^2.0.0"
},
"devDependencies": {
"nativescript-dev-typescript": "^0.3.2"
},
"gitHead": "2206d64e5e60191ff43a7d8f03d8aeded4ad3302",
"bugs": {
"url": "https://github.com/NativeScript/template-hello-world-ng/issues"
},
"readme": "ERROR: No README data found!",
"_id": "[email protected]",
"_shasum": "8fd2358289acbb78cc510f8fb22d44cdae68d1c1",
"_from": "git+https://github.com/NativeScript/template-hello-world-ng.git",
"_resolved": "git+https://github.com/NativeScript/template-hello-world-ng.git#2206d64e5e60191ff43a7d8f03d8aeded4ad3302"
}
39 changes: 39 additions & 0 deletions nativescript/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.nativescript",
"tns-ios": {
"version": "2.0.1"
},
"tns-android": {
"version": "2.0.0"
}
},
"dependencies": {
"@angular/common": "2.0.0-rc.1",
"@angular/compiler": "2.0.0-rc.1",
"@angular/core": "2.0.0-rc.1",
"@angular/http": "2.0.0-rc.1",
"@angular/platform-browser": "2.0.0-rc.1",
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
"@angular/platform-server": "2.0.0-rc.1",
"@angular/router": "2.0.0-rc.1",
"@angular/router-deprecated": "2.0.0-rc.1",
"nativescript-angular": "0.1.1",
"nativescript-ng2-magic": "^1.5.7",
"tns-core-modules": "^2.0.0"
},
"devDependencies": {
"babel-traverse": "6.9.0",
"babel-types": "6.9.0",
"babylon": "6.8.0",
"filewalker": "0.1.2",
"lazy": "1.0.11",
"nativescript-dev-sass": "^0.1.0",
"nativescript-dev-typescript": "^0.3.2",
"typescript": "^1.8.10"
}
}
Loading

0 comments on commit dd9b048

Please sign in to comment.