Skip to content

Instantly share code, notes, and snippets.

View vladimir-kotikov's full-sized avatar
😎
$> ping 192.168.0.1

Vladimir Kotikov vladimir-kotikov

😎
$> ping 192.168.0.1
View GitHub Profile
@vladimir-kotikov
vladimir-kotikov / static_server.js
Last active August 29, 2015 14:10 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@vladimir-kotikov
vladimir-kotikov / MSBuild.ps1
Created March 4, 2015 19:24
Detect MSBuild.exe location using system functions
# MSBuild.exe location. Acquired using system functions
[String]$msBuild = [System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory() + "MSBuild.exe"
@vladimir-kotikov
vladimir-kotikov / clink.lua
Last active August 29, 2015 14:17
Clink prompt filetring profiler
window.onerror = function(message, url, line, col, error) {
var errMessage = message +
'\nat: ' + url + ':' + line + ':' + col +
!!error ? JSON.stringify(error, null, 4) : '';
if (window.alert) {
alert(errMessage);
} else {
console.log(errMessage);
}
@vladimir-kotikov
vladimir-kotikov / CordovaProjectAPI.js
Last active August 29, 2015 14:23
CordovaProject API
/*jshint node:true, unused:false */
// TODO: Refine usage of options parameter
/**
* Class, that acts as abstract on top of Cordova project. Encapsulates the
* basic properties, that represents project configuration and methods for
* managing the project. This class shouldn't be instantiated directly.
* Instead user is intended to use 'getProjectAt' and 'createProject' class
@vladimir-kotikov
vladimir-kotikov / PlatformApi.js
Last active August 29, 2015 14:23
PlatformApi
/*jshint node:true, unused:false */
var ConfigParser = require('cordova-common').ConfigParser;
var PluginInfo = require('cordova-common').PluginInfo;
var Requirement = require('cordova-common').Requirement;
/**
* Class, that acts as abstraction over particular platform. Encapsulates the
* platform's properties and methods.
@vladimir-kotikov
vladimir-kotikov / Platform_ProjectApi proposal v2.md
Last active August 29, 2015 14:23
Cordova plugin/project API proposal v.2

Cordova project workflow

  • Create new project

    Why need to create a project, not an simple dir structure?

    • Basically project is a www dir, filled up with app code, plus config.xml, which can be retrieved from runtime. Currently config.xml is also stores a non-runtime configuratio,. which relates to build, package and code signing process. Maybe we can split it into two separate files?
  • Add a platform

@vladimir-kotikov
vladimir-kotikov / PlatformApi.md
Last active August 29, 2015 14:23
Platform API reference

PlatformApi()

Class, that acts as abstraction over particular platform. Encapsulates the platform's properties and methods.

Platform that implements own PlatformApi instance should implement all prototype methods of this class to be fully compatible with cordova-lib.

The PlatformApi instance also should define the following field:

@vladimir-kotikov
vladimir-kotikov / ProjectApi.md
Created June 16, 2015 15:38
ProjectApi reference

CordovaProject(appName, appId)

Class, that acts as abstract on top of Cordova project. Encapsulates the basic properties, that represents project configuration and methods for managing the project. This class shouldn't be instantiated directly. Instead user is intended to use 'getProjectAt' and 'createProject' class methods.

Kind: global function

@vladimir-kotikov
vladimir-kotikov / ProjectInfo.js
Last active August 29, 2015 14:23
The structure of ProjectInfo class for PlatformApi
/* jshint node:true, unused:false */
var path = require('path');
var BuildConfig = require('cordova-common').BuildConfig;
var ConfigParser = require('cordova-common').ConfigParser;
/**
* Encapsulates and stores project information.
*
* @class