First commit for the project
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"directory": "www/lib"
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
# http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
insert_final_newline = false
|
||||
trim_trailing_whitespace = false
|
|
@ -0,0 +1,18 @@
|
|||
# Specifies intentionally untracked files to ignore when using Git
|
||||
# http://git-scm.com/docs/gitignore
|
||||
|
||||
node_modules/
|
||||
platforms/
|
||||
plugins/
|
||||
|
||||
.vscode/
|
||||
.vs/
|
||||
typings/
|
||||
www/js/
|
||||
www/css/
|
||||
www/lib/
|
||||
|
||||
bld/
|
||||
bin/
|
||||
*.user
|
||||
*.suo
|
|
@ -0,0 +1,79 @@
|
|||
# Ionic Blank Template
|
||||
|
||||
An application using Apache Cordova, Ionic Framework, and Typescript. Currently supporting iOS, Android and Windows 10.
|
||||
|
||||
## Important!
|
||||
To learn more about Tools for Apache Cordova, visit this [link](https://taco.visualstudio.com/).
|
||||
|
||||
## Table of Contents
|
||||
- [Requirements](#requirements)
|
||||
- [Getting Started](#getting-started)
|
||||
- [File Structure of App](#file-structure-of-app)
|
||||
|
||||
## Requirements
|
||||
1. node.js
|
||||
2. Cordova and Ionic - [sudo] npm install -g cordova ionic
|
||||
3. TypeScript - [sudo] npm install -g typescript
|
||||
4. Gulp - [sudo] npm install -g gulp
|
||||
5. Bower - [sudo] npm install -g bower
|
||||
|
||||
## Getting Started
|
||||
|
||||
With VS Code:
|
||||
* Clone this repository.
|
||||
* Run `npm install` from the project root.
|
||||
* Add android / iOS / windows platform to your project by running `ionic platform add <platform name>` in a terminal from your project root.
|
||||
* Build the project by running gulp tsc and then `ionic build <platform name>`
|
||||
* Deploy to device or emulator by running `ionic run <platform name>` or `ionic emulate <platform name>`
|
||||
* Success
|
||||
|
||||
With Visual Studio:
|
||||
* Clone this repository.
|
||||
* Open the ionic-typescript-blank.sln in Visual Studio.
|
||||
* Install npm packages by going to your Solution Explorer -> Dependencies -> npm and clicking on 'Restore Packages'.
|
||||
* Once packages are restored, build the project and deploy it on an android emulator.
|
||||
* Success
|
||||
|
||||
|
||||
## File Structure of App
|
||||
|
||||
```
|
||||
ionic-typescript-blank/
|
||||
├── app/ * Working directory for TypeScript files
|
||||
│ └── app.ts * Main Application configuration
|
||||
│
|
||||
├── node_modules/ * Node dependencies
|
||||
|
|
||||
├── platforms/ * Cordova generated native platform code
|
||||
|
|
||||
├── plugins/ * Cordova native plugins go
|
||||
|
|
||||
├── resources/ * Images for splash screens and icons
|
||||
|
|
||||
├── typings/ * Contains all typings for this project
|
||||
|
|
||||
├── www/ * Folder that is copied over to platforms www directory
|
||||
│ │
|
||||
│ ├── js/ * Contains transpiled JS files from TS files
|
||||
│ │ └── app.js
|
||||
│ │
|
||||
│ ├── css/ * Compiled CSS
|
||||
│ │
|
||||
│ ├── img/ * App images
|
||||
│ │
|
||||
│ ├── lib/ * Dependencies from bower install
|
||||
│ │
|
||||
│ └── index.html * Main entry point
|
||||
|
|
||||
├── .editorconfig * Defines coding styles between editors
|
||||
├── .gitignore * Example git ignore file
|
||||
├── config.xml * Cordova configuration file
|
||||
├── gulpfile.js * Contains gulp tasks for compiling ts files, scss files and more..
|
||||
├── ionic.project * Ionic configuration file
|
||||
├── package.json * Our javascript dependencies
|
||||
├── ionic-typescript-blank.sln * VS solution
|
||||
├── ionic-typescript-blank.jsproj
|
||||
├── ionic-typescript-blank.jsproj.user
|
||||
└── README.md * This file
|
||||
```
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
/// <reference path="../typings/browser.d.ts" />
|
||||
|
||||
// Ionic Starter App
|
||||
// angular.module is a global place for creating, registering and retrieving Angular modules
|
||||
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
|
||||
// the 2nd parameter is an array of 'requires'
|
||||
// 'starter.controllers' is found in controllers.js
|
||||
angular.module('starter', ['ionic'])
|
||||
|
||||
.run(function($ionicPlatform: ionic.platform.IonicPlatformService) {
|
||||
$ionicPlatform.ready(() => {
|
||||
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
|
||||
// for form inputs)
|
||||
if (cordova.platformId === 'ios' && window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
|
||||
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
|
||||
cordova.plugins.Keyboard.disableScroll(true);
|
||||
}
|
||||
if (window.StatusBar) {
|
||||
// org.apache.cordova.statusbar required
|
||||
window.StatusBar.styleLightContent();
|
||||
}
|
||||
});
|
||||
})
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"name": "ionic-ts-blank",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"ionic": "driftyco/ionic-bower#1.3.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<widget id="com.ionicframework.ionictssidemenu381282" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<name>ionic-ts-blank</name>
|
||||
<description>
|
||||
An Ionic Framework and Cordova project.
|
||||
</description>
|
||||
<author email="you@example.com" href="http://example.com.com/">
|
||||
Your Name Here
|
||||
</author>
|
||||
<content src="index.html" />
|
||||
<access origin="*" />
|
||||
<preference name="webviewbounce" value="false" />
|
||||
<preference name="UIWebViewBounce" value="false" />
|
||||
<preference name="DisallowOverscroll" value="true" />
|
||||
<preference name="android-minSdkVersion" value="16" />
|
||||
<preference name="BackupWebStorage" value="none" />
|
||||
<preference name="SplashScreen" value="screen" />
|
||||
<preference name="SplashScreenDelay" value="3000" />
|
||||
<preference name="windows-target-version" value="10.0" />
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" onload="true" value="CDVStatusBar" />
|
||||
</feature>
|
||||
<plugin name="cordova-plugin-device" spec="~1.1.2" />
|
||||
<plugin name="cordova-plugin-console" spec="~1.0.3" />
|
||||
<plugin name="cordova-plugin-whitelist" spec="~1.2.2" />
|
||||
<plugin name="cordova-plugin-splashscreen" spec="~3.1.0" />
|
||||
<plugin name="cordova-plugin-statusbar" spec="~2.1.3" />
|
||||
<plugin name="ionic-plugin-keyboard" spec="~2.1.0" />
|
||||
<platform name="android">
|
||||
<icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi" />
|
||||
<icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi" />
|
||||
<icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi" />
|
||||
<icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi" />
|
||||
<icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi" />
|
||||
<icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi" />
|
||||
<splash src="resources/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi" />
|
||||
<splash src="resources/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi" />
|
||||
<splash src="resources/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi" />
|
||||
<splash src="resources/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi" />
|
||||
<splash src="resources/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi" />
|
||||
<splash src="resources/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi" />
|
||||
<splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi" />
|
||||
<splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi" />
|
||||
<splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi" />
|
||||
<splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi" />
|
||||
<splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi" />
|
||||
<splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi" />
|
||||
</platform>
|
||||
<platform name="ios">
|
||||
<icon src="resources/ios/icon/icon.png" width="57" height="57" />
|
||||
<icon src="resources/ios/icon/icon@2x.png" width="114" height="114" />
|
||||
<icon src="resources/ios/icon/icon-40.png" width="40" height="40" />
|
||||
<icon src="resources/ios/icon/icon-40@2x.png" width="80" height="80" />
|
||||
<icon src="resources/ios/icon/icon-50.png" width="50" height="50" />
|
||||
<icon src="resources/ios/icon/icon-50@2x.png" width="100" height="100" />
|
||||
<icon src="resources/ios/icon/icon-60.png" width="60" height="60" />
|
||||
<icon src="resources/ios/icon/icon-60@2x.png" width="120" height="120" />
|
||||
<icon src="resources/ios/icon/icon-60@3x.png" width="180" height="180" />
|
||||
<icon src="resources/ios/icon/icon-72.png" width="72" height="72" />
|
||||
<icon src="resources/ios/icon/icon-72@2x.png" width="144" height="144" />
|
||||
<icon src="resources/ios/icon/icon-76.png" width="76" height="76" />
|
||||
<icon src="resources/ios/icon/icon-76@2x.png" width="152" height="152" />
|
||||
<icon src="resources/ios/icon/icon-small.png" width="29" height="29" />
|
||||
<icon src="resources/ios/icon/icon-small@2x.png" width="58" height="58" />
|
||||
<icon src="resources/ios/icon/icon-small@3x.png" width="87" height="87" />
|
||||
<splash src="resources/ios/splash/Default-568h@2x~iphone.png" height="1136" width="640" />
|
||||
<splash src="resources/ios/splash/Default-667h.png" height="1334" width="750" />
|
||||
<splash src="resources/ios/splash/Default-736h.png" height="2208" width="1242" />
|
||||
<splash src="resources/ios/splash/Default-Landscape-736h.png" height="1242" width="2208" />
|
||||
<splash src="resources/ios/splash/Default-Landscape@2x~ipad.png" height="1536" width="2048" />
|
||||
<splash src="resources/ios/splash/Default-Landscape~ipad.png" height="768" width="1024" />
|
||||
<splash src="resources/ios/splash/Default-Portrait@2x~ipad.png" height="2048" width="1536" />
|
||||
<splash src="resources/ios/splash/Default-Portrait~ipad.png" height="1024" width="768" />
|
||||
<splash src="resources/ios/splash/Default@2x~iphone.png" height="960" width="640" />
|
||||
<splash src="resources/ios/splash/Default~iphone.png" height="480" width="320" />
|
||||
</platform>
|
||||
<platform name="windows">
|
||||
<icon src="resources/windows/icon/Square150x150Logo.scale-100.png" width="150" height="150" />
|
||||
<icon src="resources/windows/icon/Square150x150Logo.scale-240.png" width="360" height="360" />
|
||||
<icon src="resources/windows/icon/Square30x30Logo.scale-100.png" width="30" height="30" />
|
||||
<icon src="resources/windows/icon/Square310x310Logo.scale-100.png" width="310" height="310" />
|
||||
<icon src="resources/windows/icon/Square44x44Logo.scale-100.png" width="44" height="44" />
|
||||
<icon src="resources/windows/icon/Square44x44Logo.scale-240.png" width="106" height="106" />
|
||||
<icon src="resources/windows/icon/Square70x70Logo.scale-100.png" width="70" height="70" />
|
||||
<icon src="resources/windows/icon/Square71x71Logo.scale-100.png" width="71" height="71" />
|
||||
<icon src="resources/windows/icon/Square71x71Logo.scale-240.png" width="170" height="170" />
|
||||
<icon src="resources/windows/icon/StoreLogo.scale-100.png" width="50" height="50" />
|
||||
<icon src="resources/windows/icon/StoreLogo.scale-240.png" width="120" height="120" />
|
||||
<icon src="resources/windows/icon/Wide310x150Logo.scale-100.png" width="310" height="150" />
|
||||
<icon src="resources/windows/icon/Wide310x150Logo.scale-240.png" width="744" height="360" />
|
||||
<splash src="resources/windows/splash/SplashScreen.scale-100.png" width="620" height="300" />
|
||||
<splash src="resources/windows/splash/SplashScreen.scale-240.png" width="1152" height="1920" />
|
||||
<splash src="resources/windows/splash/SplashScreenPhone.scale-240.png" width="1152" height="1920" />
|
||||
</platform>
|
||||
<platform name="wp8">
|
||||
<icon src="resources/wp8/icon/ApplicationIcon.png" width="99" height="99" />
|
||||
<icon src="resources/wp8/icon/Background.png" width="159" height="159" />
|
||||
<splash src="resources/wp8/splash/SplashScreenImage.png" width="768" height="1280" />
|
||||
</platform>
|
||||
</widget>
|
|
@ -0,0 +1,63 @@
|
|||
var gulp = require('gulp');
|
||||
var gutil = require('gulp-util');
|
||||
var bower = require('bower');
|
||||
var concat = require('gulp-concat');
|
||||
var sass = require('gulp-sass');
|
||||
var minifyCss = require('gulp-minify-css');
|
||||
var rename = require('gulp-rename');
|
||||
var sh = require('shelljs');
|
||||
|
||||
var paths = {
|
||||
sass: ['./scss/**/*.scss'],
|
||||
tsc: ['./app/**/*.ts']
|
||||
};
|
||||
|
||||
gulp.task('default', ['sass','tsc']);
|
||||
|
||||
gulp.task('sass', function(done) {
|
||||
gulp.src('./scss/ionic.app.scss')
|
||||
.pipe(sass())
|
||||
.on('error', sass.logError)
|
||||
.pipe(gulp.dest('./www/css/'))
|
||||
.pipe(minifyCss({
|
||||
keepSpecialComments: 0
|
||||
}))
|
||||
.pipe(rename({ extname: '.min.css' }))
|
||||
.pipe(gulp.dest('./www/css/'))
|
||||
.on('end', done);
|
||||
});
|
||||
|
||||
// Run gulp watch in conjunction with Ionic serve to
|
||||
// reflect live changes to TypeScript files in app directory
|
||||
gulp.task('watch', function() {
|
||||
gulp.watch(paths.sass, ['sass']);
|
||||
gulp.watch(paths.tsc, ['tsc']);
|
||||
});
|
||||
|
||||
// Run gulp tsc to transpile your TypeScript files from
|
||||
// app directory to www/js directory
|
||||
gulp.task('tsc', function() {
|
||||
var sourcemaps = require("gulp-sourcemaps");
|
||||
var ts = require('gulp-typescript');
|
||||
var tsProject = ts.createProject('tsconfig.json');
|
||||
return tsProject
|
||||
.src('app')
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(ts(tsProject))
|
||||
.js
|
||||
.pipe(sourcemaps.write('./',
|
||||
{
|
||||
includeContent:true,
|
||||
sourceRoot: function(file) {
|
||||
return file.cwd + '\\js';
|
||||
}
|
||||
}))
|
||||
.pipe(gulp.dest('www/js/'));
|
||||
});
|
||||
|
||||
gulp.task('install', ['git-check'], function() {
|
||||
return bower.commands.install()
|
||||
.on('log', function(data) {
|
||||
gutil.log('bower', gutil.colors.cyan(data.id), data.message);
|
||||
});
|
||||
});
|
|
@ -0,0 +1,83 @@
|
|||
<!--
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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.
|
||||
#
|
||||
-->
|
||||
# Cordova Hooks
|
||||
|
||||
This directory may contain scripts used to customize cordova commands. This
|
||||
directory used to exist at `.cordova/hooks`, but has now been moved to the
|
||||
project root. Any scripts you add to these directories will be executed before
|
||||
and after the commands corresponding to the directory name. Useful for
|
||||
integrating your own build systems or integrating with version control systems.
|
||||
|
||||
__Remember__: Make your scripts executable.
|
||||
|
||||
## Hook Directories
|
||||
The following subdirectories will be used for hooks:
|
||||
|
||||
after_build/
|
||||
after_compile/
|
||||
after_docs/
|
||||
after_emulate/
|
||||
after_platform_add/
|
||||
after_platform_rm/
|
||||
after_platform_ls/
|
||||
after_plugin_add/
|
||||
after_plugin_ls/
|
||||
after_plugin_rm/
|
||||
after_plugin_search/
|
||||
after_prepare/
|
||||
after_run/
|
||||
after_serve/
|
||||
before_build/
|
||||
before_compile/
|
||||
before_docs/
|
||||
before_emulate/
|
||||
before_platform_add/
|
||||
before_platform_rm/
|
||||
before_platform_ls/
|
||||
before_plugin_add/
|
||||
before_plugin_ls/
|
||||
before_plugin_rm/
|
||||
before_plugin_search/
|
||||
before_prepare/
|
||||
before_run/
|
||||
before_serve/
|
||||
pre_package/ <-- Windows 8 and Windows Phone only.
|
||||
|
||||
## Script Interface
|
||||
|
||||
All scripts are run from the project's root directory and have the root directory passes as the first argument. All other options are passed to the script using environment variables:
|
||||
|
||||
* CORDOVA_VERSION - The version of the Cordova-CLI.
|
||||
* CORDOVA_PLATFORMS - Comma separated list of platforms that the command applies to (e.g.: android, ios).
|
||||
* CORDOVA_PLUGINS - Comma separated list of plugin IDs that the command applies to (e.g.: org.apache.cordova.file, org.apache.cordova.file-transfer)
|
||||
* CORDOVA_HOOK - Path to the hook that is being executed.
|
||||
* CORDOVA_CMDLINE - The exact command-line arguments passed to cordova (e.g.: cordova run ios --emulate)
|
||||
|
||||
If a script returns a non-zero exit code, then the parent cordova command will be aborted.
|
||||
|
||||
|
||||
## Writing hooks
|
||||
|
||||
We highly recommend writting your hooks using Node.js so that they are
|
||||
cross-platform. Some good examples are shown here:
|
||||
|
||||
[http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/](http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/)
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
// Add Platform Class
|
||||
// v1.0
|
||||
// Automatically adds the platform class to the body tag
|
||||
// after the `prepare` command. By placing the platform CSS classes
|
||||
// directly in the HTML built for the platform, it speeds up
|
||||
// rendering the correct layout/style for the specific platform
|
||||
// instead of waiting for the JS to figure out the correct classes.
|
||||
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
var rootdir = process.argv[2];
|
||||
|
||||
function addPlatformBodyTag(indexPath, platform) {
|
||||
// add the platform class to the body tag
|
||||
try {
|
||||
var platformClass = 'platform-' + platform;
|
||||
var cordovaClass = 'platform-cordova platform-webview';
|
||||
|
||||
var html = fs.readFileSync(indexPath, 'utf8');
|
||||
|
||||
var bodyTag = findBodyTag(html);
|
||||
if(!bodyTag) return; // no opening body tag, something's wrong
|
||||
|
||||
if(bodyTag.indexOf(platformClass) > -1) return; // already added
|
||||
|
||||
var newBodyTag = bodyTag;
|
||||
|
||||
var classAttr = findClassAttr(bodyTag);
|
||||
if(classAttr) {
|
||||
// body tag has existing class attribute, add the classname
|
||||
var endingQuote = classAttr.substring(classAttr.length-1);
|
||||
var newClassAttr = classAttr.substring(0, classAttr.length-1);
|
||||
newClassAttr += ' ' + platformClass + ' ' + cordovaClass + endingQuote;
|
||||
newBodyTag = bodyTag.replace(classAttr, newClassAttr);
|
||||
|
||||
} else {
|
||||
// add class attribute to the body tag
|
||||
newBodyTag = bodyTag.replace('>', ' class="' + platformClass + ' ' + cordovaClass + '">');
|
||||
}
|
||||
|
||||
html = html.replace(bodyTag, newBodyTag);
|
||||
|
||||
fs.writeFileSync(indexPath, html, 'utf8');
|
||||
|
||||
process.stdout.write('add to body class: ' + platformClass + '\n');
|
||||
} catch(e) {
|
||||
process.stdout.write(e);
|
||||
}
|
||||
}
|
||||
|
||||
function findBodyTag(html) {
|
||||
// get the body tag
|
||||
try{
|
||||
return html.match(/<body(?=[\s>])(.*?)>/gi)[0];
|
||||
}catch(e){}
|
||||
}
|
||||
|
||||
function findClassAttr(bodyTag) {
|
||||
// get the body tag's class attribute
|
||||
try{
|
||||
return bodyTag.match(/ class=["|'](.*?)["|']/gi)[0];
|
||||
}catch(e){}
|
||||
}
|
||||
|
||||
if (rootdir) {
|
||||
|
||||
// go through each of the platform directories that have been prepared
|
||||
var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);
|
||||
|
||||
for(var x=0; x<platforms.length; x++) {
|
||||
// open up the index.html file at the www root
|
||||
try {
|
||||
var platform = platforms[x].trim().toLowerCase();
|
||||
var indexPath;
|
||||
|
||||
if(platform == 'android') {
|
||||
indexPath = path.join('platforms', platform, 'assets', 'www', 'index.html');
|
||||
} else {
|
||||
indexPath = path.join('platforms', platform, 'www', 'index.html');
|
||||
}
|
||||
|
||||
if(fs.existsSync(indexPath)) {
|
||||
addPlatformBodyTag(indexPath, platform);
|
||||
}
|
||||
|
||||
} catch(e) {
|
||||
process.stdout.write(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props')" />
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Android">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Android</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|iOS">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>iOS</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Windows-AnyCPU">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Windows-AnyCPU</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Windows-x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Windows-x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Windows-x86">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Windows-x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Windows-ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Windows-ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Windows Phone 8">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Windows Phone 8</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Windows Phone (Universal)">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Windows Phone (Universal)</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Android">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Android</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|iOS">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>iOS</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Windows-AnyCPU">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Windows-AnyCPU</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Windows-x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Windows-x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Windows-x86">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Windows-x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Windows-ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Windows-ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Windows Phone 8">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Windows Phone 8</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Windows Phone (Universal)">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Windows Phone (Universal)</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{4a0dddb5-7a95-4fbf-97cc-616d07737a77}" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>e6750f91-a296-4943-a6ea-e7f35927619c</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0'">
|
||||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TypeScriptCompileOnSaveEnabled>false</TypeScriptCompileOnSaveEnabled>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\ApacheCordovaTools\vs-mda-targets\Microsoft.TypeScript.MDA.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets" />
|
||||
<PropertyGroup>
|
||||
<ProjectUISubcaption>Tools for Apache Cordova</ProjectUISubcaption>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetPlatformIdentifier>MDD</TargetPlatformIdentifier>
|
||||
</PropertyGroup>
|
||||
<Target Name="EnsureBuildPrerequisites">
|
||||
<!-- These errors will trigger if building from inside Visual Studio and requirements could not be determined -->
|
||||
<Error Condition="$(MDAPropertiesEvaluated) == 'true' And $(NodeJsDir) == ''" Text="Path to NodeJs could not be determined. Please check that NodeJs has been installed." />
|
||||
<Error Condition="$(MDAPropertiesEvaluated) == 'true' And $(MDAVsixDir) == ''" Text="Path to the Visual Studio Extension for Tools for Apache Cordova could not be determined. Please check that the extension has been installed." />
|
||||
<!-- These errors will trigger if building from outside Visual Studio (e.g. command line) and environment variables have not been set -->
|
||||
<Error Condition="$(MDAPropertiesEvaluated) == '' And $(NodeJsDir) == ''" Text="Path to NodeJs has not been specified. Please check that NodeJs has been installed and set the NodeJsDir environment variable before building." />
|
||||
<Error Condition="$(MDAPropertiesEvaluated) == '' And $(MDAVsixDir) == ''" Text="Path to Visual Studio Extension for Tools for Apache Cordova has not been specified. Please install it and set the MDAVsixDir environment variable before building." />
|
||||
<!-- Sanity check that things exist in the specified places. These are more likely to fail if building outside Visual Studio and the required environment variables have not been set, or set incorrectly. -->
|
||||
<Error Condition="!Exists('$(NodeJsDir)') Or !Exists('$(NodeJsDir)\node.exe')" Text="The specified NodeJs directory $(NodeJsDir) either does not exist, or does not contain node.exe. Please check that NodeJs has been installed, and set the NodeJsDir variable to the correct directory." />
|
||||
<Error Condition="!Exists('$(MDAVsixDir)') Or !Exists('$(MDAVsixDir)\packages\vs-tac')" Text="The specified directory to the Visual Studio extension $(MDAVsixDir)\node.exe either does not exist, or does not contain a packages\vs-tac sub-directory. Please check that the extension directory exists and set the MDAVsixDir variable to the correct directory." />
|
||||
<!-- Installs (if necessary) the supporting Nodejs module -->
|
||||
<Exec Command=""$(MDAVsixDir)"\packages\vs-tac\install "$(NodeJsDir)" "$(MDAVsixDir)"\packages\vs-tac" />
|
||||
</Target>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Import Project="_apacheCordovaProjectSourceItems.Targets" Condition="Exists('_apacheCordovaProjectSourceItems.Targets')" />
|
||||
</Project>
|
|
@ -0,0 +1,80 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25123.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "ionic-typescript-blank", "ionic-typescript-blank.jsproj", "{E6750F91-A296-4943-A6EA-E7F35927619C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Android = Debug|Android
|
||||
Debug|iOS = Debug|iOS
|
||||
Debug|Windows Phone (Universal) = Debug|Windows Phone (Universal)
|
||||
Debug|Windows Phone 8 = Debug|Windows Phone 8
|
||||
Debug|Windows-AnyCPU = Debug|Windows-AnyCPU
|
||||
Debug|Windows-ARM = Debug|Windows-ARM
|
||||
Debug|Windows-x64 = Debug|Windows-x64
|
||||
Debug|Windows-x86 = Debug|Windows-x86
|
||||
Release|Android = Release|Android
|
||||
Release|iOS = Release|iOS
|
||||
Release|Windows Phone (Universal) = Release|Windows Phone (Universal)
|
||||
Release|Windows Phone 8 = Release|Windows Phone 8
|
||||
Release|Windows-AnyCPU = Release|Windows-AnyCPU
|
||||
Release|Windows-ARM = Release|Windows-ARM
|
||||
Release|Windows-x64 = Release|Windows-x64
|
||||
Release|Windows-x86 = Release|Windows-x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Android.ActiveCfg = Debug|Android
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Android.Build.0 = Debug|Android
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Android.Deploy.0 = Debug|Android
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|iOS.ActiveCfg = Debug|iOS
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|iOS.Build.0 = Debug|iOS
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|iOS.Deploy.0 = Debug|iOS
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows Phone (Universal).ActiveCfg = Debug|Windows Phone (Universal)
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows Phone (Universal).Build.0 = Debug|Windows Phone (Universal)
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows Phone (Universal).Deploy.0 = Debug|Windows Phone (Universal)
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows Phone 8.ActiveCfg = Debug|Windows Phone 8
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows Phone 8.Build.0 = Debug|Windows Phone 8
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows Phone 8.Deploy.0 = Debug|Windows Phone 8
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows-AnyCPU.ActiveCfg = Debug|Windows-AnyCPU
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows-AnyCPU.Build.0 = Debug|Windows-AnyCPU
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows-AnyCPU.Deploy.0 = Debug|Windows-AnyCPU
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows-ARM.ActiveCfg = Debug|Windows-ARM
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows-ARM.Build.0 = Debug|Windows-ARM
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows-ARM.Deploy.0 = Debug|Windows-ARM
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows-x64.ActiveCfg = Debug|Windows-x64
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows-x64.Build.0 = Debug|Windows-x64
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows-x64.Deploy.0 = Debug|Windows-x64
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows-x86.ActiveCfg = Debug|Windows-x86
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows-x86.Build.0 = Debug|Windows-x86
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Debug|Windows-x86.Deploy.0 = Debug|Windows-x86
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Android.ActiveCfg = Release|Android
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Android.Build.0 = Release|Android
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Android.Deploy.0 = Release|Android
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|iOS.ActiveCfg = Release|iOS
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|iOS.Build.0 = Release|iOS
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|iOS.Deploy.0 = Release|iOS
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows Phone (Universal).ActiveCfg = Release|Windows Phone (Universal)
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows Phone (Universal).Build.0 = Release|Windows Phone (Universal)
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows Phone (Universal).Deploy.0 = Release|Windows Phone (Universal)
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows Phone 8.ActiveCfg = Release|Windows Phone 8
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows Phone 8.Build.0 = Release|Windows Phone 8
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows Phone 8.Deploy.0 = Release|Windows Phone 8
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows-AnyCPU.ActiveCfg = Release|Windows-AnyCPU
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows-AnyCPU.Build.0 = Release|Windows-AnyCPU
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows-AnyCPU.Deploy.0 = Release|Windows-AnyCPU
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows-ARM.ActiveCfg = Release|Windows-ARM
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows-ARM.Build.0 = Release|Windows-ARM
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows-ARM.Deploy.0 = Release|Windows-ARM
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows-x64.ActiveCfg = Release|Windows-x64
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows-x64.Build.0 = Release|Windows-x64
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows-x64.Deploy.0 = Release|Windows-x64
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows-x86.ActiveCfg = Release|Windows-x86
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows-x86.Build.0 = Release|Windows-x86
|
||||
{E6750F91-A296-4943-A6EA-E7F35927619C}.Release|Windows-x86.Deploy.0 = Release|Windows-x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "ionic-ts-blank",
|
||||
"app_id": ""
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"name": "ionic-ts-blank",
|
||||
"app_id": "",
|
||||
"gulpStartupTasks": [
|
||||
"sass",
|
||||
"watch"
|
||||
]
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
{}
|
|
@ -0,0 +1,30 @@
|
|||
// Polyfill for Function.prototype.bind() support on Android 2.3
|
||||
(function () {
|
||||
if (!Function.prototype.bind) {
|
||||
Function.prototype.bind = function (thisValue) {
|
||||
if (typeof this !== "function") {
|
||||
throw new TypeError(this + " cannot be bound as it is not a function");
|
||||
}
|
||||
|
||||
// bind() also permits prepending arguments to the call
|
||||
var preArgs = Array.prototype.slice.call(arguments, 1);
|
||||
|
||||
// The actual function to bind the "this" value and arguments to
|
||||
var functionToBind = this;
|
||||
var noOpFunction = function () { };
|
||||
|
||||
// The "this" argument to use
|
||||
var thisArg = this instanceof noOpFunction && thisValue ? this : thisValue;
|
||||
|
||||
// The resulting bound function
|
||||
var boundFunction = function () {
|
||||
return functionToBind.apply(thisArg, preArgs.concat(Array.prototype.slice.call(arguments)));
|
||||
};
|
||||
|
||||
noOpFunction.prototype = this.prototype;
|
||||
boundFunction.prototype = new noOpFunction();
|
||||
|
||||
return boundFunction;
|
||||
};
|
||||
}
|
||||
}());
|
|
@ -0,0 +1,10 @@
|
|||
(function () {
|
||||
// Append the bind() polyfill
|
||||
var scriptElem = document.createElement('script');
|
||||
scriptElem.setAttribute('src', 'scripts/android2.3-jscompat.js');
|
||||
if (document.body) {
|
||||
document.body.appendChild(scriptElem);
|
||||
} else {
|
||||
document.head.appendChild(scriptElem);
|
||||
}
|
||||
}());
|
|
@ -0,0 +1,10 @@
|
|||
(function () {
|
||||
// Append the safeHTML polyfill
|
||||
var scriptElem = document.createElement('script');
|
||||
scriptElem.setAttribute('src', 'scripts/winstore-jscompat.js');
|
||||
if (document.body) {
|
||||
document.body.appendChild(scriptElem);
|
||||
} else {
|
||||
document.head.appendChild(scriptElem);
|
||||
}
|
||||
}());
|
|
@ -0,0 +1,176 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0.
|
||||
// See http://www.apache.org/licenses/LICENSE-2.0.html.
|
||||
// JavaScript Dynamic Content shim for Windows Store apps
|
||||
(function () {
|
||||
|
||||
if (window.MSApp && MSApp.execUnsafeLocalFunction) {
|
||||
|
||||
// Some nodes will have an "attributes" property which shadows the Node.prototype.attributes property
|
||||
// and means we don't actually see the attributes of the Node (interestingly the VS debug console
|
||||
// appears to suffer from the same issue).
|
||||
//
|
||||
var Element_setAttribute = Object.getOwnPropertyDescriptor(Element.prototype, "setAttribute").value;
|
||||
var Element_removeAttribute = Object.getOwnPropertyDescriptor(Element.prototype, "removeAttribute").value;
|
||||
var HTMLElement_insertAdjacentHTMLPropertyDescriptor = Object.getOwnPropertyDescriptor(HTMLElement.prototype, "insertAdjacentHTML");
|
||||
var Node_get_attributes = Object.getOwnPropertyDescriptor(Node.prototype, "attributes").get;
|
||||
var Node_get_childNodes = Object.getOwnPropertyDescriptor(Node.prototype, "childNodes").get;
|
||||
var detectionDiv = document.createElement("div");
|
||||
|
||||
function getAttributes(element) {
|
||||
return Node_get_attributes.call(element);
|
||||
}
|
||||
|
||||
function setAttribute(element, attribute, value) {
|
||||
try {
|
||||
Element_setAttribute.call(element, attribute, value);
|
||||
} catch (e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
function removeAttribute(element, attribute) {
|
||||
Element_removeAttribute.call(element, attribute);
|
||||
}
|
||||
|
||||
function childNodes(element) {
|
||||
return Node_get_childNodes.call(element);
|
||||
}
|
||||
|
||||
function empty(element) {
|
||||
while (element.childNodes.length) {
|
||||
element.removeChild(element.lastChild);
|
||||
}
|
||||
}
|
||||
|
||||
function insertAdjacentHTML(element, position, html) {
|
||||
HTMLElement_insertAdjacentHTMLPropertyDescriptor.value.call(element, position, html);
|
||||
}
|
||||
|
||||
function inUnsafeMode() {
|
||||
var isUnsafe = true;
|
||||
try {
|
||||
detectionDiv.innerHTML = "<test/>";
|
||||
}
|
||||
catch (ex) {
|
||||
isUnsafe = false;
|
||||
}
|
||||
|
||||
return isUnsafe;
|
||||
}
|
||||
|
||||
function cleanse(html, targetElement) {
|
||||
var cleaner = document.implementation.createHTMLDocument("cleaner");
|
||||
empty(cleaner.documentElement);
|
||||
MSApp.execUnsafeLocalFunction(function () {
|
||||
insertAdjacentHTML(cleaner.documentElement, "afterbegin", html);
|
||||
});
|
||||
|
||||
var scripts = cleaner.documentElement.querySelectorAll("script");
|
||||
Array.prototype.forEach.call(scripts, function (script) {
|
||||
switch (script.type.toLowerCase()) {
|
||||
case "":
|
||||
script.type = "text/inert";
|
||||
break;
|
||||
case "text/javascript":
|
||||
case "text/ecmascript":
|
||||
case "text/x-javascript":
|
||||
case "text/jscript":
|
||||
case "text/livescript":
|
||||
case "text/javascript1.1":
|
||||
case "text/javascript1.2":
|
||||
case "text/javascript1.3":
|
||||
script.type = "text/inert-" + script.type.slice("text/".length);
|
||||
break;
|
||||
case "application/javascript":
|
||||
case "application/ecmascript":
|
||||
case "application/x-javascript":
|
||||
script.type = "application/inert-" + script.type.slice("application/".length);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
function cleanseAttributes(element) {
|
||||
var attributes = getAttributes(element);
|
||||
if (attributes && attributes.length) {
|
||||
// because the attributes collection is live it is simpler to queue up the renames
|
||||
var events;
|
||||
for (var i = 0, len = attributes.length; i < len; i++) {
|
||||
var attribute = attributes[i];
|
||||
var name = attribute.name;
|
||||
if ((name[0] === "o" || name[0] === "O") &&
|
||||
(name[1] === "n" || name[1] === "N")) {
|
||||
events = events || [];
|
||||
events.push({ name: attribute.name, value: attribute.value });
|
||||
}
|
||||
}
|
||||
if (events) {
|
||||
for (var i = 0, len = events.length; i < len; i++) {
|
||||
var attribute = events[i];
|
||||
removeAttribute(element, attribute.name);
|
||||
setAttribute(element, "x-" + attribute.name, attribute.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
var children = childNodes(element);
|
||||
for (var i = 0, len = children.length; i < len; i++) {
|
||||
cleanseAttributes(children[i]);
|
||||
}
|
||||
}
|
||||
cleanseAttributes(cleaner.documentElement);
|
||||
|
||||
var cleanedNodes = [];
|
||||
|
||||
if (targetElement.tagName === 'HTML') {
|
||||
cleanedNodes = Array.prototype.slice.call(document.adoptNode(cleaner.documentElement).childNodes);
|
||||
} else {
|
||||
if (cleaner.head) {
|
||||
cleanedNodes = cleanedNodes.concat(Array.prototype.slice.call(document.adoptNode(cleaner.head).childNodes));
|
||||
}
|
||||
if (cleaner.body) {
|
||||
cleanedNodes = cleanedNodes.concat(Array.prototype.slice.call(document.adoptNode(cleaner.body).childNodes));
|
||||
}
|
||||
}
|
||||
|
||||
return cleanedNodes;
|
||||
}
|
||||
|
||||
function cleansePropertySetter(property, setter) {
|
||||
var propertyDescriptor = Object.getOwnPropertyDescriptor(HTMLElement.prototype, property);
|
||||
var originalSetter = propertyDescriptor.set;
|
||||
Object.defineProperty(HTMLElement.prototype, property, {
|
||||
get: propertyDescriptor.get,
|
||||
set: function (value) {
|
||||
if (window.WinJS && window.WinJS._execUnsafe && inUnsafeMode()) {
|
||||
originalSetter.call(this, value);
|
||||
} else {
|
||||
var that = this;
|
||||
var nodes = cleanse(value, that);
|
||||
MSApp.execUnsafeLocalFunction(function () {
|
||||
setter(propertyDescriptor, that, nodes);
|
||||
});
|
||||
}
|
||||
},
|
||||
enumerable: propertyDescriptor.enumerable,
|
||||
configurable: propertyDescriptor.configurable,
|
||||
});
|
||||
}
|
||||
cleansePropertySetter("innerHTML", function (propertyDescriptor, target, elements) {
|
||||
empty(target);
|
||||
for (var i = 0, len = elements.length; i < len; i++) {
|
||||
target.appendChild(elements[i]);
|
||||
}
|
||||
});
|
||||
cleansePropertySetter("outerHTML", function (propertyDescriptor, target, elements) {
|
||||
for (var i = 0, len = elements.length; i < len; i++) {
|
||||
target.insertAdjacentElement("afterend", elements[i]);
|
||||
}
|
||||
target.parentNode.removeChild(target);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}());
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"name": "ionic-ts-blank",
|
||||
"version": "1.1.1",
|
||||
"description": "ionic-ts-tabs: An Ionic project",
|
||||
"dependencies": {
|
||||
"gulp": "^3.5.6",
|
||||
"gulp-sass": "^2.0.4",
|
||||
"gulp-concat": "^2.2.0",
|
||||
"gulp-minify-css": "^0.3.0",
|
||||
"gulp-rename": "^1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bower": "^1.3.3",
|
||||
"gulp-sourcemaps": "^2.0.0-alpha",
|
||||
"gulp-typescript": "^2.13.0",
|
||||
"gulp-util": "^2.2.14",
|
||||
"shelljs": "^0.3.0",
|
||||
"typings": "^0.8.1"
|
||||
},
|
||||
"scripts": {
|
||||
"bower": "node_modules/.bin/bower install",
|
||||
"typings": "node_modules/.bin/typings install",
|
||||
"postinstall": "npm run typings && npm run bower"
|
||||
},
|
||||
"cordovaPlugins": [
|
||||
"cordova-plugin-device",
|
||||
"cordova-plugin-console",
|
||||
"cordova-plugin-whitelist",
|
||||
"cordova-plugin-splashscreen",
|
||||
"cordova-plugin-statusbar",
|
||||
"ionic-plugin-keyboard"
|
||||
],
|
||||
"cordovaPlatforms": [
|
||||
"android"
|
||||
]
|
||||
}
|
После Ширина: | Высота: | Размер: 2.8 KiB |
После Ширина: | Высота: | Размер: 1.1 KiB |
После Ширина: | Высота: | Размер: 1.8 KiB |
После Ширина: | Высота: | Размер: 4.2 KiB |
После Ширина: | Высота: | Размер: 7.6 KiB |
После Ширина: | Высота: | Размер: 12 KiB |
После Ширина: | Высота: | Размер: 13 KiB |
После Ширина: | Высота: | Размер: 3.7 KiB |
После Ширина: | Высота: | Размер: 6.9 KiB |
После Ширина: | Высота: | Размер: 39 KiB |
После Ширина: | Высота: | Размер: 58 KiB |
После Ширина: | Высота: | Размер: 87 KiB |
После Ширина: | Высота: | Размер: 13 KiB |
После Ширина: | Высота: | Размер: 3.5 KiB |
После Ширина: | Высота: | Размер: 7.0 KiB |
После Ширина: | Высота: | Размер: 38 KiB |
После Ширина: | Высота: | Размер: 54 KiB |
После Ширина: | Высота: | Размер: 80 KiB |
После Ширина: | Высота: | Размер: 59 KiB |
После Ширина: | Высота: | Размер: 1.2 KiB |
После Ширина: | Высота: | Размер: 3.5 KiB |
После Ширина: | Высота: | Размер: 1.9 KiB |
После Ширина: | Высота: | Размер: 4.6 KiB |
После Ширина: | Высота: | Размер: 2.4 KiB |
После Ширина: | Высота: | Размер: 5.9 KiB |
После Ширина: | Высота: | Размер: 11 KiB |
После Ширина: | Высота: | Размер: 2.8 KiB |
После Ширина: | Высота: | Размер: 7.6 KiB |
После Ширина: | Высота: | Размер: 3.2 KiB |
После Ширина: | Высота: | Размер: 8.1 KiB |
После Ширина: | Высота: | Размер: 818 B |
После Ширина: | Высота: | Размер: 2.2 KiB |
После Ширина: | Высота: | Размер: 3.8 KiB |
После Ширина: | Высота: | Размер: 2.1 KiB |
После Ширина: | Высота: | Размер: 5.6 KiB |
После Ширина: | Высота: | Размер: 31 KiB |
После Ширина: | Высота: | Размер: 40 KiB |
После Ширина: | Высота: | Размер: 44 KiB |
После Ширина: | Высота: | Размер: 44 KiB |
После Ширина: | Высота: | Размер: 100 KiB |
После Ширина: | Высота: | Размер: 22 KiB |
После Ширина: | Высота: | Размер: 97 KiB |
После Ширина: | Высота: | Размер: 22 KiB |
После Ширина: | Высота: | Размер: 18 KiB |
После Ширина: | Высота: | Размер: 7.0 KiB |
После Ширина: | Высота: | Размер: 61 KiB |
После Ширина: | Высота: | Размер: 639 B |
После Ширина: | Высота: | Размер: 2.5 KiB |
После Ширина: | Высота: | Размер: 213 B |
После Ширина: | Высота: | Размер: 9.5 KiB |
После Ширина: | Высота: | Размер: 951 B |
После Ширина: | Высота: | Размер: 753 B |
После Ширина: | Высота: | Размер: 1.8 KiB |
После Ширина: | Высота: | Размер: 1.6 KiB |
После Ширина: | Высота: | Размер: 1.1 KiB |
После Ширина: | Высота: | Размер: 309 B |
После Ширина: | Высота: | Размер: 902 B |
После Ширина: | Высота: | Размер: 6.3 KiB |
После Ширина: | Высота: | Размер: 4.4 KiB |
После Ширина: | Высота: | Размер: 1.9 KiB |
После Ширина: | Высота: | Размер: 14 KiB |
После Ширина: | Высота: | Размер: 14 KiB |
После Ширина: | Высота: | Размер: 1.8 KiB |
После Ширина: | Высота: | Размер: 1.1 KiB |
После Ширина: | Высота: | Размер: 28 KiB |
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
To customize the look and feel of Ionic, you can override the variables
|
||||
in ionic's _variables.scss file.
|
||||
|
||||
For example, you might change some of the default colors:
|
||||
|
||||
$light: #fff !default;
|
||||
$stable: #f8f8f8 !default;
|
||||
$positive: #387ef5 !default;
|
||||
$calm: #11c1f3 !default;
|
||||
$balanced: #33cd5f !default;
|
||||
$energized: #ffc900 !default;
|
||||
$assertive: #ef473a !default;
|
||||
$royal: #886aea !default;
|
||||
$dark: #444 !default;
|
||||
*/
|
||||
|
||||
// The path for our ionicons font files, relative to the built CSS in www/css
|
||||
$ionicons-font-path: "../lib/ionic/fonts" !default;
|
||||
|
||||
// Include all of Ionic
|
||||
@import "www/lib/ionic/scss/ionic.scss";
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"cordova-cli": "6.1.1"
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"noImplicitAny": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "www/js"
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"typings/main",
|
||||
"typings/main.d.ts",
|
||||
"www/lib",
|
||||
"platforms",
|
||||
"bld",
|
||||
".vscode"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"name": "ionic-ts-blank",
|
||||
"version": false,
|
||||
"dependencies": {},
|
||||
"ambientDependencies": {
|
||||
"angular": "registry:dt/angular#1.5.0+20160412133217",
|
||||
"cordova": "registry:dt/cordova#0.0.0+20160316155526",
|
||||
"cordova-ionic": "registry:dt/cordova-ionic#0.0.0+20160316155526",
|
||||
"cordova-ionic/plugins/keyboard": "registry:dt/cordova-ionic/plugins/keyboard#0.0.0+20160317120654",
|
||||
"cordova/plugins/statusbar": "registry:dt/cordova/plugins/statusbar#0.0.0+20160316155526",
|
||||
"ionic": "registry:dt/ionic#0.0.0+20160501155303",
|
||||
"jquery": "registry:dt/jquery#1.10.0+20160417213236"
|
||||
}
|
||||
}
|
После Ширина: | Высота: | Размер: 4.6 KiB |
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
|
||||
<title></title>
|
||||
|
||||
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
|
||||
<link href="css/style.css" rel="stylesheet">
|
||||
|
||||
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
|
||||
<link href="css/ionic.app.css" rel="stylesheet">
|
||||
-->
|
||||
|
||||
<!-- ionic/angularjs js -->
|
||||
<script src="lib/ionic/js/ionic.bundle.js"></script>
|
||||
|
||||
<!-- cordova script (this will be a 404 during development) -->
|
||||
<script src="cordova.js"></script>
|
||||
|
||||
<!-- your app's js -->
|
||||
<script src="js/app.js"></script>
|
||||
</head>
|
||||
<body ng-app="starter">
|
||||
|
||||
<ion-pane>
|
||||
<ion-header-bar class="bar-stable">
|
||||
<h1 class="title">Ionic Blank Starter</h1>
|
||||
</ion-header-bar>
|
||||
<ion-content>
|
||||
</ion-content>
|
||||
</ion-pane>
|
||||
</body>
|
||||
</html>
|