Commit 112c3d93 by Sebastián Katzer

Update plugin and add windows platform

parent 2f1c9281
<?xml version='1.0' encoding='utf-8'?>
<widget id="de.appplant.cordova.plugin.local-notification.example" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="de.appplant.localnotification.example" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>NotificationExample</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
......
......@@ -20,6 +20,22 @@ module.exports = [
]
},
{
"file": "plugins/de.appplant.cordova.plugin.local-notification/www/local-notification-core.js",
"id": "de.appplant.cordova.plugin.local-notification.LocalNotification.Core",
"clobbers": [
"cordova.plugins.notification.local.core",
"plugin.notification.local.core"
]
},
{
"file": "plugins/de.appplant.cordova.plugin.local-notification/www/local-notification-util.js",
"id": "de.appplant.cordova.plugin.local-notification.LocalNotification.Util",
"merges": [
"cordova.plugins.notification.local.core",
"plugin.notification.local.core"
]
},
{
"file": "plugins/org.apache.cordova.device/www/device.js",
"id": "org.apache.cordova.device.device",
"clobbers": [
......@@ -31,7 +47,7 @@ module.exports.metadata =
// TOP OF METADATA
{
"nl.x-services.plugins.toast": "2.0.3",
"de.appplant.cordova.plugin.local-notification": "0.8.1",
"de.appplant.cordova.plugin.local-notification": "0.8.2dev",
"org.apache.cordova.device": "0.3.0"
}
// BOTTOM OF METADATA
......
......@@ -169,7 +169,7 @@
<script type="text/javascript">
schedule = function () {
cordova.plugins.notification.local.schedule({
// id: 1,
id: 1,
text: 'Test Message 1',
icon: 'http://www.optimizeordie.de/wp-content/plugins/social-media-widget/images/default/64/googleplus.png',
sound: null,
......@@ -289,48 +289,48 @@
<!-- IDs -->
<script type="text/javascript">
var callback = function (ids) {
var callbackIds = function (ids) {
showToast(ids.length === 0 ? '- none -' : ids.join(' ,'));
};
getIds = function () {
cordova.plugins.notification.local.getIds(callback);
cordova.plugins.notification.local.getIds(callbackIds);
};
getScheduledIds = function () {
cordova.plugins.notification.local.getScheduledIds(callback);
cordova.plugins.notification.local.getScheduledIds(callbackIds);
};
getTriggeredIds = function () {
cordova.plugins.notification.local.getTriggeredIds(callback);
cordova.plugins.notification.local.getTriggeredIds(callbackIds);
};
</script>
<!-- notifications -->
<script type="text/javascript">
var callback = function (notifications) {
var callbackOpts = function (notifications) {
console.log(notifications);
showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,'));
};
get = function () {
cordova.plugins.notification.local.get(1, callback);
cordova.plugins.notification.local.get(1, callbackOpts);
};
getMultiple = function () {
cordova.plugins.notification.local.get([1, 2], callback);
cordova.plugins.notification.local.get([1, 2], callbackOpts);
};
getAll = function () {
cordova.plugins.notification.local.getAll(callback);
cordova.plugins.notification.local.getAll(callbackOpts);
};
getScheduled = function () {
cordova.plugins.notification.local.getScheduled(callback);
cordova.plugins.notification.local.getScheduled(callbackOpts);
};
getTriggered = function () {
cordova.plugins.notification.local.getTriggered(callback);
cordova.plugins.notification.local.getTriggered(callbackOpts);
};
</script>
......
cordova.define("de.appplant.cordova.plugin.local-notification.LocalNotification.Util", function(require, exports, module) { /*
* Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
*
* @APPPLANT_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apache License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPPLANT_LICENSE_HEADER_END@
*/
var exec = require('cordova/exec'),
channel = require('cordova/channel');
/***********
* MEMBERS *
***********/
// Default values
exports._defaults = {
text: '',
title: '',
sound: 'res://platform_default',
badge: 0,
id: "0",
data: undefined,
every: undefined,
at: undefined
};
// listener
exports._listener = {};
/********
* UTIL *
********/
/**
* Merge platform specific properties into the default ones.
*
* @return {Object}
* The default properties for the platform
*/
exports.applyPlatformSpecificOptions = function () {
var defaults = this._defaults;
switch (device.platform) {
case 'Android':
defaults.icon = 'res://icon';
defaults.smallIcon = 'res://ic_popup_reminder';
defaults.ongoing = false;
defaults.autoClear = true;
defaults.led = 'FFFFFF';
break;
}
return defaults;
};
/**
* Merge custom properties with the default values.
*
* @param {Object} options
* Set of custom values
*
* @retrun {Object}
* The merged property list
*/
exports.mergeWithDefaults = function (options) {
var defaults = this.getDefaults();
options.at = this.getValueFor(options, 'at', 'firstAt', 'date');
options.text = this.getValueFor(options, 'text', 'message');
options.data = this.getValueFor(options, 'data', 'json');
options.autoClear = this.getValueFor(options, 'autoClear', 'autoCancel');
if (options.autoClear !== true && options.ongoing) {
options.autoClear = false;
}
if (options.at === undefined || options.at === null) {
options.at = new Date();
}
for (var key in defaults) {
if (options[key] === null || options[key] === undefined) {
if (options.hasOwnProperty(key) && ['data','sound'].indexOf(key) > -1) {
options[key] = undefined;
} else {
options[key] = defaults[key];
}
}
}
for (key in options) {
if (!defaults.hasOwnProperty(key)) {
delete options[key];
console.warn('Unknown property: ' + key);
}
}
return options;
};
/**
* Convert the passed values to their required type.
*
* @param {Object} options
* Set of custom values
*
* @retrun {Object}
* The converted property list
*/
exports.convertProperties = function (options) {
if (options.id) {
if (isNaN(options.id)) {
options.id = this.getDefaults().id;
} else {
options.id = options.id.toString();
}
}
if (options.title) {
options.title = options.title.toString();
}
if (options.text) {
options.text = options.text.toString();
}
if (options.badge) {
if (isNaN(options.badge)) {
options.badge = this.getDefaults().badge;
} else {
options.badge = Number(options.badge);
}
}
if (typeof options.at == 'object') {
options.at = Math.round(options.at.getTime()/1000);
}
if (typeof options.data == 'object') {
options.data = JSON.stringify(options.data);
}
return options;
};
/**
* Create callback, which will be executed within a specific scope.
*
* @param {Function} callbackFn
* The callback function
* @param {Object} scope
* The scope for the function
*
* @return {Function}
* The new callback function
*/
exports.createCallbackFn = function (callbackFn, scope) {
if (typeof callbackFn != 'function')
return;
return function () {
callbackFn.apply(scope || this, arguments);
};
};
/**
* Convert the IDs to Strings.
*
* @param {String/Number[]} ids
*
* @return Array of Strings
*/
exports.convertIds = function (ids) {
var convertedIds = [];
for (var i = 0; i < ids.length; i++) {
convertedIds.push(ids[i].toString());
}
return convertedIds;
};
/**
* First found value for the given keys.
*
* @param {Object} options
* Object with key-value properties
* @param {String[]} keys*
* Key list
*/
exports.getValueFor = function (options) {
var keys = Array.apply(null, arguments).slice(1);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (options.hasOwnProperty(key)) {
return options[key];
}
}
};
/**
* Fire event with given arguments.
*
* @param {String} event
* The event's name
* @param {args*}
* The callback's arguments
*/
exports.fireEvent = function (event) {
var args = Array.apply(null, arguments).slice(1),
listener = this._listener[event];
if (!listener)
return;
for (var i = 0; i < listener.length; i++) {
var fn = listener[i][0],
scope = listener[i][1];
fn.apply(scope, args);
}
};
/**
* Execute the native counterpart.
*
* @param {String} action
* The name of the action
* @param args[]
* Array of arguments
* @param {Function} callback
* The callback function
* @param {Object} scope
* The scope for the function
*/
exports.exec = function (action, args, callback, scope) {
var fn = this.createCallbackFn(callback, scope),
params = [];
if (Array.isArray(args)) {
params = args;
} else if (args) {
params.push(args);
}
exec(fn, null, 'LocalNotification', action, params);
};
/*********
* HOOKS *
*********/
// Called after 'deviceready' event
channel.deviceready.subscribe(function () {
// Device is ready now, the listeners are registered
// and all queued events can be executed.
exec(null, null, 'LocalNotification', 'deviceready', []);
});
// Called before 'deviceready' event
channel.onCordovaReady.subscribe(function () {
// Device plugin is ready now
channel.onCordovaInfoReady.subscribe(function () {
// Merge platform specifics into defaults
exports.applyPlatformSpecificOptions();
});
});
});
......@@ -470,7 +470,7 @@ public class LocalNotification extends CordovaPlugin {
params = notification.toString() + "," + params;
}
String js = "cordova.plugins.notification.local.fireEvent(" +
String js = "cordova.plugins.notification.local.core.fireEvent(" +
"\"" + event + "\"," + params + ")";
sendJavascript(js);
......
......@@ -130,7 +130,7 @@ public class Builder {
.setTicker(options.getText())
.setSmallIcon(options.getSmallIcon())
.setLargeIcon(options.getIconBitmap())
.setAutoCancel(true)
.setAutoCancel(options.isAutoClear())
.setOngoing(options.isOngoing())
.setStyle(style)
.setLights(options.getLedColor(), 500, 500);
......
......@@ -175,13 +175,20 @@ public class Options {
}
/**
* Android only ongoing flag for local notifications.
* ongoing flag for local notifications.
*/
public Boolean isOngoing() {
return options.optBoolean("ongoing", false);
}
/**
* autoClear flag for local notifications.
*/
public Boolean isAutoClear() {
return options.optBoolean("autoClear", false);
}
/**
* Trigger date in milliseconds.
*/
public long getTriggerTime() {
......
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0610"
LastUpgradeVersion = "0620"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
......
......@@ -5,7 +5,7 @@
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>D2EC9BA3-6E07-460E-8F72-D420955A7103</string>
<string>AFAFE068-92EA-475E-8783-6E5FC17A7188</string>
<key>IDESourceControlProjectName</key>
<string>NotificationExample</string>
<key>IDESourceControlProjectOriginsDictionary</key>
......
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0610"
LastUpgradeVersion = "0620"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
......@@ -48,7 +48,8 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
......@@ -66,7 +67,8 @@
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
......
......@@ -671,7 +671,7 @@
}
js = [NSString stringWithFormat:
@"cordova.plugins.notification.local.fireEvent('%@', %@)",
@"cordova.plugins.notification.local.core.fireEvent('%@', %@)",
event, params];
if (deviceready) {
......
......@@ -20,6 +20,22 @@ module.exports = [
]
},
{
"file": "plugins/de.appplant.cordova.plugin.local-notification/www/local-notification-core.js",
"id": "de.appplant.cordova.plugin.local-notification.LocalNotification.Core",
"clobbers": [
"cordova.plugins.notification.local.core",
"plugin.notification.local.core"
]
},
{
"file": "plugins/de.appplant.cordova.plugin.local-notification/www/local-notification-util.js",
"id": "de.appplant.cordova.plugin.local-notification.LocalNotification.Util",
"merges": [
"cordova.plugins.notification.local.core",
"plugin.notification.local.core"
]
},
{
"file": "plugins/org.apache.cordova.device/www/device.js",
"id": "org.apache.cordova.device.device",
"clobbers": [
......@@ -31,7 +47,7 @@ module.exports.metadata =
// TOP OF METADATA
{
"nl.x-services.plugins.toast": "2.0.3",
"de.appplant.cordova.plugin.local-notification": "0.8.1",
"de.appplant.cordova.plugin.local-notification": "0.8.2dev",
"org.apache.cordova.device": "0.3.0"
}
// BOTTOM OF METADATA
......
......@@ -289,48 +289,48 @@
<!-- IDs -->
<script type="text/javascript">
var callback = function (ids) {
var callbackIds = function (ids) {
showToast(ids.length === 0 ? '- none -' : ids.join(' ,'));
};
getIds = function () {
cordova.plugins.notification.local.getIds(callback);
cordova.plugins.notification.local.getIds(callbackIds);
};
getScheduledIds = function () {
cordova.plugins.notification.local.getScheduledIds(callback);
cordova.plugins.notification.local.getScheduledIds(callbackIds);
};
getTriggeredIds = function () {
cordova.plugins.notification.local.getTriggeredIds(callback);
cordova.plugins.notification.local.getTriggeredIds(callbackIds);
};
</script>
<!-- notifications -->
<script type="text/javascript">
var callback = function (notifications) {
var callbackOpts = function (notifications) {
console.log(notifications);
showToast(notifications.length === 0 ? '- none -' : notifications.join(' ,'));
};
get = function () {
cordova.plugins.notification.local.get(1, callback);
cordova.plugins.notification.local.get(1, callbackOpts);
};
getMultiple = function () {
cordova.plugins.notification.local.get([1, 2], callback);
cordova.plugins.notification.local.get([1, 2], callbackOpts);
};
getAll = function () {
cordova.plugins.notification.local.getAll(callback);
cordova.plugins.notification.local.getAll(callbackOpts);
};
getScheduled = function () {
cordova.plugins.notification.local.getScheduled(callback);
cordova.plugins.notification.local.getScheduled(callbackOpts);
};
getTriggered = function () {
cordova.plugins.notification.local.getTriggered(callback);
cordova.plugins.notification.local.getTriggered(callbackOpts);
};
</script>
......
cordova.define("de.appplant.cordova.plugin.local-notification.LocalNotification.Util", function(require, exports, module) { /*
* Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
*
* @APPPLANT_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apache License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://opensource.org/licenses/Apache-2.0/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPPLANT_LICENSE_HEADER_END@
*/
var exec = require('cordova/exec'),
channel = require('cordova/channel');
/***********
* MEMBERS *
***********/
// Default values
exports._defaults = {
text: '',
title: '',
sound: 'res://platform_default',
badge: 0,
id: "0",
data: undefined,
every: undefined,
at: undefined
};
// listener
exports._listener = {};
/********
* UTIL *
********/
/**
* Merge platform specific properties into the default ones.
*
* @return {Object}
* The default properties for the platform
*/
exports.applyPlatformSpecificOptions = function () {
var defaults = this._defaults;
switch (device.platform) {
case 'Android':
defaults.icon = 'res://icon';
defaults.smallIcon = 'res://ic_popup_reminder';
defaults.ongoing = false;
defaults.autoClear = true;
defaults.led = 'FFFFFF';
break;
}
return defaults;
};
/**
* Merge custom properties with the default values.
*
* @param {Object} options
* Set of custom values
*
* @retrun {Object}
* The merged property list
*/
exports.mergeWithDefaults = function (options) {
var defaults = this.getDefaults();
options.at = this.getValueFor(options, 'at', 'firstAt', 'date');
options.text = this.getValueFor(options, 'text', 'message');
options.data = this.getValueFor(options, 'data', 'json');
options.autoClear = this.getValueFor(options, 'autoClear', 'autoCancel');
if (options.autoClear !== true && options.ongoing) {
options.autoClear = false;
}
if (options.at === undefined || options.at === null) {
options.at = new Date();
}
for (var key in defaults) {
if (options[key] === null || options[key] === undefined) {
if (options.hasOwnProperty(key) && ['data','sound'].indexOf(key) > -1) {
options[key] = undefined;
} else {
options[key] = defaults[key];
}
}
}
for (key in options) {
if (!defaults.hasOwnProperty(key)) {
delete options[key];
console.warn('Unknown property: ' + key);
}
}
return options;
};
/**
* Convert the passed values to their required type.
*
* @param {Object} options
* Set of custom values
*
* @retrun {Object}
* The converted property list
*/
exports.convertProperties = function (options) {
if (options.id) {
if (isNaN(options.id)) {
options.id = this.getDefaults().id;
} else {
options.id = options.id.toString();
}
}
if (options.title) {
options.title = options.title.toString();
}
if (options.text) {
options.text = options.text.toString();
}
if (options.badge) {
if (isNaN(options.badge)) {
options.badge = this.getDefaults().badge;
} else {
options.badge = Number(options.badge);
}
}
if (typeof options.at == 'object') {
options.at = Math.round(options.at.getTime()/1000);
}
if (typeof options.data == 'object') {
options.data = JSON.stringify(options.data);
}
return options;
};
/**
* Create callback, which will be executed within a specific scope.
*
* @param {Function} callbackFn
* The callback function
* @param {Object} scope
* The scope for the function
*
* @return {Function}
* The new callback function
*/
exports.createCallbackFn = function (callbackFn, scope) {
if (typeof callbackFn != 'function')
return;
return function () {
callbackFn.apply(scope || this, arguments);
};
};
/**
* Convert the IDs to Strings.
*
* @param {String/Number[]} ids
*
* @return Array of Strings
*/
exports.convertIds = function (ids) {
var convertedIds = [];
for (var i = 0; i < ids.length; i++) {
convertedIds.push(ids[i].toString());
}
return convertedIds;
};
/**
* First found value for the given keys.
*
* @param {Object} options
* Object with key-value properties
* @param {String[]} keys*
* Key list
*/
exports.getValueFor = function (options) {
var keys = Array.apply(null, arguments).slice(1);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (options.hasOwnProperty(key)) {
return options[key];
}
}
};
/**
* Fire event with given arguments.
*
* @param {String} event
* The event's name
* @param {args*}
* The callback's arguments
*/
exports.fireEvent = function (event) {
var args = Array.apply(null, arguments).slice(1),
listener = this._listener[event];
if (!listener)
return;
for (var i = 0; i < listener.length; i++) {
var fn = listener[i][0],
scope = listener[i][1];
fn.apply(scope, args);
}
};
/**
* Execute the native counterpart.
*
* @param {String} action
* The name of the action
* @param args[]
* Array of arguments
* @param {Function} callback
* The callback function
* @param {Object} scope
* The scope for the function
*/
exports.exec = function (action, args, callback, scope) {
var fn = this.createCallbackFn(callback, scope),
params = [];
if (Array.isArray(args)) {
params = args;
} else if (args) {
params.push(args);
}
exec(fn, null, 'LocalNotification', action, params);
};
/*********
* HOOKS *
*********/
// Called after 'deviceready' event
channel.deviceready.subscribe(function () {
// Device is ready now, the listeners are registered
// and all queued events can be executed.
exec(null, null, 'LocalNotification', 'deviceready', []);
});
// Called before 'deviceready' event
channel.onCordovaReady.subscribe(function () {
// Device plugin is ready now
channel.onCordovaInfoReady.subscribe(function () {
// Merge platform specifics into defaults
exports.applyPlatformSpecificOptions();
});
});
});
<?xml version="1.0" encoding="utf-8"?>
<!--
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.
-->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputPath>build\windows80\$(Configuration)\$(Platform)\</OutputPath>
<IntermediateOutputPath>build\windows80\bld\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|AnyCPU">
<Configuration>Debug</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x86">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|AnyCPU">
<Configuration>Release</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x86">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>efffab2f-bfc5-4eda-b545-45ef4995f55a</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '11.0'">
<VisualStudioVersion>11.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).props" />
<PropertyGroup>
<TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>
<TargetPlatformVersion>8.0</TargetPlatformVersion>
<DefaultLanguage>en-US</DefaultLanguage>
<PackageCertificateKeyFile>CordovaApp_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<ItemGroup>
<AppxManifest Include="package.windows80.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<Content Include="images\*.png" Exclude="images\*.scale-240.*" />
<None Include="CordovaApp_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<SDKReference Include="Microsoft.WinJS.1.0, Version=1.0" />
</ItemGroup>
<Import Project="CordovaApp.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
<PropertyGroup>
<BuildFromCordovaTooling>false</BuildFromCordovaTooling>
<PreBuildEvent Condition="$(BuildFromCordovaTooling) != true">
cd /d $(MSBuildThisFileDirectory)
node -e "require('./cordova/lib/prepare.js').applyPlatformConfig()"
</PreBuildEvent>
</PropertyGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
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.
-->
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
<Identity Name="e8de53c0-cf2d-11e4-8bb0-9369d008f7b1" Version="1.0.0.0" Publisher="CN=$username$" />
<Properties>
<DisplayName>NotificationExample</DisplayName>
<PublisherDisplayName>$username$</PublisherDisplayName>
<Logo>images\storelogo.png</Logo>
</Properties>
<Prerequisites>
<OSMinVersion>6.2.1</OSMinVersion>
<OSMaxVersionTested>6.2.1</OSMaxVersionTested>
</Prerequisites>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="de.appplant.localnotification.example" StartPage="www/index.html">
<VisualElements DisplayName="NotificationExample"
Logo="images\Square150x150Logo.png"
SmallLogo="images\Square30x30Logo.png"
Description="CordovaApp"
ForegroundText="light"
BackgroundColor="#464646">
<DefaultTile ShowName="allLogos" WideLogo="images\Wide310x150Logo.png"/>
<SplashScreen Image="images\splashscreen.png" />
</VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
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.
-->
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputPath>build\phone\$(Configuration)\$(Platform)\</OutputPath>
<IntermediateOutputPath>build\phone\bld\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|AnyCPU">
<Configuration>Debug</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x86">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|AnyCPU">
<Configuration>Release</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x86">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>31b67a35-9503-4213-857e-f44eb42ae549</ProjectGuid>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '12.0'">
<VisualStudioVersion>12.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).Default.props" />
<PropertyGroup Label="Configuration">
<TargetPlatformIdentifier>WindowsPhoneApp</TargetPlatformIdentifier>
<TargetPlatformVersion>8.1</TargetPlatformVersion>
<RequiredPlatformVersion>8.1</RequiredPlatformVersion>
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).props" />
<PropertyGroup>
<DefaultLanguage>en-US</DefaultLanguage>
</PropertyGroup>
<ItemGroup>
<AppxManifest Include="package.phone.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<Content Include="images\*.png" Exclude="images\*.scale-180.*" />
</ItemGroup>
<ItemGroup>
<SDKReference Include="Microsoft.Phone.WinJS.2.1, Version=1.0" />
</ItemGroup>
<Import Project="CordovaApp.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
<!-- To modify your build process, add your task inside one of the targets below then uncomment
that target and the DisableFastUpToDateCheck PropertyGroup.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
<PropertyGroup>
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
</PropertyGroup>
-->
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
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.
-->
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputPath>build\windows\$(Configuration)\$(Platform)\</OutputPath>
<IntermediateOutputPath>build\windows\bld\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|AnyCPU">
<Configuration>Debug</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x86">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|AnyCPU">
<Configuration>Release</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x86">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>58950fb6-2f93-4963-b9cd-637f83f3efbf</ProjectGuid>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '12.0'">
<VisualStudioVersion>12.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).props" />
<PropertyGroup>
<TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>
<TargetPlatformVersion>8.1</TargetPlatformVersion>
<RequiredPlatformVersion>8.1</RequiredPlatformVersion>
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
<DefaultLanguage>en-US</DefaultLanguage>
<PackageCertificateKeyFile>CordovaApp_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<ItemGroup>
<AppxManifest Include="package.windows.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<Content Include="images\*.png" Exclude="images\*.scale-240.*" />
<None Include="CordovaApp_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<SDKReference Include="Microsoft.WinJS.2.0, Version=1.0" />
</ItemGroup>
<Import Project="CordovaApp.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
<!-- To modify your build process, add your task inside one of the targets below then uncomment
that target and the DisableFastUpToDateCheck PropertyGroup.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
<PropertyGroup>
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
</PropertyGroup>
-->
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
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.
-->
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputPath>build\windows80\$(Configuration)\$(Platform)\</OutputPath>
<IntermediateOutputPath>build\windows80\bld\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|AnyCPU">
<Configuration>Debug</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x86">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|AnyCPU">
<Configuration>Release</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x86">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>efffab2f-bfc5-4eda-b545-45ef4995f55a</ProjectGuid>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '12.0'">
<VisualStudioVersion>12.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).props" />
<PropertyGroup>
<TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>
<TargetPlatformVersion>8.1</TargetPlatformVersion>
<DefaultLanguage>en-US</DefaultLanguage>
<PackageCertificateKeyFile>CordovaApp_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<ItemGroup>
<AppxManifest Include="package.windows80.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<Content Include="images\*.png" Exclude="images\*.scale-240.*" />
<None Include="CordovaApp_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<SDKReference Include="Microsoft.WinJS.2.0, Version=1.0" />
</ItemGroup>
<Import Project="CordovaApp.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
<PropertyGroup>
<BuildFromCordovaTooling>false</BuildFromCordovaTooling>
<PreBuildEvent Condition="$(BuildFromCordovaTooling) != true">
cd /d $(MSBuildThisFileDirectory)
node -e "require('./cordova/lib/prepare.js').applyPlatformConfig()"
</PreBuildEvent>
</PropertyGroup>
</Project>
\ No newline at end of file
<?xml version='1.0' encoding='utf-8'?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<HasSharedItems>true</HasSharedItems>
<SharedGUID>9ebdb27f-d75b-4d8c-b53f-7be4a1fe89f9</SharedGUID>
</PropertyGroup>
<ItemGroup>
<Content Include="$(MSBuildThisFileDirectory)www\**" />
</ItemGroup>
<ItemGroup>
<Content Include="$(MSBuildThisFileDirectory)config.xml" />
</ItemGroup>
</Project>
<?xml version="1.0" encoding="utf-8"?>
<!--
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.
-->
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{9ebdb27f-d75b-4d8c-b53f-7be4a1fe89f9}</ProjectGuid>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
<PropertyGroup />
<Import Project="CordovaApp.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.CodeSharing.JavaScript.targets" />
</Project>
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
#
# 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.
#
VisualStudioVersion = 12.0.30324.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CordovaApp", "CordovaApp", "{3A47E08D-7EA5-4F3F-AA6D-1D4A41F26944}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "CordovaApp", "CordovaApp.shproj", "{9EBDB27F-D75B-4D8C-B53F-7BE4A1FE89F9}"
EndProject
Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "CordovaApp.Windows8.0", "CordovaApp.Windows80.jsproj", "{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}"
EndProject
Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "CordovaApp.Windows", "CordovaApp.Windows.jsproj", "{58950FB6-2F93-4963-B9CD-637F83F3EFBF}"
EndProject
Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "CordovaApp.Phone", "CordovaApp.Phone.jsproj", "{31B67A35-9503-4213-857E-F44EB42AE549}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
CordovaApp.projitems*{58950fb6-2f93-4963-b9cd-637f83f3efbf}*SharedItemsImports = 5
CordovaApp.projitems*{efffab2f-bfc5-4eda-b545-45ef4995f55a}*SharedItemsImports = 5
CordovaApp.projitems*{9ebdb27f-d75b-4d8c-b53f-7be4a1fe89f9}*SharedItemsImports = 13
CordovaApp.projitems*{31b67a35-9503-4213-857e-f44eb42ae549}*SharedItemsImports = 5
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|ARM.ActiveCfg = Debug|ARM
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|ARM.Build.0 = Debug|ARM
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|ARM.Deploy.0 = Debug|ARM
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|x64.ActiveCfg = Debug|x64
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|x64.Build.0 = Debug|x64
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|x64.Deploy.0 = Debug|x64
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|x86.ActiveCfg = Debug|x86
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|x86.Build.0 = Debug|x86
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Debug|x86.Deploy.0 = Debug|x86
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|Any CPU.Build.0 = Release|Any CPU
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|Any CPU.Deploy.0 = Release|Any CPU
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|ARM.ActiveCfg = Release|ARM
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|ARM.Build.0 = Release|ARM
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|ARM.Deploy.0 = Release|ARM
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|x64.ActiveCfg = Release|x64
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|x64.Build.0 = Release|x64
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|x64.Deploy.0 = Release|x64
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|x86.ActiveCfg = Release|x86
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|x86.Build.0 = Release|x86
{58950FB6-2F93-4963-B9CD-637F83F3EFBF}.Release|x86.Deploy.0 = Release|x86
{31B67A35-9503-4213-857E-F44EB42AE549}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{31B67A35-9503-4213-857E-F44EB42AE549}.Debug|Any CPU.Build.0 = Debug|Any CPU
{31B67A35-9503-4213-857E-F44EB42AE549}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{31B67A35-9503-4213-857E-F44EB42AE549}.Debug|ARM.ActiveCfg = Debug|ARM
{31B67A35-9503-4213-857E-F44EB42AE549}.Debug|ARM.Build.0 = Debug|ARM
{31B67A35-9503-4213-857E-F44EB42AE549}.Debug|ARM.Deploy.0 = Debug|ARM
{31B67A35-9503-4213-857E-F44EB42AE549}.Debug|x64.ActiveCfg = Debug|x64
{31B67A35-9503-4213-857E-F44EB42AE549}.Debug|x64.Build.0 = Debug|x64
{31B67A35-9503-4213-857E-F44EB42AE549}.Debug|x64.Deploy.0 = Debug|x64
{31B67A35-9503-4213-857E-F44EB42AE549}.Debug|x86.ActiveCfg = Debug|x86
{31B67A35-9503-4213-857E-F44EB42AE549}.Debug|x86.Build.0 = Debug|x86
{31B67A35-9503-4213-857E-F44EB42AE549}.Debug|x86.Deploy.0 = Debug|x86
{31B67A35-9503-4213-857E-F44EB42AE549}.Release|Any CPU.ActiveCfg = Release|Any CPU
{31B67A35-9503-4213-857E-F44EB42AE549}.Release|Any CPU.Build.0 = Release|Any CPU
{31B67A35-9503-4213-857E-F44EB42AE549}.Release|Any CPU.Deploy.0 = Release|Any CPU
{31B67A35-9503-4213-857E-F44EB42AE549}.Release|ARM.ActiveCfg = Release|ARM
{31B67A35-9503-4213-857E-F44EB42AE549}.Release|ARM.Build.0 = Release|ARM
{31B67A35-9503-4213-857E-F44EB42AE549}.Release|ARM.Deploy.0 = Release|ARM
{31B67A35-9503-4213-857E-F44EB42AE549}.Release|x64.ActiveCfg = Release|x64
{31B67A35-9503-4213-857E-F44EB42AE549}.Release|x64.Build.0 = Release|x64
{31B67A35-9503-4213-857E-F44EB42AE549}.Release|x64.Deploy.0 = Release|x64
{31B67A35-9503-4213-857E-F44EB42AE549}.Release|x86.ActiveCfg = Release|x86
{31B67A35-9503-4213-857E-F44EB42AE549}.Release|x86.Build.0 = Release|x86
{31B67A35-9503-4213-857E-F44EB42AE549}.Release|x86.Deploy.0 = Release|x86
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.ActiveCfg = Debug|ARM
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.Build.0 = Debug|ARM
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.Deploy.0 = Debug|ARM
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.ActiveCfg = Debug|x64
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.Build.0 = Debug|x64
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.Deploy.0 = Debug|x64
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.ActiveCfg = Debug|x86
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.Build.0 = Debug|x86
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.Deploy.0 = Debug|x86
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|Any CPU.Build.0 = Release|Any CPU
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|Any CPU.Deploy.0 = Release|Any CPU
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.ActiveCfg = Release|ARM
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.Build.0 = Release|ARM
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.Deploy.0 = Release|ARM
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.ActiveCfg = Release|x64
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.Build.0 = Release|x64
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.Deploy.0 = Release|x64
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.ActiveCfg = Release|x86
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.Build.0 = Release|x86
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{9EBDB27F-D75B-4D8C-B53F-7BE4A1FE89F9} = {3A47E08D-7EA5-4F3F-AA6D-1D4A41F26944}
{58950FB6-2F93-4963-B9CD-637F83F3EFBF} = {3A47E08D-7EA5-4F3F-AA6D-1D4A41F26944}
{31B67A35-9503-4213-857E-F44EB42AE549} = {3A47E08D-7EA5-4F3F-AA6D-1D4A41F26944}
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A} = {3A47E08D-7EA5-4F3F-AA6D-1D4A41F26944}
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
#
# 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.
#
Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "CordovaApp.Windows8.0", "CordovaApp.Windows80.jsproj", "{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|AnyCPU = Debug|AnyCPU
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|AnyCPU = Release|AnyCPU
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|AnyCPU.Deploy.0 = Debug|Any CPU
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.ActiveCfg = Debug|ARM
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.Build.0 = Debug|ARM
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.Deploy.0 = Debug|ARM
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.ActiveCfg = Debug|x64
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.Build.0 = Debug|x64
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.Deploy.0 = Debug|x64
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.ActiveCfg = Debug|x86
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.Build.0 = Debug|x86
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.Deploy.0 = Debug|x86
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|AnyCPU.Build.0 = Release|Any CPU
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|AnyCPU.Deploy.0 = Release|Any CPU
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.ActiveCfg = Release|ARM
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.Build.0 = Release|ARM
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.Deploy.0 = Release|ARM
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.ActiveCfg = Release|x64
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.Build.0 = Release|x64
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.Deploy.0 = Release|x64
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.ActiveCfg = Release|x86
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.Build.0 = Release|x86
{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="utf-8"?>
<!--
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.
-->
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:build="http://schemas.microsoft.com/developer/appx/2012/build" IgnorableNamespaces="build">
<!--
DIESE PAKETMANIFESTDATEI WIRD DURCH DEN BUILDVORGANG GENERIERT.
Änderungen an dieser Datei gehen verloren, wenn sie erneut erstellt wird. Um Fehler in dieser Datei zu beheben, bearbeiten Sie die '.appxmanifest'-Quelldatei.
Weitere Informationen zu Paketmanifestdateien finden Sie unter http://go.microsoft.com/fwlink/?LinkID=241727
-->
<Identity Name="e8de53c0-cf2d-11e4-8bb0-9369d008f7b1" Version="1.0.0.0" Publisher="CN=$username$" ProcessorArchitecture="neutral" />
<mp:PhoneIdentity PhoneProductId="e8de53c0-cf2d-11e4-8bb0-9369d008f7b1" PhonePublisherId="db093ed5-53b1-45f7-af72-751e8f36ab80" />
<Properties>
<DisplayName>NotificationExample</DisplayName>
<PublisherDisplayName>$username$</PublisherDisplayName>
<Logo>images\StoreLogo.png</Logo>
</Properties>
<Prerequisites>
<OSMinVersion>6.3.1</OSMinVersion>
<OSMaxVersionTested>6.3.1</OSMaxVersionTested>
</Prerequisites>
<Resources>
<Resource Language="EN-US" />
</Resources>
<Applications>
<Application Id="de.appplant.localnotification.example" StartPage="www/index.html">
<m3:VisualElements ToastCapable="true" DisplayName="NotificationExample" Square150x150Logo="images\Square150x150Logo.png" Square44x44Logo="images\Square44x44Logo.png" Description="CordovaApp" ForegroundText="light" BackgroundColor="transparent">
<m3:DefaultTile Wide310x150Logo="images\Wide310x150Logo.png" Square71x71Logo="images\Square71x71Logo.png">
<m3:ShowNameOnTiles>
<m3:ShowOn Tile="square150x150Logo" />
<m3:ShowOn Tile="wide310x150Logo" />
</m3:ShowNameOnTiles>
</m3:DefaultTile>
<m3:SplashScreen Image="images\SplashScreenPhone.png" />
</m3:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClientServer" />
</Capabilities>
<Dependencies>
<PackageDependency Name="Microsoft.Phone.WinJS.2.1" MinVersion="1.0.9651.0" />
</Dependencies>
<build:Metadata>
<build:Item Name="SharedGUID" Value="9ebdb27f-d75b-4d8c-b53f-7be4a1fe89f9" />
<build:Item Name="CodeSharingProject" Value="248F659F-DAC5-46E8-AC09-60EC9FC95053" />
<build:Item Name="VisualStudio" Version="12.0" />
<build:Item Name="VisualStudioEdition" Value="Microsoft Visual Studio Express 2013 für Windows" />
<build:Item Name="OperatingSystem" Version="6.3.9600.16384 (winblue_rtm.130821-1623)" />
<build:Item Name="Microsoft.Build.AppxPackage.dll" Version="12.0.31101.0" />
<build:Item Name="ProjectGUID" Value="31b67a35-9503-4213-857e-f44eb42ae549" />
<build:Item Name="MakePri.exe" Version="6.3.9600.17298 (winblue.141024-1500)" />
</build:Metadata>
</Package>
\ No newline at end of file
Y:\Documents\github\cordova-example-local-notifications\platforms\windows\build\phone\Debug\AnyCPU\ReverseMap\resources.pri
Y:\Documents\github\cordova-example-local-notifications\platforms\windows\build\phone\Debug\AnyCPU\AppxManifest.xml
Y:\Documents\github\cordova-example-local-notifications\platforms\windows\build\phone\Debug\AnyCPU\CordovaApp.Phone.build.appxrecipe
Y:\Documents\github\cordova-example-local-notifications\platforms\windows\build\phone\bld\priconfig.xml
Y:\Documents\github\cordova-example-local-notifications\platforms\windows\build\phone\bld\priconfig.xml.intermediate
Y:\Documents\github\cordova-example-local-notifications\platforms\windows\build\phone\bld\layout.resfiles
Y:\Documents\github\cordova-example-local-notifications\platforms\windows\build\phone\bld\layout.resfiles.intermediate
Y:\Documents\github\cordova-example-local-notifications\platforms\windows\build\phone\bld\resources.resfiles
Y:\Documents\github\cordova-example-local-notifications\platforms\windows\build\phone\bld\resources.resfiles.intermediate
Y:\Documents\github\cordova-example-local-notifications\platforms\windows\build\phone\bld\pri.resfiles
Y:\Documents\github\cordova-example-local-notifications\platforms\windows\build\phone\bld\pri.resfiles.intermediate
Y:\Documents\github\cordova-example-local-notifications\platforms\windows\build\phone\bld\qualifiers.txt
Y:\Documents\github\cordova-example-local-notifications\platforms\windows\build\phone\bld\qualifiers.txt.intermediate
Y:\Documents\github\cordova-example-local-notifications\platforms\windows\build\phone\bld\MultipleQualifiersPerDimensionFound.txt
Y:\Documents\github\cordova-example-local-notifications\platforms\windows\build\phone\bld\ProjectArchitectures.txt
Y:\Documents\github\cordova-example-local-notifications\platforms\windows\CordovaApp.Phone.jsproj;neutral
config.xml
images\SplashScreen.scale-100.png
images\SplashScreenPhone.scale-240.png
images\Square150x150Logo.scale-100.png
images\Square150x150Logo.scale-240.png
images\Square30x30Logo.scale-100.png
images\Square310x310Logo.scale-100.png
images\Square44x44Logo.scale-240.png
images\Square70x70Logo.scale-100.png
images\Square71x71Logo.scale-240.png
images\StoreLogo.scale-100.png
images\StoreLogo.scale-240.png
images\Wide310x150Logo.scale-100.png
images\Wide310x150Logo.scale-240.png
www\beep.caf
www\cordova.js
www\cordova_plugins.js
www\css\index.css
www\img\logo.png
www\index.html
www\js\index.js
www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationCore.js
www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationProxy.js
www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationUtil.js
www\plugins\de.appplant.cordova.plugin.local-notification\www\local-notification.js
www\plugins\de.appplant.cordova.plugin.local-notification\www\local-notification-core.js
www\plugins\de.appplant.cordova.plugin.local-notification\www\local-notification-util.js
www\plugins\nl.x-services.plugins.toast\test\tests.js
www\plugins\nl.x-services.plugins.toast\www\Toast.js
www\plugins\org.apache.cordova.device\src\windows\DeviceProxy.js
www\plugins\org.apache.cordova.device\www\device.js
www\sound.mp3
config.xml
images\SplashScreen.scale-100.png
images\SplashScreenPhone.scale-240.png
images\Square150x150Logo.scale-100.png
images\Square150x150Logo.scale-240.png
images\Square30x30Logo.scale-100.png
images\Square310x310Logo.scale-100.png
images\Square44x44Logo.scale-240.png
images\Square70x70Logo.scale-100.png
images\Square71x71Logo.scale-240.png
images\StoreLogo.scale-100.png
images\StoreLogo.scale-240.png
images\Wide310x150Logo.scale-100.png
images\Wide310x150Logo.scale-240.png
www\beep.caf
www\cordova.js
www\cordova_plugins.js
www\css\index.css
www\img\logo.png
www\index.html
www\js\index.js
www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationCore.js
www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationProxy.js
www\plugins\de.appplant.cordova.plugin.local-notification\src\windows\LocalNotificationUtil.js
www\plugins\de.appplant.cordova.plugin.local-notification\www\local-notification.js
www\plugins\de.appplant.cordova.plugin.local-notification\www\local-notification-core.js
www\plugins\de.appplant.cordova.plugin.local-notification\www\local-notification-util.js
www\plugins\nl.x-services.plugins.toast\test\tests.js
www\plugins\nl.x-services.plugins.toast\www\Toast.js
www\plugins\org.apache.cordova.device\src\windows\DeviceProxy.js
www\plugins\org.apache.cordova.device\www\device.js
www\sound.mp3
<?xml version="1.0" encoding="utf-8"?>
<resources targetOsVersion="6.3.1" targetPlatform="WindowsPhone" majorVersion="1">
<index root="\" startIndexAt="build\phone\bld\layout.resfiles">
<default>
<qualifier name="Language" value="en-US" />
<qualifier name="Contrast" value="standard" />
<qualifier name="Scale" value="240" />
<qualifier name="HomeRegion" value="001" />
<qualifier name="TargetSize" value="256" />
<qualifier name="LayoutDirection" value="LTR" />
<qualifier name="DXFeatureLevel" value="DX9" />
<qualifier name="Theme" value="Dark" />
<qualifier name="AlternateForm" value="" />
</default>
<indexer-config type="RESFILES" qualifierDelimiter="." />
</index>
<index root="\" startIndexAt="build\phone\bld\resources.resfiles">
<default>
<qualifier name="Language" value="en-US" />
<qualifier name="Contrast" value="standard" />
<qualifier name="Scale" value="240" />
<qualifier name="HomeRegion" value="001" />
<qualifier name="TargetSize" value="256" />
<qualifier name="LayoutDirection" value="LTR" />
<qualifier name="DXFeatureLevel" value="DX9" />
<qualifier name="Theme" value="Dark" />
<qualifier name="AlternateForm" value="" />
</default>
<indexer-config type="RESW" convertDotsToSlashes="true" />
<indexer-config type="RESJSON" />
<indexer-config type="RESFILES" qualifierDelimiter="." />
</index>
<index root="\" startIndexAt="build\phone\bld\pri.resfiles">
<default>
<qualifier name="Language" value="en-US" />
<qualifier name="Contrast" value="standard" />
<qualifier name="Scale" value="240" />
<qualifier name="HomeRegion" value="001" />
<qualifier name="TargetSize" value="256" />
<qualifier name="LayoutDirection" value="LTR" />
<qualifier name="DXFeatureLevel" value="DX9" />
<qualifier name="Theme" value="Dark" />
<qualifier name="AlternateForm" value="" />
</default>
<indexer-config type="PRI" />
<indexer-config type="RESFILES" qualifierDelimiter="." />
</index>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources targetOsVersion="6.3.1" targetPlatform="WindowsPhone" majorVersion="1">
<index root="\" startIndexAt="build\phone\bld\layout.resfiles">
<default>
<qualifier name="Language" value="en-US" />
<qualifier name="Contrast" value="standard" />
<qualifier name="Scale" value="240" />
<qualifier name="HomeRegion" value="001" />
<qualifier name="TargetSize" value="256" />
<qualifier name="LayoutDirection" value="LTR" />
<qualifier name="DXFeatureLevel" value="DX9" />
<qualifier name="Theme" value="Dark" />
<qualifier name="AlternateForm" value="" />
</default>
<indexer-config type="RESFILES" qualifierDelimiter="." />
</index>
<index root="\" startIndexAt="build\phone\bld\resources.resfiles">
<default>
<qualifier name="Language" value="en-US" />
<qualifier name="Contrast" value="standard" />
<qualifier name="Scale" value="240" />
<qualifier name="HomeRegion" value="001" />
<qualifier name="TargetSize" value="256" />
<qualifier name="LayoutDirection" value="LTR" />
<qualifier name="DXFeatureLevel" value="DX9" />
<qualifier name="Theme" value="Dark" />
<qualifier name="AlternateForm" value="" />
</default>
<indexer-config type="RESW" convertDotsToSlashes="true" />
<indexer-config type="RESJSON" />
<indexer-config type="RESFILES" qualifierDelimiter="." />
</index>
<index root="\" startIndexAt="build\phone\bld\pri.resfiles">
<default>
<qualifier name="Language" value="en-US" />
<qualifier name="Contrast" value="standard" />
<qualifier name="Scale" value="240" />
<qualifier name="HomeRegion" value="001" />
<qualifier name="TargetSize" value="256" />
<qualifier name="LayoutDirection" value="LTR" />
<qualifier name="DXFeatureLevel" value="DX9" />
<qualifier name="Theme" value="Dark" />
<qualifier name="AlternateForm" value="" />
</default>
<indexer-config type="PRI" />
<indexer-config type="RESFILES" qualifierDelimiter="." />
</index>
</resources>
\ No newline at end of file
<?xml version='1.0' encoding='utf-8'?>
<widget id="de.appplant.localnotification.example" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<preference name="windows-target-version" value="8.0" />
<preference name="windows-phone-target-version" value="8.1" />
<name>NotificationExample</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<access origin="*" />
</widget>
#!/usr/bin/env node
/*
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.
*/
var build = require('./lib/build'),
args = process.argv;
// Handle help flag
if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(args[2]) > -1) {
build.help();
} else {
build.run(args).done(null, function(err) {
var errorMessage = (err && err.stack) ? err.stack : err;
console.error('ERROR: ' + errorMessage);
process.exit(2);
});
}
\ No newline at end of file
:: 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
@ECHO OFF
SET script_path="%~dp0build"
IF EXIST %script_path% (
node %script_path% %*
) ELSE (
ECHO.
ECHO ERROR: Could not find 'build' script in 'cordova' folder, aborting...>&2
EXIT /B 1
)
\ No newline at end of file
#!/usr/bin/env node
/*
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.
*/
var clean = require('./lib/clean');
clean.run(process.argv).done(null, function(err) {
console.error('ERROR: ' + err);
process.exit(2);
});
\ No newline at end of file
:: 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
@ECHO OFF
SET script_path="%~dp0clean"
IF EXIST %script_path% (
node %script_path% %*
) ELSE (
ECHO.
ECHO ERROR: Could not find 'clean' script in 'cordova' folder, aborting...>&2
EXIT /B 1
)
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
#
# 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.
#
-->
<widget xmlns="http://www.w3.org/ns/widgets">
<preference name="windows-target-version" value="8.0" />
<preference name="windows-phone-target-version" value="8.1" />
</widget>
/**
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.
*/
/* jshint node:true, bitwise:true, undef:true, trailing:true, quotmark:true,
indent:4, unused:vars, latedef:nofunc,
sub:true
*/
var et = require('elementtree'),
fs = require('fs');
/** Wraps a config.xml file */
function ConfigParser(path) {
this.path = path;
try {
var contents = fs.readFileSync(path, 'utf-8');
if(contents) {
//Windows is the BOM. Skip the Byte Order Mark.
contents = contents.substring(contents.indexOf('<'));
}
this.doc = new et.ElementTree(et.XML(contents));
} catch (e) {
console.error('Parsing '+path+' failed');
throw e;
}
var r = this.doc.getroot();
if (r.tag !== 'widget') {
throw new Error(path + ' has incorrect root node name (expected "widget", was "' + r.tag + '")');
}
}
function getNodeTextSafe(el) {
return el && el.text && el.text.trim();
}
function findOrCreate(doc, name) {
var ret = doc.find(name);
if (!ret) {
ret = new et.Element(name);
doc.getroot().append(ret);
}
return ret;
}
ConfigParser.prototype = {
packageName: function(id) {
return this.doc.getroot().attrib['id'];
},
setPackageName: function(id) {
this.doc.getroot().attrib['id'] = id;
},
name: function() {
return getNodeTextSafe(this.doc.find('name'));
},
setName: function(name) {
var el = findOrCreate(this.doc, 'name');
el.text = name;
},
startPage: function() {
var content = this.doc.find('content');
if (content) {
return content.attrib.src;
}
return null;
},
description: function() {
return this.doc.find('description').text.trim();
},
setDescription: function(text) {
var el = findOrCreate(this.doc, 'description');
el.text = text;
},
version: function() {
return this.doc.getroot().attrib['version'];
},
android_versionCode: function() {
return this.doc.getroot().attrib['android-versionCode'];
},
ios_CFBundleVersion: function() {
return this.doc.getroot().attrib['ios-CFBundleVersion'];
},
setVersion: function(value) {
this.doc.getroot().attrib['version'] = value;
},
author: function() {
return getNodeTextSafe(this.doc.find('author'));
},
getPreference: function(name) {
var preferences = this.doc.findall('preference');
var ret = null;
preferences.forEach(function (preference) {
// Take the last one that matches.
if (preference.attrib.name.toLowerCase() === name.toLowerCase()) {
ret = preference.attrib.value;
}
});
return ret;
},
/**
* Returns all resources.
* @param {string} resourceName Type of static resources to return.
* "icon" and "splash" currently supported.
* @return {Array} Resources for the platform specified.
*/
getStaticResources: function(resourceName) {
return this.doc.findall(resourceName).map(function (elt) {
var res = {};
res.src = elt.attrib.src;
res.target = elt.attrib.target;
res.density = elt.attrib['density'] || elt.attrib['cdv:density'] || elt.attrib['gap:density'];
res.platform = elt.platform || null; // null means icon represents default icon (shared between platforms)
res.width = elt.attrib.width;
res.height = elt.attrib.height;
return res;
});
},
/**
* Returns all defined icons.
* @return {Resource[]} Array of icon objects.
*/
getIcons: function() {
return this.getStaticResources('icon');
},
/**
* Returns all defined splash images.
* @return {Resource[]} Array of Splash objects.
*/
getSplashScreens: function() {
return this.getStaticResources('splash');
},
/**
* Returns all access rules.
* @return {string[]} Array of access rules.
*/
getAccessRules: function() {
var rules = this.doc.getroot().findall('access');
var ret = [];
rules.forEach(function (rule) {
if (rule.attrib.origin) {
ret.push(rule.attrib.origin);
}
});
return ret;
},
// Returns the widget defaultLocale
defaultLocale: function() {
return this.doc.getroot().attrib['defaultlocale'];
}
};
module.exports = ConfigParser;
/*
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.
*/
var Q = require('Q'),
path = require('path'),
exec = require('./exec'),
spawn = require('./spawn');
function MSBuildTools (version, path) {
this.version = version;
this.path = path;
}
MSBuildTools.prototype.buildProject = function(projFile, buildType, buildarch) {
console.log('Building project: ' + projFile);
console.log('\tConfiguration : ' + buildType);
console.log('\tPlatform : ' + buildarch);
var args = ['/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal', '/nologo',
'/p:Configuration=' + buildType,
'/p:Platform=' + buildarch,
'/p:BuildFromCordovaTooling=' + true];
return spawn(path.join(this.path, 'msbuild'), [projFile].concat(args));
};
// returns full path to msbuild tools required to build the project and tools version
module.exports.findAvailableVersion = function () {
var versions = ['14.0', '12.0', '4.0'];
return Q.all(versions.map(checkMSBuildVersion)).then(function (versions) {
// select first msbuild version available, and resolve promise with it
var msbuildTools = versions[0] || versions[1] || versions[2];
return msbuildTools ? Q.resolve(msbuildTools) : Q.reject('MSBuild tools not found');
});
};
function checkMSBuildVersion(version) {
var deferred = Q.defer();
exec('reg query HKLM\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\' + version + ' /v MSBuildToolsPath')
.then(function(output) {
// fetch msbuild path from 'reg' output
var path = /MSBuildToolsPath\s+REG_SZ\s+(.*)/i.exec(output);
if (path) {
deferred.resolve(new MSBuildTools(version, path[1]));
return;
}
deferred.resolve(null); // not found
}, function (err) {
// if 'reg' exits with error, assume that registry key not found
deferred.resolve(null);
});
return deferred.promise;
}
\ No newline at end of file
<#
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.
#>
$code = @"
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace StoreAppRunner
{
public enum ActivateOptions
{
None = 0,
DesignMode = 0x1,
NoErrorUI = 0x2,
NoSplashScreen = 0x4
}
[ComImport]
[Guid("2e941141-7f97-4756-ba1d-9decde894a3d")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IApplicationActivationManager
{
IntPtr ActivateApplication([In] String appUserModelId, [In] String arguments, [In] ActivateOptions options, [Out] out UInt32 processId);
IntPtr ActivateForFile([In] String appUserModelId, [In] IntPtr itemArray, [In] String verb, [Out] out UInt32 processId);
IntPtr ActivateForProtocol([In] String appUserModelId, [In] IntPtr itemArray, [Out] out UInt32 processId);
}
[ComImport]
[Guid("45BA127D-10A8-46EA-8AB7-56EA9078943C")]
public class ApplicationActivationManager : IApplicationActivationManager
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public extern IntPtr ActivateApplication([In] String appUserModelId, [In] String arguments, [In] ActivateOptions options, [Out] out UInt32 processId);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public extern IntPtr ActivateForFile([In] String appUserModelId, [In] IntPtr itemArray, [In] String verb, [Out] out UInt32 processId);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public extern IntPtr ActivateForProtocol([In] String appUserModelId, [In] IntPtr itemArray, [Out] out UInt32 processId);
}
}
"@
function Uninstall-App {
param(
[Parameter(Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)]
[string] $ID <# package.appxmanifest//Identity@name #>
)
$package = Get-AppxPackage $ID
if($package) {
Remove-AppxPackage $package.PackageFullName
}
}
#
# Checks whether the machine is missing a valid developer license.
#
function CheckIfNeedDeveloperLicense
{
$Result = $true
try
{
$Result = (Get-WindowsDeveloperLicense | Where-Object { $_.IsValid }).Count -eq 0
}
catch {}
return $Result
}
#
# Checks whether the package certificate must be installed on the machine.
#
function CheckIfNeedInstallCertificate
{
param(
[Parameter(Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)]
[string] $ScriptDir <# Full path to the dir where Add-AppDevPackage.ps1 is stored #>
)
$PackagePath = Get-ChildItem (Join-Path $ScriptDir "*.appx") | Where-Object { $_.Mode -NotMatch "d" }
$BundlePath = Get-ChildItem (Join-Path $ScriptDir "*.appxbundle") | Where-Object { $_.Mode -NotMatch "d" }
# There must be exactly 1 package/bundle
if (($PackagePath.Count + $BundlePath.Count) -lt 1)
{
Throw "The app package has not been found at dir $ScriptDir"
}
if (($PackagePath.Count + $BundlePath.Count) -gt 1)
{
Throw "To many app packages have been found at dir $ScriptDir"
}
if ($PackagePath.Count -ne 1) # there is *.appxbundle
{
$PackagePath = $BundlePath
}
$PackageSignature = (Get-AuthenticodeSignature $PackagePath)
$Valid = ($PackageSignature -and $PackageSignature.Status -eq "Valid")
return (-not $Valid)
}
function Install-App {
param(
[Parameter(Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)]
[string] $Path <# Full path to Add-AppDevPackage.ps1 #>
)
if ((CheckIfNeedDeveloperLicense) -or (CheckIfNeedInstallCertificate (Join-Path $Path "..")))
{
# we can't run the script with -force param if license/certificate installation step is required
Invoke-Expression ("& `"$Path`"")
}
else
{
Invoke-Expression ("& `"$Path`" -force")
}
}
function Start-Locally {
param(
[Parameter(Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)]
[string] $ID <# package.appxmanifest//Identity@name #>
)
$package = Get-AppxPackage $ID
$manifest = Get-appxpackagemanifest $package
$applicationUserModelId = $package.PackageFamilyName + "!" + $manifest.package.applications.application.id
Write-Host "ActivateApplication: " $applicationUserModelId
add-type -TypeDefinition $code
$appActivator = new-object StoreAppRunner.ApplicationActivationManager
$appActivator.ActivateApplication($applicationUserModelId,$null,[StoreAppRunner.ActivateOptions]::None,[ref]0) | Out-Null
}
\ No newline at end of file
/*
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.
*/
var Q = require('Q'),
path = require('path'),
nopt = require('nopt'),
utils = require('./utils'),
prepare = require('./prepare'),
MSBuildTools = require('./MSBuildTools'),
ConfigParser = require('./ConfigParser');
// Platform project root folder
var ROOT = path.join(__dirname, '..', '..');
var projFiles = {
phone: 'CordovaApp.Phone.jsproj',
win: 'CordovaApp.Windows.jsproj',
win80: 'CordovaApp.Windows80.jsproj'
};
// parsed nopt arguments
var args;
// build type (Release vs Debug)
var buildType;
// target chip architectures to build for
var buildArchs;
// MSBuild Tools available on this development machine
var msbuild;
// builds cordova-windows application with parameters provided.
// See 'help' function for args list
module.exports.run = function run (argv) {
if (!utils.isCordovaProject(ROOT)){
return Q.reject('Could not find project at ' + ROOT);
}
try {
// thows exception if something goes wrong
parseAndValidateArgs(argv);
} catch (error) {
return Q.reject(error);
}
// update platform as per configuration settings
prepare.applyPlatformConfig();
return MSBuildTools.findAvailableVersion().then(
function(msbuildTools) {
msbuild = msbuildTools;
console.log('MSBuildToolsPath: ' + msbuild.path);
return buildTargets();
});
};
// help/usage function
module.exports.help = function help() {
console.log('');
console.log('Usage: build [ --debug | --release ] [--archs=\"<list of architectures...>\"] [--phone | --win]');
console.log(' --help : Displays this dialog.');
console.log(' --debug : Builds project in debug mode. (Default)');
console.log(' --release : Builds project in release mode.');
console.log(' -r : Shortcut :: builds project in release mode.');
console.log(' --archs : Builds project binaries for specific chip architectures (`anycpu`, `arm`, `x86`, `x64`).');
console.log(' --phone, --win');
console.log(' : Specifies, what type of project to build');
console.log('examples:');
console.log(' build ');
console.log(' build --debug');
console.log(' build --release');
console.log(' build --release --archs="arm x86"');
console.log('');
process.exit(0);
};
function parseAndValidateArgs(argv) {
// parse and validate args
args = nopt({'debug': Boolean, 'release': Boolean, 'archs': [String],
'phone': Boolean, 'win': Boolean}, {'-r': '--release'}, argv);
// Validate args
if (args.debug && args.release) {
throw 'Only one of "debug"/"release" options should be specified';
}
if (args.phone && args.win) {
throw 'Only one of "phone"/"win" options should be specified';
}
// get build options/defaults
buildType = args.release ? 'release' : 'debug';
buildArchs = args.archs ? args.archs.split(' ') : ['anycpu'];
}
function buildTargets() {
// filter targets to make sure they are supported on this development machine
var myBuildTargets = filterSupportedTargets(getBuildTargets(), msbuild);
var buildConfigs = [];
// collect all build configurations (pairs of project to build and target architecture)
myBuildTargets.forEach(function(buildTarget) {
buildArchs.forEach(function(buildArch) {
buildConfigs.push({target:buildTarget, arch: buildArch});
});
});
// run builds serially
return buildConfigs.reduce(function (promise, build) {
return promise.then(function () {
// support for "any cpu" specified with or without space
if (build.arch == 'any cpu') {
build.arch = 'anycpu';
}
// msbuild 4.0 requires .sln file, we can't build jsproj
if (msbuild.version == '4.0' && build.target == projFiles.win80) {
build.target = 'CordovaApp.vs2012.sln';
}
return msbuild.buildProject(path.join(ROOT, build.target), buildType, build.arch);
});
}, Q());
}
function getBuildTargets() {
var config = new ConfigParser(path.join(ROOT, 'config.xml'));
var targets = [];
var noSwitches = !(args.phone || args.win);
// Windows
if (args.win || noSwitches) { // if --win or no arg
var windowsTargetVersion = config.getPreference('windows-target-version');
switch(windowsTargetVersion) {
case '8':
case '8.0':
targets.push(projFiles.win80);
break;
case '8.1':
targets.push(projFiles.win);
break;
default:
throw new Error('Unsupported windows-target-version value: ' + windowsTargetVersion);
}
}
// Windows Phone
if (args.phone || noSwitches) { // if --phone or no arg
var windowsPhoneTargetVersion = config.getPreference('windows-phone-target-version');
switch(windowsPhoneTargetVersion) {
case '8.1':
targets.push(projFiles.phone);
break;
default:
throw new Error('Unsupported windows-phone-target-version value: ' + windowsPhoneTargetVersion);
}
}
return targets;
}
function filterSupportedTargets (targets) {
if (!targets || targets.length === 0) {
console.warn('\r\nNo build targets are specified.');
return [];
}
if (msbuild.version != '4.0') {
return targets;
}
// MSBuild 4.0 does not support Windows 8.1 and Windows Phone 8.1
var supportedTargets = targets.filter(function(target) {
return target != projFiles.win && target != projFiles.phone;
});
// unsupported targets have been detected
if (supportedTargets.length != targets.length) {
console.warn('\r\nWarning. Windows 8.1 and Windows Phone 8.1 target platforms are not supported on this development machine and will be skipped.');
console.warn('Please install OS Windows 8.1 and Visual Studio 2013 Update2 in order to build for Windows 8.1 and Windows Phone 8.1.\r\n');
}
return supportedTargets;
}
/*
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.
*/
var Q = require('q'),
path = require('path'),
shell = require('shelljs');
var ROOT = path.join(__dirname, '..', '..');
// cleans the project, removes AppPackages and build folders.
module.exports.run = function (argv) {
var projectPath = ROOT;
['AppPackages', 'build'].forEach(function(dir) {
shell.rm('-rf', path.join(projectPath, dir));
});
return Q.resolve();
};
\ No newline at end of file
/*
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.
*/
var child_process = require('child_process'),
Q = require('q');
// Takes a command and optional current working directory.
// Returns a promise that either resolves with the stdout, or
// rejects with an error message and the stderr.
module.exports = function(cmd, opt_cwd) {
var d = Q.defer();
try {
child_process.exec(cmd, {cwd: opt_cwd, maxBuffer: 1024000}, function(err, stdout, stderr) {
if (err) d.reject('Error executing "' + cmd + '": ' + stderr);
else d.resolve(stdout);
});
} catch(e) {
console.error('error caught: ' + e);
d.reject(e);
}
return d.promise;
};
:: 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
@ECHO OFF
SET script_path="%~dp0target-list.js"
IF EXIST %script_path% (
node %script_path% %* --devices
) ELSE (
ECHO.
ECHO ERROR: Could not find 'target-list.js' in cordova/lib, aborting...>&2
EXIT /B 1
)
\ No newline at end of file
:: 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
@ECHO OFF
SET script_path="%~dp0target-list.js"
IF EXIST %script_path% (
node %script_path% %* --emulators
) ELSE (
ECHO.
ECHO ERROR: Could not find 'target-list.js' in cordova/lib, aborting...>&2
EXIT /B 1
)
\ No newline at end of file
:: 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
@ECHO OFF
ECHO Sorry, list-started-emulators is not availible yet for Windows. 1>&2
EXIT /B 1
\ No newline at end of file
/*
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.
*/
var Q = require('q'),
fs = require('fs'),
path = require('path'),
exec = require('./exec'),
spawn = require('./spawn'),
utils = require('./utils');
// returns folder that contains package with chip architecture,
// build and project types specified by script parameters
module.exports.getPackage = function (projectType, buildtype, buildArch) {
var appPackages = path.resolve(path.join(__dirname, '..', '..', 'AppPackages'));
// reject promise if apppackages folder doesn't exists
if (!fs.existsSync(appPackages)) {
return Q.reject('AppPackages doesn\'t exists');
}
// find out and resolve paths for all folders inside AppPackages
var pkgDirs = fs.readdirSync(appPackages).map(function(relative) {
// resolve path to folder
return path.join(appPackages, relative);
}).filter(function(pkgDir) {
// check that it is a directory
return fs.statSync(pkgDir).isDirectory();
});
for (var dir in pkgDirs) {
var packageFiles = fs.readdirSync(pkgDirs[dir]).filter(function(e) {
return e.match('.*.(appx|appxbundle)$');
});
for (var pkgFile in packageFiles) {
var packageFile = path.join(pkgDirs[dir], packageFiles[pkgFile]);
var pkgInfo = module.exports.getPackageFileInfo(packageFile);
if (pkgInfo && pkgInfo.type == projectType &&
pkgInfo.arch == buildArch && pkgInfo.buildtype == buildtype) {
// if package's properties are corresponds to properties provided
// resolve the promise with this package's info
return Q.resolve(pkgInfo);
}
}
}
// reject because seems that no corresponding packages found
return Q.reject('Package with specified parameters not found in AppPackages folder');
};
// returns package info object or null if it is not valid package
module.exports.getPackageFileInfo = function (packageFile) {
var pkgName = path.basename(packageFile);
// CordovaApp.Windows_0.0.1.0_anycpu_debug.appx
// CordovaApp.Phone_0.0.1.0_x86_debug.appxbundle
var props = /.*\.(Phone|Windows|Windows80)_((?:\d*\.)*\d*)_(AnyCPU|x64|x86|ARM)(?:_(Debug))?.(appx|appxbundle)$/i.exec(pkgName);
if (props) {
return {type : props[1].toLowerCase(),
arch : props[3].toLowerCase(),
buildtype : props[4] ? props[4].toLowerCase() : 'release',
file : props[1].toLowerCase() != 'phone' ?
path.join(packageFile, '..', 'Add-AppDevPackage.ps1') :
packageFile
};
}
return null;
};
// return package app ID fetched from appxmanifest
// return rejected promise if appxmanifest not valid
module.exports.getAppId = function (platformPath) {
var manifest = path.join(platformPath, 'package.phone.appxmanifest');
try {
return Q.resolve(/PhoneProductId="(.*?)"/gi.exec(fs.readFileSync(manifest, 'utf8'))[1]);
} catch (e) {
return Q.reject('Can\'t read appId from phone manifest' + e);
}
};
// return package name fetched from appxmanifest
// return rejected promise if appxmanifest not valid
module.exports.getPackageName = function (platformPath) {
var manifest = path.join(platformPath, 'package.windows.appxmanifest');
try {
return Q.resolve(/Application Id="(.*?)"/gi.exec(fs.readFileSync(manifest, 'utf8'))[1]);
} catch (e) {
return Q.reject('Can\'t read package name from manifest ' + e);
}
};
// returns one of available devices which name match with provided string
// return rejected promise if device with name specified not found
module.exports.findDevice = function (target) {
target = target.toLowerCase();
return module.exports.listDevices().then(function(deviceList) {
// CB-7617 since we use partial match shorter names should go first,
// example case is ['Emulator 8.1 WVGA 4 inch 512MB', 'Emulator 8.1 WVGA 4 inch']
var sortedList = deviceList.concat().sort(function (l, r) { return l.length > r.length; });
for (var idx in sortedList){
if (sortedList[idx].toLowerCase().indexOf(target) > -1) {
// we should return index based on original list
return Q.resolve(deviceList.indexOf(sortedList[idx]));
}
}
return Q.reject('Specified device not found');
});
};
// returns array of available devices names
module.exports.listDevices = function () {
return utils.getAppDeployUtils().then(function(appDeployUtils) {
return exec('"' + appDeployUtils + '" /enumeratedevices').then(function(output) {
return Q.resolve(output.split('\n').map(function(line) {
var match = /\s*(\d)+\s+(.*)/.exec(line);
return match && match[2];
}).filter(function (line) {
return line;
}));
});
});
};
// deploys specified phone package to device/emulator
module.exports.deployToPhone = function (appxPath, deployTarget) {
var getTarget = deployTarget == 'device' ? Q('de') :
deployTarget == 'emulator' ? Q('xd') : module.exports.findDevice(deployTarget);
// /installlaunch option sometimes fails with 'Error: The parameter is incorrect.'
// so we use separate steps to /install and then /launch
return getTarget.then(function(target) {
return utils.getAppDeployUtils().then(function(appDeployUtils) {
console.log('Installing application');
return spawn(appDeployUtils, ['/install', appxPath, '/targetdevice:' + target]).then(function() {
// TODO: resolve AppId without specifying project root;
return module.exports.getAppId(path.join(__dirname, '..', '..'));
}).then(function(appId) {
console.log('Running application');
return spawn(appDeployUtils, ['/launch', appId, '/targetdevice:' + target]);
});
});
});
};
// deploys specified package to desktop
module.exports.deployToDesktop = function (appxScript, deployTarget) {
if (deployTarget != 'device' && deployTarget != 'emulator') {
return Q.reject('Deploying desktop apps to specific target not supported');
}
return utils.getAppStoreUtils().then(function(appStoreUtils) {
return module.exports.getPackageName(path.join(__dirname, '..', '..')).then(function(pkgname) {
// uninstalls previous application instance (if exists)
console.log('Attempt to uninstall previous application version...');
return spawn('powershell', ['-ExecutionPolicy', 'RemoteSigned', 'Import-Module "' + appStoreUtils + '"; Uninstall-App ' + pkgname])
.then(function() {
console.log('Attempt to install application...');
return spawn('powershell', ['-ExecutionPolicy', 'RemoteSigned', 'Import-Module "' + appStoreUtils + '"; Install-App', utils.quote(appxScript)]);
}).then(function() {
console.log('Starting application...');
return spawn('powershell', ['-ExecutionPolicy', 'RemoteSigned', 'Import-Module "' + appStoreUtils + '"; Start-Locally', pkgname]);
});
});
});
};
/*
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.
*/
var Q = require('q'),
nopt = require('nopt'),
path = require('path'),
build = require('./build'),
utils = require('./utils'),
ConfigParser = require('./ConfigParser'),
packages = require('./package');
var ROOT = path.join(__dirname, '..', '..');
module.exports.run = function (argv) {
if (!utils.isCordovaProject(ROOT)){
return Q.reject('Could not find project at ' + ROOT);
}
// parse args
var args = nopt({'debug': Boolean, 'release': Boolean, 'nobuild': Boolean,
'device': Boolean, 'emulator': Boolean, 'target': String, 'archs': String,
'phone': Boolean, 'win': Boolean}, {'r' : '--release'}, argv);
// Validate args
if (args.debug && args.release) {
return Q.reject('Only one of "debug"/"release" options should be specified');
}
if ((args.device && args.emulator) || ((args.device || args.emulator) && args.target)) {
return Q.reject('Only one of "device"/"emulator"/"target" options should be specified');
}
if (args.phone && args.win) {
return Q.reject('Only one of "phone"/"win" options should be specified');
}
// Get build/deploy options
var buildType = args.release ? 'release' : 'debug',
buildArchs = args.archs ? args.archs.split(' ') : ['anycpu'],
projectType = args.phone ? 'phone' : 'windows',
deployTarget = args.target ? args.target : args.device ? 'device' : 'emulator';
// for win switch we should correctly handle 8.0 and 8.1 version as per configuration
if (projectType == 'windows' && getWindowsTargetVersion() == '8.0') {
projectType = 'windows80';
}
// if --nobuild isn't specified then build app first
var buildPackages = args.nobuild ? Q() : build.run(argv);
return buildPackages.then(function () {
return packages.getPackage(projectType, buildType, buildArchs[0]);
}).then(function(pkg) {
console.log('\nDeploying ' + pkg.type + ' package to ' + deployTarget + ':\n' + pkg.file);
return pkg.type == 'phone' ?
packages.deployToPhone(pkg.file, deployTarget) :
packages.deployToDesktop(pkg.file, deployTarget);
});
};
module.exports.help = function () {
console.log('\nUsage: run [ --device | --emulator | --target=<id> ] [ --debug | --release | --nobuild ]');
console.log(' [ --x86 | --x64 | --arm ] [--phone | --win]');
console.log(' --device : Deploys and runs the project on the connected device.');
console.log(' --emulator : Deploys and runs the project on an emulator.');
console.log(' --target=<id> : Deploys and runs the project on the specified target.');
console.log(' --debug : Builds project in debug mode.');
console.log(' --release : Builds project in release mode.');
console.log(' --nobuild : Uses pre-built package, or errors if project is not built.');
console.log(' --archs : Specific chip architectures (`anycpu`, `arm`, `x86`, `x64`).');
console.log(' --phone, --win');
console.log(' : Specifies project type to deploy');
console.log('');
console.log('Examples:');
console.log(' run');
console.log(' run --emulator');
console.log(' run --device');
console.log(' run --target=7988B8C3-3ADE-488d-BA3E-D052AC9DC710');
console.log(' run --device --release');
console.log(' run --emulator --debug');
console.log('');
process.exit(0);
};
function getWindowsTargetVersion() {
var config = new ConfigParser(path.join(ROOT, 'config.xml'));
var windowsTargetVersion = config.getPreference('windows-target-version');
switch(windowsTargetVersion) {
case '8':
case '8.0':
return '8.0';
case '8.1':
return '8.1';
default:
throw new Error('Unsupported windows-target-version value: ' + windowsTargetVersion);
}
}
\ No newline at end of file
/*
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.
*/
var Q = require('q'),
proc = require('child_process');
// Takes a command and optional current working directory.
module.exports = function(cmd, args, opt_cwd) {
var d = Q.defer();
try {
var child = proc.spawn(cmd, args, {cwd: opt_cwd, stdio: 'inherit'});
child.on('exit', function(code) {
if (code) {
d.reject('Error code ' + code + ' for command: ' + cmd + ' with args: ' + args);
} else {
d.resolve();
}
});
} catch(e) {
console.error('error caught: ' + e);
d.reject(e);
}
return d.promise;
};
/*
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.
*/
var devices = require('./package'),
args = process.argv.slice(2);
// help/usage function
function help() {
console.log('');
console.log('Usage: node target-list.js [ --emulators | --devices | --started_emulators | --all ]');
console.log(' --emulators : List the possible target emulators availible.');
console.log(' --devices : List the possible target devices availible. *NOT IMPLEMENTED YET*');
console.log(' --started_emulators : List any started emulators availible. *NOT IMPLEMENTED YET*');
console.log(' --all : List all available devices');
console.log('examples:');
console.log(' node target-list.js --emulators');
console.log(' node target-list.js --devices');
console.log(' node target-list.js --started_emulators');
console.log(' node target-list.js --all');
console.log('');
}
// Handle help flag
if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(args[0]) > -1) {
help();
} else {
devices.listDevices()
.then(function (deviceList) {
deviceList.forEach(function (device) {
console.log(device);
});
});
}
\ No newline at end of file
/*
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.
*/
/* jshint sub:true */
var Q = require('Q'),
fs = require('fs'),
path = require('path'),
exec = require('./exec'),
spawn = require('./spawn');
// returns full path to msbuild tools required to build the project and tools version
module.exports.getMSBuildTools = function () {
var versions = ['12.0', '4.0'];
// create chain of promises, which returns specific msbuild version object
// or null, if specific msbuild path not found in registry
return Q.all(versions.map(function (version) {
return exec(
'reg query HKLM\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\' + version + ' /v MSBuildToolsPath'
).then(function(output) {
// fetch msbuild path from 'reg' output
var msbPath = /MSBuildToolsPath\s+REG_SZ\s+(.*)/i.exec(output);
if (msbPath) {
return {version: version, path: msbPath[1]};
}
return null;
});
})).then(function (versions) {
// select first msbuild version available, and resolve promise with it
return versions[0] || versions[1] ?
Q.resolve(versions[0] || versions[1]) :
// Reject promise if no msbuild versions found
Q.reject('MSBuild tools not found');
});
};
// unblocks and returns path to WindowsStoreAppUtils.ps1
// which provides helper functions to install/unistall/start Windows Store app
module.exports.getAppStoreUtils = function () {
var appStoreUtils = path.join(__dirname, 'WindowsStoreAppUtils.ps1');
if (!fs.existsSync (appStoreUtils)) {
return Q.reject('Can\'t unblock AppStoreUtils script');
}
//console.log("Removing execution restrictions from AppStoreUtils...");
return spawn('powershell', ['Unblock-File', module.exports.quote(appStoreUtils)]).then(function () {
return Q.resolve(appStoreUtils);
}).fail(function (err) {
return Q.reject(err);
});
};
// returns path to AppDeploy util from Windows Phone 8.1 SDK
module.exports.getAppDeployUtils = function () {
var appDeployUtils = path.join((process.env['ProgramFiles(x86)'] || process.env['ProgramFiles']),
'Microsoft SDKs', 'Windows Phone', 'v8.1', 'Tools', 'AppDeploy', 'AppDeployCmd.exe');
// Check if AppDeployCmd is exists
if (!fs.existsSync(appDeployUtils)) {
console.warn('WARNING: AppDeploy tool (AppDeployCmd.exe) didn\'t found. Assume that it\'s in %PATH%');
return Q.resolve('AppDeployCmd');
}
return Q.resolve(appDeployUtils);
};
// checks to see if a .jsproj file exists in the project root
module.exports.isCordovaProject = function (platformpath) {
if (fs.existsSync(platformpath)) {
var files = fs.readdirSync(platformpath);
for (var i in files){
if (path.extname(files[i]) == '.shproj'){
return true;
}
}
}
return false;
};
module.exports.quote = function(str) {
return '"' + str + '"';
};
:: 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
@ECHO OFF
ECHO Sorry, logging is not supported for Windows. 1>&2
EXIT /B 1
\ No newline at end of file
language: node_js
node_js:
- 0.6
script: make test
notifications:
email:
- tomaz+travisci@tomaz.me
elementtree v0.1.5 (in development)
* Fix a bug in the find() and findtext() method which could manifest itself
under some conditions.
[metagriffin]
elementtree v0.1.4
* Allow user to use namespaced attributes when using find* functions.
[Andrew Lunny]
elementtree v0.1.3
* Improve the output of text content in the tags (strip unnecessary line break
characters).
[Darryl Pogue]
elementtree v0.1.2
* Allow user to pass 'indent' option to ElementTree.write method. If this
option is specified (e.g. {'indent': 4}). XML will be pretty printed.
[Darryl Pogue, Tomaz Muraus]
* Bump sax dependency version.
elementtree v0.1.1 - 2011-09-23
* Improve special character escaping.
[Ryan Phillips]
elementtree v0.1.0 - 2011-09-05
* Initial release.
TESTS := \
tests/test-simple.js
PATH := ./node_modules/.bin:$(PATH)
WHISKEY := $(shell bash -c 'PATH=$(PATH) type -p whiskey')
default: test
test:
NODE_PATH=`pwd`/lib/ ${WHISKEY} --scope-leaks --sequential --real-time --tests "${TESTS}"
tap:
NODE_PATH=`pwd`/lib/ ${WHISKEY} --test-reporter tap --sequential --real-time --tests "${TESTS}"
coverage:
NODE_PATH=`pwd`/lib/ ${WHISKEY} --sequential --coverage --coverage-reporter html --coverage-dir coverage_html --tests "${TESTS}"
.PHONY: default test coverage tap scope
node-elementtree
Copyright (c) 2011, Rackspace, Inc.
The ElementTree toolkit is Copyright (c) 1999-2007 by Fredrik Lundh
node-elementtree
====================
node-elementtree is a [Node.js](http://nodejs.org) XML parser and serializer based upon the [Python ElementTree v1.3](http://effbot.org/zone/element-index.htm) module.
Installation
====================
$ npm install elementtree
Using the library
====================
For the usage refer to the Python ElementTree library documentation - [http://effbot.org/zone/element-index.htm#usage](http://effbot.org/zone/element-index.htm#usage).
Supported XPath expressions in `find`, `findall` and `findtext` methods are listed on [http://effbot.org/zone/element-xpath.htm](http://effbot.org/zone/element-xpath.htm).
Build status
====================
[![Build Status](https://secure.travis-ci.org/racker/node-elementtree.png)](http://travis-ci.org/racker/node-elementtree)
License
====================
node-elementtree is distributed under the [Apache license](http://www.apache.org/licenses/LICENSE-2.0.html).
/*
* Copyright 2011 Rackspace
*
* 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.
*
*/
var DEFAULT_PARSER = 'sax';
exports.DEFAULT_PARSER = DEFAULT_PARSER;
/**
* Copyright 2011 Rackspace
*
* 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.
*
*/
var sprintf = require('./sprintf').sprintf;
var utils = require('./utils');
var SyntaxError = require('./errors').SyntaxError;
var _cache = {};
var RE = new RegExp(
"(" +
"'[^']*'|\"[^\"]*\"|" +
"::|" +
"//?|" +
"\\.\\.|" +
"\\(\\)|" +
"[/.*:\\[\\]\\(\\)@=])|" +
"((?:\\{[^}]+\\})?[^/\\[\\]\\(\\)@=\\s]+)|" +
"\\s+", 'g'
);
var xpath_tokenizer = utils.findall.bind(null, RE);
function prepare_tag(next, token) {
var tag = token[0];
function select(context, result) {
var i, len, elem, rv = [];
for (i = 0, len = result.length; i < len; i++) {
elem = result[i];
elem._children.forEach(function(e) {
if (e.tag === tag) {
rv.push(e);
}
});
}
return rv;
}
return select;
}
function prepare_star(next, token) {
function select(context, result) {
var i, len, elem, rv = [];
for (i = 0, len = result.length; i < len; i++) {
elem = result[i];
elem._children.forEach(function(e) {
rv.push(e);
});
}
return rv;
}
return select;
}
function prepare_dot(next, token) {
function select(context, result) {
var i, len, elem, rv = [];
for (i = 0, len = result.length; i < len; i++) {
elem = result[i];
rv.push(elem);
}
return rv;
}
return select;
}
function prepare_iter(next, token) {
var tag;
token = next();
if (token[1] === '*') {
tag = '*';
}
else if (!token[1]) {
tag = token[0] || '';
}
else {
throw new SyntaxError(token);
}
function select(context, result) {
var i, len, elem, rv = [];
for (i = 0, len = result.length; i < len; i++) {
elem = result[i];
elem.iter(tag, function(e) {
if (e !== elem) {
rv.push(e);
}
});
}
return rv;
}
return select;
}
function prepare_dot_dot(next, token) {
function select(context, result) {
var i, len, elem, rv = [], parent_map = context.parent_map;
if (!parent_map) {
context.parent_map = parent_map = {};
context.root.iter(null, function(p) {
p._children.forEach(function(e) {
parent_map[e] = p;
});
});
}
for (i = 0, len = result.length; i < len; i++) {
elem = result[i];
if (parent_map.hasOwnProperty(elem)) {
rv.push(parent_map[elem]);
}
}
return rv;
}
return select;
}
function prepare_predicate(next, token) {
var tag, key, value, select;
token = next();
if (token[1] === '@') {
// attribute
token = next();
if (token[1]) {
throw new SyntaxError(token, 'Invalid attribute predicate');
}
key = token[0];
token = next();
if (token[1] === ']') {
select = function(context, result) {
var i, len, elem, rv = [];
for (i = 0, len = result.length; i < len; i++) {
elem = result[i];
if (elem.get(key)) {
rv.push(elem);
}
}
return rv;
};
}
else if (token[1] === '=') {
value = next()[1];
if (value[0] === '"' || value[value.length - 1] === '\'') {
value = value.slice(1, value.length - 1);
}
else {
throw new SyntaxError(token, 'Ivalid comparison target');
}
token = next();
select = function(context, result) {
var i, len, elem, rv = [];
for (i = 0, len = result.length; i < len; i++) {
elem = result[i];
if (elem.get(key) === value) {
rv.push(elem);
}
}
return rv;
};
}
if (token[1] !== ']') {
throw new SyntaxError(token, 'Invalid attribute predicate');
}
}
else if (!token[1]) {
tag = token[0] || '';
token = next();
if (token[1] !== ']') {
throw new SyntaxError(token, 'Invalid node predicate');
}
select = function(context, result) {
var i, len, elem, rv = [];
for (i = 0, len = result.length; i < len; i++) {
elem = result[i];
if (elem.find(tag)) {
rv.push(elem);
}
}
return rv;
};
}
else {
throw new SyntaxError(null, 'Invalid predicate');
}
return select;
}
var ops = {
"": prepare_tag,
"*": prepare_star,
".": prepare_dot,
"..": prepare_dot_dot,
"//": prepare_iter,
"[": prepare_predicate,
};
function _SelectorContext(root) {
this.parent_map = null;
this.root = root;
}
function findall(elem, path) {
var selector, result, i, len, token, value, select, context;
if (_cache.hasOwnProperty(path)) {
selector = _cache[path];
}
else {
// TODO: Use smarter cache purging approach
if (Object.keys(_cache).length > 100) {
_cache = {};
}
if (path.charAt(0) === '/') {
throw new SyntaxError(null, 'Cannot use absolute path on element');
}
result = xpath_tokenizer(path);
selector = [];
function getToken() {
return result.shift();
}
token = getToken();
while (true) {
var c = token[1] || '';
value = ops[c](getToken, token);
if (!value) {
throw new SyntaxError(null, sprintf('Invalid path: %s', path));
}
selector.push(value);
token = getToken();
if (!token) {
break;
}
else if (token[1] === '/') {
token = getToken();
}
if (!token) {
break;
}
}
_cache[path] = selector;
}
// Execute slector pattern
result = [elem];
context = new _SelectorContext(elem);
for (i = 0, len = selector.length; i < len; i++) {
select = selector[i];
result = select(context, result);
}
return result || [];
}
function find(element, path) {
var resultElements = findall(element, path);
if (resultElements && resultElements.length > 0) {
return resultElements[0];
}
return null;
}
function findtext(element, path, defvalue) {
var resultElements = findall(element, path);
if (resultElements && resultElements.length > 0) {
return resultElements[0].text;
}
return defvalue;
}
exports.find = find;
exports.findall = findall;
exports.findtext = findtext;
/**
* Copyright 2011 Rackspace
*
* 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.
*
*/
var util = require('util');
var sprintf = require('./sprintf').sprintf;
function SyntaxError(token, msg) {
msg = msg || sprintf('Syntax Error at token %s', token.toString());
this.token = token;
this.message = msg;
Error.call(this, msg);
}
util.inherits(SyntaxError, Error);
exports.SyntaxError = SyntaxError;
/*
* Copyright 2011 Rackspace
*
* 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.
*
*/
/* TODO: support node-expat C++ module optionally */
var util = require('util');
var parsers = require('./parsers/index');
function get_parser(name) {
if (name === 'sax') {
return parsers.sax;
}
else {
throw new Error('Invalid parser: ' + name);
}
}
exports.get_parser = get_parser;
var util = require('util');
var sax = require('sax');
var TreeBuilder = require('./../treebuilder').TreeBuilder;
function XMLParser(target) {
this.parser = sax.parser(true);
this.target = (target) ? target : new TreeBuilder();
this.parser.onopentag = this._handleOpenTag.bind(this);
this.parser.ontext = this._handleText.bind(this);
this.parser.oncdata = this._handleCdata.bind(this);
this.parser.ondoctype = this._handleDoctype.bind(this);
this.parser.oncomment = this._handleComment.bind(this);
this.parser.onclosetag = this._handleCloseTag.bind(this);
this.parser.onerror = this._handleError.bind(this);
}
XMLParser.prototype._handleOpenTag = function(tag) {
this.target.start(tag.name, tag.attributes);
};
XMLParser.prototype._handleText = function(text) {
this.target.data(text);
};
XMLParser.prototype._handleCdata = function(text) {
this.target.data(text);
};
XMLParser.prototype._handleDoctype = function(text) {
};
XMLParser.prototype._handleComment = function(comment) {
};
XMLParser.prototype._handleCloseTag = function(tag) {
this.target.end(tag);
};
XMLParser.prototype._handleError = function(err) {
throw err;
};
XMLParser.prototype.feed = function(chunk) {
this.parser.write(chunk);
};
XMLParser.prototype.close = function() {
this.parser.close();
return this.target.close();
};
exports.XMLParser = XMLParser;
/*
* Copyright 2011 Rackspace
*
* 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.
*
*/
var cache = {};
// Do any others need escaping?
var TO_ESCAPE = {
'\'': '\\\'',
'\n': '\\n'
};
function populate(formatter) {
var i, type,
key = formatter,
prev = 0,
arg = 1,
builder = 'return \'';
for (i = 0; i < formatter.length; i++) {
if (formatter[i] === '%') {
type = formatter[i + 1];
switch (type) {
case 's':
builder += formatter.slice(prev, i) + '\' + arguments[' + arg + '] + \'';
prev = i + 2;
arg++;
break;
case 'j':
builder += formatter.slice(prev, i) + '\' + JSON.stringify(arguments[' + arg + ']) + \'';
prev = i + 2;
arg++;
break;
case '%':
builder += formatter.slice(prev, i + 1);
prev = i + 2;
i++;
break;
}
} else if (TO_ESCAPE[formatter[i]]) {
builder += formatter.slice(prev, i) + TO_ESCAPE[formatter[i]];
prev = i + 1;
}
}
builder += formatter.slice(prev) + '\';';
cache[key] = new Function(builder);
}
/**
* A fast version of sprintf(), which currently only supports the %s and %j.
* This caches a formatting function for each format string that is used, so
* you should only use this sprintf() will be called many times with a single
* format string and a limited number of format strings will ever be used (in
* general this means that format strings should be string literals).
*
* @param {String} formatter A format string.
* @param {...String} var_args Values that will be formatted by %s and %j.
* @return {String} The formatted output.
*/
exports.sprintf = function(formatter, var_args) {
if (!cache[formatter]) {
populate(formatter);
}
return cache[formatter].apply(null, arguments);
};
function TreeBuilder(element_factory) {
this._data = [];
this._elem = [];
this._last = null;
this._tail = null;
if (!element_factory) {
/* evil circular dep */
element_factory = require('./elementtree').Element;
}
this._factory = element_factory;
}
TreeBuilder.prototype.close = function() {
return this._last;
};
TreeBuilder.prototype._flush = function() {
if (this._data) {
if (this._last !== null) {
var text = this._data.join("");
if (this._tail) {
this._last.tail = text;
}
else {
this._last.text = text;
}
}
this._data = [];
}
};
TreeBuilder.prototype.data = function(data) {
this._data.push(data);
};
TreeBuilder.prototype.start = function(tag, attrs) {
this._flush();
var elem = this._factory(tag, attrs);
this._last = elem;
if (this._elem.length) {
this._elem[this._elem.length - 1].append(elem);
}
this._elem.push(elem);
this._tail = null;
};
TreeBuilder.prototype.end = function(tag) {
this._flush();
this._last = this._elem.pop();
if (this._last.tag !== tag) {
throw new Error("end tag mismatch");
}
this._tail = 1;
return this._last;
};
exports.TreeBuilder = TreeBuilder;
/**
* Copyright 2011 Rackspace
*
* 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.
*
*/
/**
* @param {Object} hash.
* @param {Array} ignored.
*/
function items(hash, ignored) {
ignored = ignored || null;
var k, rv = [];
function is_ignored(key) {
if (!ignored || ignored.length === 0) {
return false;
}
return ignored.indexOf(key);
}
for (k in hash) {
if (hash.hasOwnProperty(k) && !(is_ignored(ignored))) {
rv.push([k, hash[k]]);
}
}
return rv;
}
function findall(re, str) {
var match, matches = [];
while ((match = re.exec(str))) {
matches.push(match);
}
return matches;
}
function merge(a, b) {
var c = {}, attrname;
for (attrname in a) {
if (a.hasOwnProperty(attrname)) {
c[attrname] = a[attrname];
}
}
for (attrname in b) {
if (b.hasOwnProperty(attrname)) {
c[attrname] = b[attrname];
}
}
return c;
}
exports.items = items;
exports.findall = findall;
exports.merge = merge;
# contributors sorted by whether or not they're me.
Isaac Z. Schlueter <i@izs.me>
Stein Martin Hustad <stein@hustad.com>
Mikeal Rogers <mikeal.rogers@gmail.com>
Laurie Harper <laurie@holoweb.net>
Jann Horn <jann@Jann-PC.fritz.box>
Elijah Insua <tmpvar@gmail.com>
Henry Rawas <henryr@schakra.com>
Justin Makeig <jmpublic@makeig.com>
Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
All rights reserved.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
# sax js
A sax-style parser for XML and HTML.
Designed with [node](http://nodejs.org/) in mind, but should work fine in
the browser or other CommonJS implementations.
## What This Is
* A very simple tool to parse through an XML string.
* A stepping stone to a streaming HTML parser.
* A handy way to deal with RSS and other mostly-ok-but-kinda-broken XML
docs.
## What This Is (probably) Not
* An HTML Parser - That's a fine goal, but this isn't it. It's just
XML.
* A DOM Builder - You can use it to build an object model out of XML,
but it doesn't do that out of the box.
* XSLT - No DOM = no querying.
* 100% Compliant with (some other SAX implementation) - Most SAX
implementations are in Java and do a lot more than this does.
* An XML Validator - It does a little validation when in strict mode, but
not much.
* A Schema-Aware XSD Thing - Schemas are an exercise in fetishistic
masochism.
* A DTD-aware Thing - Fetching DTDs is a much bigger job.
## Regarding `<!DOCTYPE`s and `<!ENTITY`s
The parser will handle the basic XML entities in text nodes and attribute
values: `&amp; &lt; &gt; &apos; &quot;`. It's possible to define additional
entities in XML by putting them in the DTD. This parser doesn't do anything
with that. If you want to listen to the `ondoctype` event, and then fetch
the doctypes, and read the entities and add them to `parser.ENTITIES`, then
be my guest.
Unknown entities will fail in strict mode, and in loose mode, will pass
through unmolested.
## Usage
var sax = require("./lib/sax"),
strict = true, // set to false for html-mode
parser = sax.parser(strict);
parser.onerror = function (e) {
// an error happened.
};
parser.ontext = function (t) {
// got some text. t is the string of text.
};
parser.onopentag = function (node) {
// opened a tag. node has "name" and "attributes"
};
parser.onattribute = function (attr) {
// an attribute. attr has "name" and "value"
};
parser.onend = function () {
// parser stream is done, and ready to have more stuff written to it.
};
parser.write('<xml>Hello, <who name="world">world</who>!</xml>').close();
// stream usage
// takes the same options as the parser
var saxStream = require("sax").createStream(strict, options)
saxStream.on("error", function (e) {
// unhandled errors will throw, since this is a proper node
// event emitter.
console.error("error!", e)
// clear the error
this._parser.error = null
this._parser.resume()
})
saxStream.on("opentag", function (node) {
// same object as above
})
// pipe is supported, and it's readable/writable
// same chunks coming in also go out.
fs.createReadStream("file.xml")
.pipe(saxStream)
.pipe(fs.createReadStream("file-copy.xml"))
## Arguments
Pass the following arguments to the parser function. All are optional.
`strict` - Boolean. Whether or not to be a jerk. Default: `false`.
`opt` - Object bag of settings regarding string formatting. All default to `false`.
Settings supported:
* `trim` - Boolean. Whether or not to trim text and comment nodes.
* `normalize` - Boolean. If true, then turn any whitespace into a single
space.
* `lowercasetags` - Boolean. If true, then lowercase tags in loose mode,
rather than uppercasing them.
* `xmlns` - Boolean. If true, then namespaces are supported.
## Methods
`write` - Write bytes onto the stream. You don't have to do this all at
once. You can keep writing as much as you want.
`close` - Close the stream. Once closed, no more data may be written until
it is done processing the buffer, which is signaled by the `end` event.
`resume` - To gracefully handle errors, assign a listener to the `error`
event. Then, when the error is taken care of, you can call `resume` to
continue parsing. Otherwise, the parser will not continue while in an error
state.
## Members
At all times, the parser object will have the following members:
`line`, `column`, `position` - Indications of the position in the XML
document where the parser currently is looking.
`startTagPosition` - Indicates the position where the current tag starts.
`closed` - Boolean indicating whether or not the parser can be written to.
If it's `true`, then wait for the `ready` event to write again.
`strict` - Boolean indicating whether or not the parser is a jerk.
`opt` - Any options passed into the constructor.
`tag` - The current tag being dealt with.
And a bunch of other stuff that you probably shouldn't touch.
## Events
All events emit with a single argument. To listen to an event, assign a
function to `on<eventname>`. Functions get executed in the this-context of
the parser object. The list of supported events are also in the exported
`EVENTS` array.
When using the stream interface, assign handlers using the EventEmitter
`on` function in the normal fashion.
`error` - Indication that something bad happened. The error will be hanging
out on `parser.error`, and must be deleted before parsing can continue. By
listening to this event, you can keep an eye on that kind of stuff. Note:
this happens *much* more in strict mode. Argument: instance of `Error`.
`text` - Text node. Argument: string of text.
`doctype` - The `<!DOCTYPE` declaration. Argument: doctype string.
`processinginstruction` - Stuff like `<?xml foo="blerg" ?>`. Argument:
object with `name` and `body` members. Attributes are not parsed, as
processing instructions have implementation dependent semantics.
`sgmldeclaration` - Random SGML declarations. Stuff like `<!ENTITY p>`
would trigger this kind of event. This is a weird thing to support, so it
might go away at some point. SAX isn't intended to be used to parse SGML,
after all.
`opentag` - An opening tag. Argument: object with `name` and `attributes`.
In non-strict mode, tag names are uppercased, unless the `lowercasetags`
option is set. If the `xmlns` option is set, then it will contain
namespace binding information on the `ns` member, and will have a
`local`, `prefix`, and `uri` member.
`closetag` - A closing tag. In loose mode, tags are auto-closed if their
parent closes. In strict mode, well-formedness is enforced. Note that
self-closing tags will have `closeTag` emitted immediately after `openTag`.
Argument: tag name.
`attribute` - An attribute node. Argument: object with `name` and `value`,
and also namespace information if the `xmlns` option flag is set.
`comment` - A comment node. Argument: the string of the comment.
`opencdata` - The opening tag of a `<![CDATA[` block.
`cdata` - The text of a `<![CDATA[` block. Since `<![CDATA[` blocks can get
quite large, this event may fire multiple times for a single block, if it
is broken up into multiple `write()`s. Argument: the string of random
character data.
`closecdata` - The closing tag (`]]>`) of a `<![CDATA[` block.
`opennamespace` - If the `xmlns` option is set, then this event will
signal the start of a new namespace binding.
`closenamespace` - If the `xmlns` option is set, then this event will
signal the end of a namespace binding.
`end` - Indication that the closed stream has ended.
`ready` - Indication that the stream has reset, and is ready to be written
to.
`noscript` - In non-strict mode, `<script>` tags trigger a `"script"`
event, and their contents are not checked for special xml characters.
If you pass `noscript: true`, then this behavior is suppressed.
## Reporting Problems
It's best to write a failing test if you find an issue. I will always
accept pull requests with failing tests if they demonstrate intended
behavior, but it is very hard to figure out what issue you're describing
without a test. Writing a test is also the best way for you yourself
to figure out if you really understand the issue you think you have with
sax-js.
{
"name": "sax",
"description": "An evented streaming XML parser in JavaScript",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
"url": "http://blog.izs.me/"
},
"version": "0.3.5",
"main": "lib/sax.js",
"license": {
"type": "MIT",
"url": "https://raw.github.com/isaacs/sax-js/master/LICENSE"
},
"scripts": {
"test": "node test/index.js"
},
"repository": {
"type": "git",
"url": "git://github.com/isaacs/sax-js.git"
},
"contributors": [
{
"name": "Isaac Z. Schlueter",
"email": "i@izs.me"
},
{
"name": "Stein Martin Hustad",
"email": "stein@hustad.com"
},
{
"name": "Mikeal Rogers",
"email": "mikeal.rogers@gmail.com"
},
{
"name": "Laurie Harper",
"email": "laurie@holoweb.net"
},
{
"name": "Jann Horn",
"email": "jann@Jann-PC.fritz.box"
},
{
"name": "Elijah Insua",
"email": "tmpvar@gmail.com"
},
{
"name": "Henry Rawas",
"email": "henryr@schakra.com"
},
{
"name": "Justin Makeig",
"email": "jmpublic@makeig.com"
}
],
"readme": "# sax js\n\nA sax-style parser for XML and HTML.\n\nDesigned with [node](http://nodejs.org/) in mind, but should work fine in\nthe browser or other CommonJS implementations.\n\n## What This Is\n\n* A very simple tool to parse through an XML string.\n* A stepping stone to a streaming HTML parser.\n* A handy way to deal with RSS and other mostly-ok-but-kinda-broken XML \n docs.\n\n## What This Is (probably) Not\n\n* An HTML Parser - That's a fine goal, but this isn't it. It's just\n XML.\n* A DOM Builder - You can use it to build an object model out of XML,\n but it doesn't do that out of the box.\n* XSLT - No DOM = no querying.\n* 100% Compliant with (some other SAX implementation) - Most SAX\n implementations are in Java and do a lot more than this does.\n* An XML Validator - It does a little validation when in strict mode, but\n not much.\n* A Schema-Aware XSD Thing - Schemas are an exercise in fetishistic \n masochism.\n* A DTD-aware Thing - Fetching DTDs is a much bigger job.\n\n## Regarding `<!DOCTYPE`s and `<!ENTITY`s\n\nThe parser will handle the basic XML entities in text nodes and attribute\nvalues: `&amp; &lt; &gt; &apos; &quot;`. It's possible to define additional\nentities in XML by putting them in the DTD. This parser doesn't do anything\nwith that. If you want to listen to the `ondoctype` event, and then fetch\nthe doctypes, and read the entities and add them to `parser.ENTITIES`, then\nbe my guest.\n\nUnknown entities will fail in strict mode, and in loose mode, will pass\nthrough unmolested.\n\n## Usage\n\n var sax = require(\"./lib/sax\"),\n strict = true, // set to false for html-mode\n parser = sax.parser(strict);\n\n parser.onerror = function (e) {\n // an error happened.\n };\n parser.ontext = function (t) {\n // got some text. t is the string of text.\n };\n parser.onopentag = function (node) {\n // opened a tag. node has \"name\" and \"attributes\"\n };\n parser.onattribute = function (attr) {\n // an attribute. attr has \"name\" and \"value\"\n };\n parser.onend = function () {\n // parser stream is done, and ready to have more stuff written to it.\n };\n\n parser.write('<xml>Hello, <who name=\"world\">world</who>!</xml>').close();\n\n // stream usage\n // takes the same options as the parser\n var saxStream = require(\"sax\").createStream(strict, options)\n saxStream.on(\"error\", function (e) {\n // unhandled errors will throw, since this is a proper node\n // event emitter.\n console.error(\"error!\", e)\n // clear the error\n this._parser.error = null\n this._parser.resume()\n })\n saxStream.on(\"opentag\", function (node) {\n // same object as above\n })\n // pipe is supported, and it's readable/writable\n // same chunks coming in also go out.\n fs.createReadStream(\"file.xml\")\n .pipe(saxStream)\n .pipe(fs.createReadStream(\"file-copy.xml\"))\n\n\n\n## Arguments\n\nPass the following arguments to the parser function. All are optional.\n\n`strict` - Boolean. Whether or not to be a jerk. Default: `false`.\n\n`opt` - Object bag of settings regarding string formatting. All default to `false`.\n\nSettings supported:\n\n* `trim` - Boolean. Whether or not to trim text and comment nodes.\n* `normalize` - Boolean. If true, then turn any whitespace into a single\n space.\n* `lowercasetags` - Boolean. If true, then lowercase tags in loose mode, \n rather than uppercasing them.\n* `xmlns` - Boolean. If true, then namespaces are supported.\n\n## Methods\n\n`write` - Write bytes onto the stream. You don't have to do this all at\nonce. You can keep writing as much as you want.\n\n`close` - Close the stream. Once closed, no more data may be written until\nit is done processing the buffer, which is signaled by the `end` event.\n\n`resume` - To gracefully handle errors, assign a listener to the `error`\nevent. Then, when the error is taken care of, you can call `resume` to\ncontinue parsing. Otherwise, the parser will not continue while in an error\nstate.\n\n## Members\n\nAt all times, the parser object will have the following members:\n\n`line`, `column`, `position` - Indications of the position in the XML\ndocument where the parser currently is looking.\n\n`startTagPosition` - Indicates the position where the current tag starts.\n\n`closed` - Boolean indicating whether or not the parser can be written to.\nIf it's `true`, then wait for the `ready` event to write again.\n\n`strict` - Boolean indicating whether or not the parser is a jerk.\n\n`opt` - Any options passed into the constructor.\n\n`tag` - The current tag being dealt with.\n\nAnd a bunch of other stuff that you probably shouldn't touch.\n\n## Events\n\nAll events emit with a single argument. To listen to an event, assign a\nfunction to `on<eventname>`. Functions get executed in the this-context of\nthe parser object. The list of supported events are also in the exported\n`EVENTS` array.\n\nWhen using the stream interface, assign handlers using the EventEmitter\n`on` function in the normal fashion.\n\n`error` - Indication that something bad happened. The error will be hanging\nout on `parser.error`, and must be deleted before parsing can continue. By\nlistening to this event, you can keep an eye on that kind of stuff. Note:\nthis happens *much* more in strict mode. Argument: instance of `Error`.\n\n`text` - Text node. Argument: string of text.\n\n`doctype` - The `<!DOCTYPE` declaration. Argument: doctype string.\n\n`processinginstruction` - Stuff like `<?xml foo=\"blerg\" ?>`. Argument:\nobject with `name` and `body` members. Attributes are not parsed, as\nprocessing instructions have implementation dependent semantics.\n\n`sgmldeclaration` - Random SGML declarations. Stuff like `<!ENTITY p>`\nwould trigger this kind of event. This is a weird thing to support, so it\nmight go away at some point. SAX isn't intended to be used to parse SGML,\nafter all.\n\n`opentag` - An opening tag. Argument: object with `name` and `attributes`.\nIn non-strict mode, tag names are uppercased, unless the `lowercasetags`\noption is set. If the `xmlns` option is set, then it will contain\nnamespace binding information on the `ns` member, and will have a\n`local`, `prefix`, and `uri` member.\n\n`closetag` - A closing tag. In loose mode, tags are auto-closed if their\nparent closes. In strict mode, well-formedness is enforced. Note that\nself-closing tags will have `closeTag` emitted immediately after `openTag`.\nArgument: tag name.\n\n`attribute` - An attribute node. Argument: object with `name` and `value`,\nand also namespace information if the `xmlns` option flag is set.\n\n`comment` - A comment node. Argument: the string of the comment.\n\n`opencdata` - The opening tag of a `<![CDATA[` block.\n\n`cdata` - The text of a `<![CDATA[` block. Since `<![CDATA[` blocks can get\nquite large, this event may fire multiple times for a single block, if it\nis broken up into multiple `write()`s. Argument: the string of random\ncharacter data.\n\n`closecdata` - The closing tag (`]]>`) of a `<![CDATA[` block.\n\n`opennamespace` - If the `xmlns` option is set, then this event will\nsignal the start of a new namespace binding.\n\n`closenamespace` - If the `xmlns` option is set, then this event will\nsignal the end of a namespace binding.\n\n`end` - Indication that the closed stream has ended.\n\n`ready` - Indication that the stream has reset, and is ready to be written\nto.\n\n`noscript` - In non-strict mode, `<script>` tags trigger a `\"script\"`\nevent, and their contents are not checked for special xml characters.\nIf you pass `noscript: true`, then this behavior is suppressed.\n\n## Reporting Problems\n\nIt's best to write a failing test if you find an issue. I will always\naccept pull requests with failing tests if they demonstrate intended\nbehavior, but it is very hard to figure out what issue you're describing\nwithout a test. Writing a test is also the best way for you yourself\nto figure out if you really understand the issue you think you have with\nsax-js.\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/isaacs/sax-js/issues"
},
"homepage": "https://github.com/isaacs/sax-js",
"_id": "sax@0.3.5",
"_from": "sax@0.3.5"
}
{
"author": {
"name": "Rackspace US, Inc."
},
"contributors": [
{
"name": "Paul Querna",
"email": "paul.querna@rackspace.com"
},
{
"name": "Tomaz Muraus",
"email": "tomaz.muraus@rackspace.com"
}
],
"name": "elementtree",
"description": "XML Serialization and Parsing module based on Python's ElementTree.",
"version": "0.1.5",
"keywords": [
"xml",
"sax",
"parser",
"seralization",
"elementtree"
],
"homepage": "https://github.com/racker/node-elementtree",
"repository": {
"type": "git",
"url": "git://github.com/racker/node-elementtree.git"
},
"main": "lib/elementtree.js",
"directories": {
"lib": "lib"
},
"scripts": {
"test": "make test"
},
"engines": {
"node": ">= 0.4.0"
},
"dependencies": {
"sax": "0.3.5"
},
"devDependencies": {
"whiskey": "0.6.8"
},
"licenses": [
{
"type": "Apache",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}
],
"readme": "node-elementtree\n====================\n\nnode-elementtree is a [Node.js](http://nodejs.org) XML parser and serializer based upon the [Python ElementTree v1.3](http://effbot.org/zone/element-index.htm) module.\n\nInstallation\n====================\n\n $ npm install elementtree\n \nUsing the library\n====================\n\nFor the usage refer to the Python ElementTree library documentation - [http://effbot.org/zone/element-index.htm#usage](http://effbot.org/zone/element-index.htm#usage).\n\nSupported XPath expressions in `find`, `findall` and `findtext` methods are listed on [http://effbot.org/zone/element-xpath.htm](http://effbot.org/zone/element-xpath.htm).\n\nBuild status\n====================\n\n[![Build Status](https://secure.travis-ci.org/racker/node-elementtree.png)](http://travis-ci.org/racker/node-elementtree)\n\n\nLicense\n====================\n\nnode-elementtree is distributed under the [Apache license](http://www.apache.org/licenses/LICENSE-2.0.html).\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/racker/node-elementtree/issues"
},
"_id": "elementtree@0.1.5",
"_from": "elementtree@0.1.5"
}
Copyright (c) 2010-2012 Robert Kieffer
MIT License - http://opensource.org/licenses/mit-license.php
# node-uuid
Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.
Features:
* Generate RFC4122 version 1 or version 4 UUIDs
* Runs in node.js and all browsers.
* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid').
* Cryptographically strong random # generation on supporting platforms
* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )
* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)
## Getting Started
Install it in your browser:
```html
<script src="uuid.js"></script>
```
Or in node.js:
```
npm install node-uuid
```
```javascript
var uuid = require('node-uuid');
```
Then create some ids ...
```javascript
// Generate a v1 (time-based) id
uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'
// Generate a v4 (random) id
uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'
```
## API
### uuid.v1([`options` [, `buffer` [, `offset`]]])
Generate and return a RFC4122 v1 (timestamp-based) UUID.
* `options` - (Object) Optional uuid state to apply. Properties may include:
* `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.
* `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.
* `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.
* `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.
* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
* `offset` - (Number) Starting index in `buffer` at which to begin writing.
Returns `buffer`, if specified, otherwise the string form of the UUID
Notes:
1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)
Example: Generate string UUID with fully-specified options
```javascript
uuid.v1({
node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
clockseq: 0x1234,
msecs: new Date('2011-11-01').getTime(),
nsecs: 5678
}); // -> "710b962e-041c-11e1-9234-0123456789ab"
```
Example: In-place generation of two binary IDs
```javascript
// Generate two ids in an array
var arr = new Array(32); // -> []
uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
// Optionally use uuid.unparse() to get stringify the ids
uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'
uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'
```
### uuid.v4([`options` [, `buffer` [, `offset`]]])
Generate and return a RFC4122 v4 UUID.
* `options` - (Object) Optional uuid state to apply. Properties may include:
* `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values
* `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.
* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
* `offset` - (Number) Starting index in `buffer` at which to begin writing.
Returns `buffer`, if specified, otherwise the string form of the UUID
Example: Generate string UUID with fully-specified options
```javascript
uuid.v4({
random: [
0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,
0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36
]
});
// -> "109156be-c4fb-41ea-b1b4-efe1671c5836"
```
Example: Generate two IDs in a single buffer
```javascript
var buffer = new Array(32); // (or 'new Buffer' in node.js)
uuid.v4(null, buffer, 0);
uuid.v4(null, buffer, 16);
```
### uuid.parse(id[, buffer[, offset]])
### uuid.unparse(buffer[, offset])
Parse and unparse UUIDs
* `id` - (String) UUID(-like) string
* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used
* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0
Example parsing and unparsing a UUID string
```javascript
var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10>
var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'
```
### uuid.noConflict()
(Browsers only) Set `uuid` property back to it's previous value.
Returns the node-uuid object.
Example:
```javascript
var myUuid = uuid.noConflict();
myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'
```
## Deprecated APIs
Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.
### uuid([format [, buffer [, offset]]])
uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).
### uuid.BufferClass
The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API.
## Testing
In node.js
```
> cd test
> node test.js
```
In Browser
```
open test/test.html
```
### Benchmarking
Requires node.js
```
npm install uuid uuid-js
node benchmark/benchmark.js
```
For a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark)
For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).
## Release notes
### 1.4.0
* Improved module context detection
* Removed public RNG functions
### 1.3.2
* Improve tests and handling of v1() options (Issue #24)
* Expose RNG option to allow for perf testing with different generators
### 1.3.0
* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
* Support for node.js crypto API
* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment