diff --git a/circle.yml b/circle.yml
new file mode 100644
index 00000000..782bf010
--- /dev/null
+++ b/circle.yml
@@ -0,0 +1,9 @@
+test:
+ override:
+ - echo "Skipping tests for now"
+
+deployment:
+ staging:
+ branch: master
+ commands:
+ - ./scripts/docs/update_docs.sh
diff --git a/dist/src/plugins/actionsheet.js b/dist/src/plugins/actionsheet.js
index d638c129..012678da 100644
--- a/dist/src/plugins/actionsheet.js
+++ b/dist/src/plugins/actionsheet.js
@@ -1,9 +1,13 @@
+"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
+var __metadata = (this && this.__metadata) || function (k, v) {
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
+};
var plugin_1 = require('./plugin');
var ActionSheet = (function () {
function ActionSheet() {
@@ -13,10 +17,16 @@ var ActionSheet = (function () {
ActionSheet.hide = function (options) { };
;
__decorate([
- plugin_1.Cordova()
+ plugin_1.Cordova(),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', [Object]),
+ __metadata('design:returntype', void 0)
], ActionSheet, "show", null);
__decorate([
- plugin_1.Cordova()
+ plugin_1.Cordova(),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', [Object]),
+ __metadata('design:returntype', void 0)
], ActionSheet, "hide", null);
ActionSheet = __decorate([
plugin_1.Plugin({
@@ -24,9 +34,10 @@ var ActionSheet = (function () {
plugin: 'cordova-plugin-actionsheet',
pluginRef: 'plugins.actionsheet',
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-actionsheet'
- })
+ }),
+ __metadata('design:paramtypes', [])
], ActionSheet);
return ActionSheet;
-})();
+}());
exports.ActionSheet = ActionSheet;
//# sourceMappingURL=actionsheet.js.map
\ No newline at end of file
diff --git a/dist/src/plugins/actionsheet.js.map b/dist/src/plugins/actionsheet.js.map
index 3c8c16b2..69c1314f 100644
--- a/dist/src/plugins/actionsheet.js.map
+++ b/dist/src/plugins/actionsheet.js.map
@@ -1 +1 @@
-{"version":3,"file":"actionsheet.js","sourceRoot":"","sources":["../../../src/plugins/actionsheet.ts"],"names":["ActionSheet","ActionSheet.constructor","ActionSheet.show","ActionSheet.hide"],"mappings":";;;;;;AAAA,uBAA8B,UAAU,CAAC,CAAA;AAEzC;IAAAA;IAYAC,CAACA;IAJQD,gBAAIA,GADXA,UACYA,OAAWA,IAAEE,CAACA;;IAGnBF,gBAAIA,GADXA,UACYA,OAAWA,IAAEG,CAACA;;IAJ1BH;QAACA,gBAAOA,EAAEA;OACHA,mBAAIA,QAAeA;IAE1BA;QAACA,gBAAOA,EAAEA;OACHA,mBAAIA,QAAeA;IAX5BA;QAACA,eAAMA,CAACA;YACNA,IAAIA,EAAEA,aAAaA;YACnBA,MAAMA,EAAEA,4BAA4BA;YACpCA,SAASA,EAAEA,qBAAqBA;YAChCA,IAAIA,EAAEA,8DAA8DA;SACrEA,CAACA;oBAODA;IAADA,kBAACA;AAADA,CAACA,AAZD,IAYC;AANY,mBAAW,cAMvB,CAAA"}
\ No newline at end of file
+{"version":3,"file":"actionsheet.js","sourceRoot":"","sources":["../../../src/plugins/actionsheet.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,uBAA8B,UAAU,CAAC,CAAA;AAQzC;IAAA;IAMA,CAAC;IAJQ,gBAAI,GAAX,UAAY,OAAW,IAAE,CAAC;;IAGnB,gBAAI,GAAX,UAAY,OAAW,IAAE,CAAC;;IAJ1B;QAAC,gBAAO,EAAE;;;;iCAAA;IAGV;QAAC,gBAAO,EAAE;;;;iCAAA;IAVZ;QAAC,eAAM,CAAC;YACN,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE,4BAA4B;YACpC,SAAS,EAAE,qBAAqB;YAChC,IAAI,EAAE,8DAA8D;SACrE,CAAC;;mBAAA;IAOF,kBAAC;AAAD,CAAC,AAND,IAMC;AANY,mBAAW,cAMvB,CAAA"}
\ No newline at end of file
diff --git a/dist/src/plugins/camera.js b/dist/src/plugins/camera.js
index f6072b2e..d7f7880c 100644
--- a/dist/src/plugins/camera.js
+++ b/dist/src/plugins/camera.js
@@ -1,9 +1,13 @@
+"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
+var __metadata = (this && this.__metadata) || function (k, v) {
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
+};
var plugin_1 = require('./plugin');
var Camera = (function () {
function Camera() {
@@ -14,21 +18,27 @@ var Camera = (function () {
;
__decorate([
plugin_1.Cordova({
- // Not sure why this plugin has the success/err come first...
callbackOrder: 'reverse'
- })
+ }),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', [Object]),
+ __metadata('design:returntype', void 0)
], Camera, "getPicture", null);
__decorate([
- plugin_1.Cordova()
+ plugin_1.Cordova(),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', []),
+ __metadata('design:returntype', void 0)
], Camera, "cleanup", null);
Camera = __decorate([
plugin_1.Plugin({
name: 'Camera',
plugin: 'cordova-plugin-camera',
pluginRef: 'navigator.camera'
- })
+ }),
+ __metadata('design:paramtypes', [])
], Camera);
return Camera;
-})();
+}());
exports.Camera = Camera;
//# sourceMappingURL=camera.js.map
\ No newline at end of file
diff --git a/dist/src/plugins/camera.js.map b/dist/src/plugins/camera.js.map
index e651bb48..3cdfed5c 100644
--- a/dist/src/plugins/camera.js.map
+++ b/dist/src/plugins/camera.js.map
@@ -1 +1 @@
-{"version":3,"file":"camera.js","sourceRoot":"","sources":["../../../src/plugins/camera.ts"],"names":["Camera","Camera.constructor","Camera.getPicture","Camera.cleanup"],"mappings":";;;;;;AAAA,uBAA8B,UAAU,CAAC,CAAA;AAEzC;IAAAA;IAcAC,CAACA;IAJQD,iBAAUA,GAJjBA,UAIkBA,OAAWA,IAAEE,CAACA;;IAGzBF,cAAOA,GADdA,cACiBG,CAACA;;IAPlBH;QAACA,gBAAOA,CAACA;YACPA,6DAA6DA;YAC7DA,aAAaA,EAAEA,SAASA;SACzBA,CAACA;OACKA,oBAAUA,QAAeA;IAEhCA;QAACA,gBAAOA,EAAEA;OACHA,iBAAOA,QAAIA;IAbpBA;QAACA,eAAMA,CAACA;YACNA,IAAIA,EAAEA,QAAQA;YACdA,MAAMA,EAAEA,uBAAuBA;YAC/BA,SAASA,EAAEA,kBAAkBA;SAC9BA,CAACA;eAUDA;IAADA,aAACA;AAADA,CAACA,AAdD,IAcC;AATY,cAAM,SASlB,CAAA"}
\ No newline at end of file
+{"version":3,"file":"camera.js","sourceRoot":"","sources":["../../../src/plugins/camera.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,uBAA8B,UAAU,CAAC,CAAA;AAsBzC;IAAA;IASA,CAAC;IAJQ,iBAAU,GAAjB,UAAkB,OAAW,IAAE,CAAC;;IAGzB,cAAO,GAAd,cAAiB,CAAC;;IAPlB;QAAC,gBAAO,CAAC;YAEP,aAAa,EAAE,SAAS;SACzB,CAAC;;;;kCAAA;IAGF;QAAC,gBAAO,EAAE;;;;+BAAA;IAZZ;QAAC,eAAM,CAAC;YACN,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,uBAAuB;YAC/B,SAAS,EAAE,kBAAkB;SAC9B,CAAC;;cAAA;IAUF,aAAC;AAAD,CAAC,AATD,IASC;AATY,cAAM,SASlB,CAAA"}
\ No newline at end of file
diff --git a/dist/src/plugins/contacts.js b/dist/src/plugins/contacts.js
index 6c472824..93df3e69 100644
--- a/dist/src/plugins/contacts.js
+++ b/dist/src/plugins/contacts.js
@@ -1,9 +1,13 @@
+"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
+var __metadata = (this && this.__metadata) || function (k, v) {
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
+};
var plugin_1 = require('./plugin');
var Contacts = (function () {
function Contacts() {
@@ -18,16 +22,25 @@ var Contacts = (function () {
plugin_1.Cordova({
successIndex: 1,
errorIndex: 2
- })
+ }),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', [Array, Object]),
+ __metadata('design:returntype', void 0)
], Contacts, "create", null);
__decorate([
plugin_1.Cordova({
successIndex: 1,
errorIndex: 2
- })
+ }),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', [Array, Object]),
+ __metadata('design:returntype', void 0)
], Contacts, "find", null);
__decorate([
- plugin_1.Cordova()
+ plugin_1.Cordova(),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', []),
+ __metadata('design:returntype', void 0)
], Contacts, "pickContact", null);
Contacts = __decorate([
plugin_1.Plugin({
@@ -35,9 +48,10 @@ var Contacts = (function () {
plugin: 'cordova-plugin-contacts',
pluginRef: 'navigator.contacts',
repo: 'https://github.com/apache/cordova-plugin-contacts'
- })
+ }),
+ __metadata('design:paramtypes', [])
], Contacts);
return Contacts;
-})();
+}());
exports.Contacts = Contacts;
//# sourceMappingURL=contacts.js.map
\ No newline at end of file
diff --git a/dist/src/plugins/contacts.js.map b/dist/src/plugins/contacts.js.map
index 01b1423f..17be0d52 100644
--- a/dist/src/plugins/contacts.js.map
+++ b/dist/src/plugins/contacts.js.map
@@ -1 +1 @@
-{"version":3,"file":"contacts.js","sourceRoot":"","sources":["../../../src/plugins/contacts.ts"],"names":["Contacts","Contacts.constructor","Contacts.create","Contacts.find","Contacts.pickContact"],"mappings":";;;;;;AAAA,uBAA8B,UAAU,CAAC,CAAA;AAEzC;IAAAA;IAsBAC,CAACA;IAVQD,eAAMA,GALbA,UAKcA,MAAeA,EAAEA,OAAWA,IAAEE,CAACA;;IAMtCF,aAAIA,GAJXA,UAIYA,MAAeA,EAAEA,OAAWA,IAAEG,CAACA;;IAGpCH,oBAAWA,GADlBA,cACqBI,CAACA;;IAdtBJ;QAACA,gBAAOA,CAACA;YACPA,YAAYA,EAAEA,CAACA;YACfA,UAAUA,EAAEA,CAACA;SACdA,CAACA;OAEKA,kBAAMA,QAAgCA;IAE7CA;QAACA,gBAAOA,CAACA;YACPA,YAAYA,EAAEA,CAACA;YACfA,UAAUA,EAAEA,CAACA;SACdA,CAACA;OACKA,gBAAIA,QAAgCA;IAE3CA;QAACA,gBAAOA,EAAEA;OACHA,uBAAWA,QAAIA;IArBxBA;QAACA,eAAMA,CAACA;YACNA,IAAIA,EAAEA,UAAUA;YAChBA,MAAMA,EAAEA,yBAAyBA;YACjCA,SAASA,EAAEA,oBAAoBA;YAC/BA,IAAIA,EAAEA,mDAAmDA;SAC1DA,CAACA;iBAiBDA;IAADA,eAACA;AAADA,CAACA,AAtBD,IAsBC;AAhBY,gBAAQ,WAgBpB,CAAA"}
\ No newline at end of file
+{"version":3,"file":"contacts.js","sourceRoot":"","sources":["../../../src/plugins/contacts.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,uBAA8B,UAAU,CAAC,CAAA;AA0BzC;IAAA;IAyDA,CAAC;IAzBQ,eAAM,GAAb,UAAc,MAAe,EAAE,OAAW,IAAE,CAAC;;IAqBtC,aAAI,GAAX,UAAY,MAAe,EAAE,OAAW,IAAE,CAAC;;IAGpC,oBAAW,GAAlB,cAAqB,CAAC;;IAvDtB;QAAC,gBAAO,CAAC;YACP,YAAY,EAAE,CAAC;YACf,UAAU,EAAE,CAAC;SACd,CAAC;;;;gCAAA;IA8BF;QAAC,gBAAO,CAAC;YACP,YAAY,EAAE,CAAC;YACf,UAAU,EAAE,CAAC;SACd,CAAC;;;;8BAAA;IAkBF;QAAC,gBAAO,EAAE;;;;qCAAA;IA7DZ;QAAC,eAAM,CAAC;YACN,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE,yBAAyB;YACjC,SAAS,EAAE,oBAAoB;YAC/B,IAAI,EAAE,mDAAmD;SAC1D,CAAC;;gBAAA;IA0DF,eAAC;AAAD,CAAC,AAzDD,IAyDC;AAzDY,gBAAQ,WAyDpB,CAAA"}
\ No newline at end of file
diff --git a/dist/src/plugins/device.js b/dist/src/plugins/device.js
index fef6fb92..987fc238 100644
--- a/dist/src/plugins/device.js
+++ b/dist/src/plugins/device.js
@@ -1,9 +1,13 @@
+"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
+var __metadata = (this && this.__metadata) || function (k, v) {
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
+};
var plugin_1 = require('./plugin');
var Device = (function () {
function Device() {
@@ -12,16 +16,20 @@ var Device = (function () {
return window.device;
};
__decorate([
- plugin_1.RequiresPlugin
+ plugin_1.RequiresPlugin,
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', []),
+ __metadata('design:returntype', void 0)
], Device, "getDevice", null);
Device = __decorate([
plugin_1.Plugin({
name: 'Device',
plugin: 'cordova-plugin-device',
pluginRef: 'device'
- })
+ }),
+ __metadata('design:paramtypes', [])
], Device);
return Device;
-})();
+}());
exports.Device = Device;
//# sourceMappingURL=device.js.map
\ No newline at end of file
diff --git a/dist/src/plugins/device.js.map b/dist/src/plugins/device.js.map
index c989c738..c8f71afd 100644
--- a/dist/src/plugins/device.js.map
+++ b/dist/src/plugins/device.js.map
@@ -1 +1 @@
-{"version":3,"file":"device.js","sourceRoot":"","sources":["../../../src/plugins/device.ts"],"names":["Device","Device.constructor","Device.getDevice"],"mappings":";;;;;;AAAA,uBAAqC,UAAU,CAAC,CAAA;AAIhD;IAAAA;IAWAC,CAACA;IAHQD,gBAASA,GADhBA;QAEEE,MAAMA,CAACA,MAAMA,CAACA,MAAMA,CAACA;IACvBA,CAACA;IAHDF;QAACA,uBAAcA;OACRA,mBAASA,QAEfA;IAVHA;QAACA,eAAMA,CAACA;YACNA,IAAIA,EAAEA,QAAQA;YACdA,MAAMA,EAAEA,uBAAuBA;YAC/BA,SAASA,EAAEA,QAAQA;SACpBA,CAACA;eAODA;IAADA,aAACA;AAADA,CAACA,AAXD,IAWC;AANY,cAAM,SAMlB,CAAA"}
\ No newline at end of file
+{"version":3,"file":"device.js","sourceRoot":"","sources":["../../../src/plugins/device.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,uBAAqC,UAAU,CAAC,CAAA;AAoBhD;IAAA;IAWA,CAAC;IAHQ,gBAAS,GAAhB;QACE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;IACvB,CAAC;IAHD;QAAC,uBAAc;;;;iCAAA;IAZjB;QAAC,eAAM,CAAC;YACN,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,uBAAuB;YAC/B,SAAS,EAAE,QAAQ;SACpB,CAAC;;cAAA;IAYF,aAAC;AAAD,CAAC,AAXD,IAWC;AAXY,cAAM,SAWlB,CAAA"}
\ No newline at end of file
diff --git a/dist/src/plugins/geolocation.js b/dist/src/plugins/geolocation.js
index 50d5703a..bc84658b 100644
--- a/dist/src/plugins/geolocation.js
+++ b/dist/src/plugins/geolocation.js
@@ -1,3 +1,4 @@
+"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -40,6 +41,6 @@ var Geolocation = (function () {
__metadata('design:paramtypes', [])
], Geolocation);
return Geolocation;
-})();
+}());
exports.Geolocation = Geolocation;
//# sourceMappingURL=geolocation.js.map
\ No newline at end of file
diff --git a/dist/src/plugins/geolocation.js.map b/dist/src/plugins/geolocation.js.map
index 8ad75cb6..c72aa7b5 100644
--- a/dist/src/plugins/geolocation.js.map
+++ b/dist/src/plugins/geolocation.js.map
@@ -1 +1 @@
-{"version":3,"file":"geolocation.js","sourceRoot":"","sources":["../../../src/plugins/geolocation.ts"],"names":["Geolocation","Geolocation.constructor","Geolocation.getCurrentPosition","Geolocation.watchPosition"],"mappings":";;;;;;;;;AAAA,uBAA8B,UAAU,CAAC,CAAA;AAMzC;IAAAA;IAgBAC,CAACA;IATQD,8BAAkBA,GADzBA,UAC0BA,OAAWA,IAAEE,CAACA;;IAQjCF,yBAAaA,GALpBA,UAKqBA,OAAWA,IAAEG,CAACA;;IATnCH;QAACA,gBAAOA,EAAEA;;;;OACHA,iCAAkBA,QAAeA;IAGxCA;QAACA,gBAAOA,CAACA;YACPA,aAAaA,EAAEA,SAASA;YACxBA,UAAUA,EAAEA,IAAIA;YAChBA,aAAaA,EAAEA,cAAcA;SAC9BA,CAACA;;;;OACKA,4BAAaA,QAAeA;IAfrCA;QAACA,eAAMA,CAACA;YACNA,IAAIA,EAAEA,aAAaA;YACnBA,MAAMA,EAAEA,4BAA4BA;YACpCA,SAASA,EAAEA,uBAAuBA;SACnCA,CAACA;;oBAYDA;IAADA,kBAACA;AAADA,CAACA,AAhBD,IAgBC;AAXY,mBAAW,cAWvB,CAAA"}
\ No newline at end of file
+{"version":3,"file":"geolocation.js","sourceRoot":"","sources":["../../../src/plugins/geolocation.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,uBAA8B,UAAU,CAAC,CAAA;AA6BzC;IAAA;IAWA,CAAC;IATQ,8BAAkB,GAAzB,UAA0B,OAAW,IAAE,CAAC;;IAQjC,yBAAa,GAApB,UAAqB,OAAW,IAAE,CAAC;;IATnC;QAAC,gBAAO,EAAE;;;;+CAAA;IAIV;QAAC,gBAAO,CAAC;YACP,aAAa,EAAE,SAAS;YACxB,UAAU,EAAE,IAAI;YAChB,aAAa,EAAE,cAAc;SAC9B,CAAC;;;;0CAAA;IAdJ;QAAC,eAAM,CAAC;YACN,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE,4BAA4B;YACpC,SAAS,EAAE,uBAAuB;SACnC,CAAC;;mBAAA;IAYF,kBAAC;AAAD,CAAC,AAXD,IAWC;AAXY,mBAAW,cAWvB,CAAA"}
\ No newline at end of file
diff --git a/dist/src/plugins/statusbar.js b/dist/src/plugins/statusbar.js
index 956f413b..ce4cf528 100644
--- a/dist/src/plugins/statusbar.js
+++ b/dist/src/plugins/statusbar.js
@@ -1,9 +1,13 @@
+"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
+var __metadata = (this && this.__metadata) || function (k, v) {
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
+};
var plugin_1 = require('./plugin');
var StatusBar = (function () {
function StatusBar() {
@@ -27,40 +31,68 @@ var StatusBar = (function () {
StatusBar.show = function () { };
;
__decorate([
- plugin_1.Cordova()
+ plugin_1.Cordova(),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', [Boolean]),
+ __metadata('design:returntype', void 0)
], StatusBar, "overlaysWebView", null);
__decorate([
- plugin_1.Cordova()
+ plugin_1.Cordova(),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', []),
+ __metadata('design:returntype', void 0)
], StatusBar, "styleDefault", null);
__decorate([
- plugin_1.Cordova()
+ plugin_1.Cordova(),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', []),
+ __metadata('design:returntype', void 0)
], StatusBar, "styleLightContent", null);
__decorate([
- plugin_1.Cordova()
+ plugin_1.Cordova(),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', []),
+ __metadata('design:returntype', void 0)
], StatusBar, "styleBlackTranslucent", null);
__decorate([
- plugin_1.Cordova()
+ plugin_1.Cordova(),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', []),
+ __metadata('design:returntype', void 0)
], StatusBar, "styleBlackOpaque", null);
__decorate([
- plugin_1.Cordova()
+ plugin_1.Cordova(),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', [String]),
+ __metadata('design:returntype', void 0)
], StatusBar, "backgroundColorByName", null);
__decorate([
- plugin_1.Cordova()
+ plugin_1.Cordova(),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', [String]),
+ __metadata('design:returntype', void 0)
], StatusBar, "backgroundColorByHexString", null);
__decorate([
- plugin_1.Cordova()
+ plugin_1.Cordova(),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', []),
+ __metadata('design:returntype', void 0)
], StatusBar, "hide", null);
__decorate([
- plugin_1.Cordova()
+ plugin_1.Cordova(),
+ __metadata('design:type', Function),
+ __metadata('design:paramtypes', []),
+ __metadata('design:returntype', void 0)
], StatusBar, "show", null);
StatusBar = __decorate([
plugin_1.Plugin({
name: 'StatusBar',
plugin: 'cordova-plugin-statusbar',
pluginRef: 'StatusBar'
- })
+ }),
+ __metadata('design:paramtypes', [])
], StatusBar);
return StatusBar;
-})();
+}());
exports.StatusBar = StatusBar;
//# sourceMappingURL=statusbar.js.map
\ No newline at end of file
diff --git a/dist/src/plugins/statusbar.js.map b/dist/src/plugins/statusbar.js.map
index 7ca3d12f..3d5e0cd3 100644
--- a/dist/src/plugins/statusbar.js.map
+++ b/dist/src/plugins/statusbar.js.map
@@ -1 +1 @@
-{"version":3,"file":"statusbar.js","sourceRoot":"","sources":["../../../src/plugins/statusbar.ts"],"names":["StatusBar","StatusBar.constructor","StatusBar.overlaysWebView","StatusBar.styleDefault","StatusBar.styleLightContent","StatusBar.styleBlackTranslucent","StatusBar.styleBlackOpaque","StatusBar.backgroundColorByName","StatusBar.backgroundColorByHexString","StatusBar.hide","StatusBar.show"],"mappings":";;;;;;AAAA,uBAA8B,UAAU,CAAC,CAAA;AAEzC;IAAAA;IAwBAC,CAACA;IAjBQD,yBAAeA,GADtBA,UACuBA,SAAiBA,IAAEE,CAACA;;IAEpCF,sBAAYA,GADnBA,cACsBG,CAACA;;IAEhBH,2BAAiBA,GADxBA,cAC2BI,CAACA;;IAErBJ,+BAAqBA,GAD5BA,cAC+BK,CAACA;;IAEzBL,0BAAgBA,GADvBA,cAC0BM,CAACA;;IAEpBN,+BAAqBA,GAD5BA,UAC6BA,SAAgBA,IAAEO,CAACA;;IAEzCP,oCAA0BA,GADjCA,UACkCA,SAAgBA,IAAEQ,CAACA;;IAE9CR,cAAIA,GADXA,cACcS,CAACA;;IAERT,cAAIA,GADXA,cACcU,CAACA;;IAjBfV;QAACA,gBAAOA,EAAEA;OACHA,4BAAeA,QAAqBA;IAC3CA;QAACA,gBAAOA,EAAEA;OACHA,yBAAYA,QAAIA;IACvBA;QAACA,gBAAOA,EAAEA;OACHA,8BAAiBA,QAAIA;IAC5BA;QAACA,gBAAOA,EAAEA;OACHA,kCAAqBA,QAAIA;IAChCA;QAACA,gBAAOA,EAAEA;OACHA,6BAAgBA,QAAIA;IAC3BA;QAACA,gBAAOA,EAAEA;OACHA,kCAAqBA,QAAoBA;IAChDA;QAACA,gBAAOA,EAAEA;OACHA,uCAA0BA,QAAoBA;IACrDA;QAACA,gBAAOA,EAAEA;OACHA,iBAAIA,QAAIA;IACfA;QAACA,gBAAOA,EAAEA;OACHA,iBAAIA,QAAIA;IAvBjBA;QAACA,eAAMA,CAACA;YACNA,IAAIA,EAAEA,WAAWA;YACjBA,MAAMA,EAAEA,0BAA0BA;YAClCA,SAASA,EAAEA,WAAWA;SACvBA,CAACA;kBAoBDA;IAADA,gBAACA;AAADA,CAACA,AAxBD,IAwBC;AAnBY,iBAAS,YAmBrB,CAAA"}
\ No newline at end of file
+{"version":3,"file":"statusbar.js","sourceRoot":"","sources":["../../../src/plugins/statusbar.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,uBAA8B,UAAU,CAAC,CAAA;AAkBzC;IAAA;IA+DA,CAAC;IAvDQ,yBAAe,GAAtB,UAAuB,SAAiB,IAAE,CAAC;;IAGpC,sBAAY,GAAnB,cAAsB,CAAC;;IAGhB,2BAAiB,GAAxB,cAA2B,CAAC;;IAGrB,+BAAqB,GAA5B,cAA+B,CAAC;;IAGzB,0BAAgB,GAAvB,cAA0B,CAAC;;IAWpB,+BAAqB,GAA5B,UAA6B,SAAgB,IAAE,CAAC;;IAUzC,oCAA0B,GAAjC,UAAkC,SAAgB,IAAE,CAAC;;IAe9C,cAAI,GAAX,cAAc,CAAC;;IAMR,cAAI,GAAX,cAAc,CAAC;;IAvDf;QAAC,gBAAO,EAAE;;;;0CAAA;IAGV;QAAC,gBAAO,EAAE;;;;uCAAA;IAGV;QAAC,gBAAO,EAAE;;;;4CAAA;IAGV;QAAC,gBAAO,EAAE;;;;gDAAA;IAGV;QAAC,gBAAO,EAAE;;;;2CAAA;IAWV;QAAC,gBAAO,EAAE;;;;gDAAA;IAUV;QAAC,gBAAO,EAAE;;;;qDAAA;IAeV;QAAC,gBAAO,EAAE;;;;+BAAA;IAMV;QAAC,gBAAO,EAAE;;;;+BAAA;IAlEZ;QAAC,eAAM,CAAC;YACN,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE,0BAA0B;YAClC,SAAS,EAAE,WAAW;SACvB,CAAC;;iBAAA;IAgEF,gBAAC;AAAD,CAAC,AA/DD,IA+DC;AA/DY,iBAAS,YA+DrB,CAAA"}
\ No newline at end of file
diff --git a/gulpfile.js b/gulpfile.js
new file mode 100644
index 00000000..55d9f4af
--- /dev/null
+++ b/gulpfile.js
@@ -0,0 +1,13 @@
+var gulp = require('gulp');
+var minimist = require('minimist');
+
+var flagConfig = {
+ string: ['port', 'version', 'ngVersion', 'animations'],
+ boolean: ['dry-run'],
+ alias: {'p': 'port', 'v': 'version', 'a': 'ngVersion'},
+ default: { port: 8000 }
+};
+var flags = minimist(process.argv.slice(2), flagConfig);
+
+/* Docs tasks */
+require('./scripts/docs/gulp-tasks')(gulp, flags);
diff --git a/package.json b/package.json
index 12dc7c83..466f606a 100644
--- a/package.json
+++ b/package.json
@@ -9,6 +9,21 @@
"dependencies": {
"@reactivex/rxjs": "^5.0.0-alpha.7"
},
+ "devDependencies": {
+ "canonical-path": "0.0.2",
+ "cpr": "^1.0.0",
+ "dgeni": "^0.4.2",
+ "dgeni-packages": "^0.10.18",
+ "glob": "^6.0.4",
+ "gulp": "~3.9.0",
+ "lodash": "3.10.1",
+ "minimist": "^1.1.3",
+ "mkdirp": "^0.5.1",
+ "node-html-encoder": "0.0.2",
+ "q": "1.4.1",
+ "semver": "^5.0.1",
+ "typescript": "^1.7.5"
+ },
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc --module commonjs --sourcemap --outDir dist/ --experimentalDecorators -d node_modules/@reactivex/rxjs/typings/es6-shim/es6-shim.d.ts src/index.ts --target ES5",
diff --git a/scripts/config.json b/scripts/config.json
new file mode 100644
index 00000000..7e6e9ff4
--- /dev/null
+++ b/scripts/config.json
@@ -0,0 +1,5 @@
+{
+ "sitePath": "../ionic-site",
+ "v2DocsDir": "docs/v2/platform",
+ "docsDest": "../ionic-site/docs/v2/platform"
+}
diff --git a/scripts/docs/deploy.sh b/scripts/docs/deploy.sh
new file mode 100755
index 00000000..855cc1dd
--- /dev/null
+++ b/scripts/docs/deploy.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+ARG_DEFS=(
+ "--version-name=(.*)"
+)
+
+echo "##### "
+echo "##### docs/deploy.sh"
+echo "#####"
+
+function init {
+ cd ..
+ SITE_PATH=$(readJsonProp "config.json" "sitePath")
+ SITE_DIR=$IONIC_DIR/$SITE_PATH
+}
+
+function run {
+ ./git/clone.sh --repository="driftyco/ionic-site" \
+ --directory="$SITE_DIR" \
+ --branch="master"
+ cd ..
+ VERSION=$(readJsonProp "package.json" "version")
+
+ # process new docs
+ gulp docs --doc-version="$VERSION_NAME"
+
+ # compile sass vars json for ionic-site docs
+ gulp docs.sass-variables
+ cp tmp/sass.json $SITE_DIR/docs/v2/theming/overriding-ionic-variables/
+
+ # CD in to the site dir to commit updated docs
+ cd $SITE_DIR
+
+ CHANGES=$(git status --porcelain)
+
+ # if no changes, don't commit
+ if [[ "$CHANGES" == "" ]]; then
+ ls
+ echo "-- No changes detected in docs for $VERSION_NAME; docs not updated."
+ else
+ git add -A
+ git commit -am "docs: update for $VERSION"
+ git push origin master
+
+ echo "-- Updated docs for $VERSION_NAME succesfully!"
+ fi
+
+}
+
+source $(dirname $0)/../utils.sh.inc
diff --git a/scripts/docs/dgeni-config.js b/scripts/docs/dgeni-config.js
new file mode 100644
index 00000000..2281a052
--- /dev/null
+++ b/scripts/docs/dgeni-config.js
@@ -0,0 +1,160 @@
+var Package = require('dgeni').Package;
+var jsdocPackage = require('dgeni-packages/jsdoc');
+var nunjucksPackage = require('dgeni-packages/nunjucks');
+var typescriptPackage = require('./typescript-package');
+var linksPackage = require('./links-package');
+var gitPackage = require('dgeni-packages/git');
+var path = require('path');
+var semver = require('semver');
+var fs = require('fs');
+var _ = require('lodash');
+var config = require('../config.json');
+var projectPackage = require('../../package.json');
+
+// Define the dgeni package for generating the docs
+module.exports = function(currentVersion) {
+
+ return new Package('ionic-v2-docs',
+ [jsdocPackage, nunjucksPackage, typescriptPackage,
+ linksPackage, gitPackage])
+
+// .processor(require('./processors/latest-version'))
+.processor(require('./processors/jekyll'))
+.processor(require('./processors/remove-private-members'))
+.processor(require('./processors/hide-private-api'))
+
+// for debugging docs
+// .processor(function test(){
+// return {
+//
+// $runBefore: ['rendering-docs'],
+// $process: function(docs){
+// docs.forEach(function(doc){
+// if (doc.members && doc.name == "IonicApp"){
+// doc.members.forEach(function(method){
+// if (method.name === "load") {
+// console.log(method);
+// }
+// })
+// }
+// })
+// }
+// }
+// })
+
+.config(function(log) {
+ log.level = 'error'; //'silly', 'debug', 'info', 'warn', 'error'
+})
+
+.config(function(renderDocsProcessor, computePathsProcessor, versionInfo) {
+
+ versions = [];
+ // new version, add it to the versions list
+ if (currentVersion != 'nightly' && !_.contains(versions, currentVersion)) {
+ versions.unshift(currentVersion);
+ }
+ //First semver valid version is latest
+ var latestVersion = _.find(versions, semver.valid);
+ versions = versions.map(function(version) {
+ // We don't separate by versions so always put the docs in the root
+ var folder = '';
+ return {
+ href: path.join('/' + config.v2DocsDir, folder),
+ folder: folder,
+ name: version
+ };
+ });
+
+ var versionData = {
+ list: versions,
+ current: _.find(versions, {name: currentVersion}),
+ latest: _.find(versions, {name: latestVersion}) || _.first(versions)
+ };
+
+ renderDocsProcessor.extraData.version = versionData;
+ renderDocsProcessor.extraData.versionInfo = versionInfo;
+
+ computePathsProcessor.pathTemplates = [{
+ docTypes: ['class', 'var', 'function', 'let'],
+ getOutputPath: function(doc) {
+ var docPath = doc.name + '/index.md';
+ var path = config.v2DocsDir + '/' + docPath;
+
+ return path;
+ }
+ }];
+})
+
+//configure file reading
+.config(function(readFilesProcessor, readTypeScriptModules) {
+
+ // Don't run unwanted processors since we are not using the normal file reading processor
+ readFilesProcessor.$enabled = false;
+ readFilesProcessor.basePath = path.resolve(__dirname, '../..');
+
+ readTypeScriptModules.basePath = path.resolve(path.resolve(__dirname,
+ '../..'));
+ readTypeScriptModules.sourceFiles = [
+ 'src/index.ts'
+ ];
+})
+
+.config(function(parseTagsProcessor) {
+ parseTagsProcessor.tagDefinitions = parseTagsProcessor.tagDefinitions
+ .concat(require('./tag-defs/tag-defs'));
+})
+
+// .config(function(parseTagsProcessor) {
+// // We actually don't want to parse param docs in this package as we are
+// // getting the data out using TS
+// parseTagsProcessor.tagDefinitions.forEach(function(tagDef) {
+// console.log(tagDef);
+// if (tagDef.name === 'param') {
+// tagDef.docProperty = 'paramData';
+// tagDef.transforms = [];
+// }
+// });
+// })
+
+// Configure links
+.config(function(getLinkInfo) {
+ getLinkInfo.useFirstAmbiguousLink = false;
+})
+
+// Configure file writing
+.config(function(writeFilesProcessor) {
+ writeFilesProcessor.outputFolder = config.sitePath;
+})
+
+// Configure rendering
+.config(function(templateFinder, templateEngine) {
+
+ // Nunjucks and Angular conflict in their template bindings so change the Nunjucks
+ // Also conflict with Jekyll
+ templateEngine.config.tags = {
+ variableStart: '<$',
+ variableEnd: '$>',
+ blockStart: '<@',
+ blockEnd: '@>',
+ commentStart: '<#',
+ commentEnd: '#>'
+ };
+
+ // add custom filters to nunjucks
+ templateEngine.filters.push(
+ require('./filters/capital'),
+ require('./filters/code'),
+ require('./filters/dump')
+ );
+
+ templateFinder.templateFolders.unshift(path.resolve(__dirname, 'templates'));
+
+ // Specify how to match docs to templates.
+ templateFinder.templatePatterns = [
+ '${ doc.template }',
+ '${ doc.docType }.template.html',
+ 'common.template.html'
+ ];
+});
+
+};
diff --git a/scripts/docs/filters/capital.js b/scripts/docs/filters/capital.js
new file mode 100644
index 00000000..f63edd91
--- /dev/null
+++ b/scripts/docs/filters/capital.js
@@ -0,0 +1,7 @@
+module.exports = {
+ name: 'capital',
+ process: function(str) {
+ str || (str = '');
+ return str.charAt(0).toUpperCase() + str.substring(1);
+ }
+};
diff --git a/scripts/docs/filters/code.js b/scripts/docs/filters/code.js
new file mode 100644
index 00000000..d0eaee27
--- /dev/null
+++ b/scripts/docs/filters/code.js
@@ -0,0 +1,25 @@
+var encoder = new require('node-html-encoder').Encoder();
+
+function code(str, inline, lang) {
+ // Encode any HTML entities in the code string
+ str = encoder.htmlEncode(str, true);
+
+ // If a language is provided then attach a CSS class to the code element
+ lang = lang ? ' class="lang-' + lang + '"' : '';
+
+ str = '' + str + '
';
+
+ // If not inline then wrap the code element in a pre element
+ if ( !inline ) {
+ str = '
' + str + ''; + } + + return str; +}; + +module.exports = { + name: 'code', + process: function(str, lang) { + return code(str, true, lang); + } +}; diff --git a/scripts/docs/filters/dump.js b/scripts/docs/filters/dump.js new file mode 100644 index 00000000..155a01e8 --- /dev/null +++ b/scripts/docs/filters/dump.js @@ -0,0 +1,6 @@ +module.exports = { + name: 'dump', + process: function(obj) { + console.log(obj); + } +}; \ No newline at end of file diff --git a/scripts/docs/gulp-tasks.js b/scripts/docs/gulp-tasks.js new file mode 100644 index 00000000..19d24658 --- /dev/null +++ b/scripts/docs/gulp-tasks.js @@ -0,0 +1,15 @@ +var config = require('../config.json'); +var projectPackage = require('../../package.json'); +module.exports = function(gulp) { + gulp.task('docs', [], function() { + var Dgeni = require('dgeni'); + var semver = require('semver'); + try { + var ionicPackage = require('./dgeni-config')(projectPackage.version); + var dgeni = new Dgeni([ionicPackage]); + return dgeni.generate(); + } catch (err) { + console.log(err.stack); + } + }); +} diff --git a/scripts/docs/links-package/index.js b/scripts/docs/links-package/index.js new file mode 100644 index 00000000..a3ffc719 --- /dev/null +++ b/scripts/docs/links-package/index.js @@ -0,0 +1,12 @@ +var Package = require('dgeni').Package; + +module.exports = new Package('links', []) + +.factory(require('./inline-tag-defs/link')) +.factory(require('dgeni-packages/ngdoc/services/getAliases')) +.factory(require('dgeni-packages/ngdoc/services/getDocFromAlias')) +.factory(require('./services/getLinkInfo')) + +.config(function(inlineTagProcessor, linkInlineTagDef) { + inlineTagProcessor.inlineTagDefinitions.push(linkInlineTagDef); +}); diff --git a/scripts/docs/links-package/inline-tag-defs/link.js b/scripts/docs/links-package/inline-tag-defs/link.js new file mode 100644 index 00000000..89272c63 --- /dev/null +++ b/scripts/docs/links-package/inline-tag-defs/link.js @@ -0,0 +1,33 @@ +var INLINE_LINK = /(\S+)(?:\s+([\s\S]+))?/; + +/** + * @dgService linkInlineTagDef + * @description + * Process inline link tags (of the form {@link some/uri Some Title}), replacing them with HTML anchors + * @kind function + * @param {Object} url The url to match + * @param {Function} docs error message + * @return {String} The html link information + * + * @property {boolean} relativeLinks Whether we expect the links to be relative to the originating doc + */ +module.exports = function linkInlineTagDef(getLinkInfo, createDocMessage, log) { + return { + name: 'link', + description: 'Process inline link tags (of the form {@link some/uri Some Title}), replacing them with HTML anchors', + handler: function(doc, tagName, tagDescription) { + + // Parse out the uri and title + return tagDescription.replace(INLINE_LINK, function(match, uri, title) { + + var linkInfo = getLinkInfo(uri, title, doc); + + if ( !linkInfo.valid ) { + log.warn(createDocMessage(linkInfo.error, doc)); + } + + return "" + linkInfo.title + ""; + }); + } + }; +}; \ No newline at end of file diff --git a/scripts/docs/links-package/services/getLinkInfo.js b/scripts/docs/links-package/services/getLinkInfo.js new file mode 100644 index 00000000..787ff043 --- /dev/null +++ b/scripts/docs/links-package/services/getLinkInfo.js @@ -0,0 +1,72 @@ +var _ = require('lodash'); +var path = require('canonical-path'); + +/** + * @dgService getLinkInfo + * @description + * Get link information to a document that matches the given url + * @kind function + * @param {String} url The url to match + * @param {String} title An optional title to return in the link information + * @return {Object} The link information + * + * @property {boolean} relativeLinks Whether we expect the links to be relative to the originating doc + */ +module.exports = function getLinkInfo(getDocFromAlias, encodeCodeBlock, log) { + + return function getLinkInfoImpl(url, title, currentDoc) { + var linkInfo = { + url: url, + type: 'url', + valid: true, + title: title || url + }; + + if ( !url ) { + throw new Error('Invalid url'); + } + + var docs = getDocFromAlias(url, currentDoc); + + if ( !getLinkInfoImpl.useFirstAmbiguousLink && docs.length > 1 ) { + + linkInfo.valid = false; + linkInfo.errorType = 'ambiguous'; + linkInfo.error = 'Ambiguous link: "' + url + '".\n' + + docs.reduce(function(msg, doc) { return msg + '\n "' + doc.id + '" ('+ doc.docType + ') : (' + doc.path + ' / ' + doc.fileInfo.relativePath + ')'; }, 'Matching docs: '); + + } else if ( docs.length >= 1 ) { + + linkInfo.url = docs[0].path; + linkInfo.title = title || encodeCodeBlock(docs[0].name, true); + linkInfo.type = 'doc'; + + if ( getLinkInfoImpl.relativeLinks && currentDoc && currentDoc.path ) { + var currentFolder = path.dirname(currentDoc.path); + var docFolder = path.dirname(linkInfo.url); + var relativeFolder = path.relative(path.join('/', currentFolder), path.join('/', docFolder)); + linkInfo.url = path.join(relativeFolder, path.basename(linkInfo.url)); + log.debug(currentDoc.path, docs[0].path, linkInfo.url); + } + + } else if ( url.indexOf('#') > 0 ) { + var pathAndHash = url.split('#'); + linkInfo = getLinkInfoImpl(pathAndHash[0], title, currentDoc); + linkInfo.url = linkInfo.url + '#' + pathAndHash[1]; + return linkInfo; + + } else if ( url.indexOf('/') === -1 && url.indexOf('#') !== 0 ) { + + linkInfo.valid = false; + linkInfo.errorType = 'missing'; + linkInfo.error = 'Invalid link (does not match any doc): "' + url + '"'; + + } else { + + linkInfo.title = title || (( url.indexOf('#') === 0 ) ? url.substring(1) : path.basename(url, '.html')); + + } + + return linkInfo; + }; +}; \ No newline at end of file diff --git a/scripts/docs/processors/hide-private-api.js b/scripts/docs/processors/hide-private-api.js new file mode 100644 index 00000000..15e2b6eb --- /dev/null +++ b/scripts/docs/processors/hide-private-api.js @@ -0,0 +1,18 @@ +module.exports = function removePrivateApi() { + return { + name: 'remove-private-api', + description: 'Prevent the private apis from being rendered', + $runBefore: ['rendering-docs'], + $process: function(docs) { + var publicDocs = []; + docs.forEach(function(doc){ + if(!doc.private){ + publicDocs.push(doc); + return doc + } + }) + docs = publicDocs; + return docs; + } + } +}; diff --git a/scripts/docs/processors/jekyll.js b/scripts/docs/processors/jekyll.js new file mode 100644 index 00000000..e0e02000 --- /dev/null +++ b/scripts/docs/processors/jekyll.js @@ -0,0 +1,35 @@ +module.exports = function jekyll(renderDocsProcessor) { + return { + name: 'jekyll', + description: 'Create jekyll includes', + $runAfter: ['paths-computed'], + $runBefore: ['rendering-docs'], + $process: function(docs) { + var currentVersion = renderDocsProcessor.extraData.version.current.name; + + // pretty up and sort the docs object for menu generation + docs = docs.filter(function(doc) { + return (!!doc.name && !!doc.outputPath) || doc.docType === 'index-page'; + }); + docs.sort(function(a, b) { + textA = a.name ? a.name.toUpperCase() : ''; + textB = b.name ? b.name.toUpperCase() : ''; + return (textA < textB) ? -1 : (textA > textB) ? 1 : 0; + }); + docs.forEach(function(doc, i) { + docs[i].URL = doc.outputPath.replace('docs/v2//','docs/v2/') + .replace('/index.md',''); + }); + + docs.push({ + docType: 'platform_menu-menu', + id: 'platform_menu-menu', + template: 'platform_menu.template.html', + outputPath: '_includes/v2_fluid/platform_menu.html' + }); + + // returning docs will replace docs object in the next process + return docs; + } + }; +}; diff --git a/scripts/docs/processors/latest-version.js b/scripts/docs/processors/latest-version.js new file mode 100644 index 00000000..ca10b460 --- /dev/null +++ b/scripts/docs/processors/latest-version.js @@ -0,0 +1,33 @@ +var copy = require('cpr').cpr; +var mkdirp = require('mkdirp'); +var path = require('canonical-path'); +var q = require('q'); +var fs = require('fs'); + +module.exports = function latestVersion(renderDocsProcessor) { + return { + name: 'latest-version', + $runAfter: ['files-written'], + description: 'Copy the latest version (that was compiled to docs/) into docs/versionName', + $process: function(docs) { + var versionData = renderDocsProcessor.extraData.version; + + var docsBase = 'dist/ionic-site/docs/v2/'; + var versionDir = path.resolve(docsBase, versionData.latest.name); + var latestDir = path.resolve(docsBase, 'api'); + + var deferred = q.defer(); + + mkdirp(versionDir, function() { + copy(latestDir, path.join(versionDir, 'api'), { + deleteFirst: true, + overwrite: true + }, function(err, files) { + deferred.resolve(docs); + }); + }); + + return deferred.promise; + } + } +}; diff --git a/scripts/docs/processors/remove-private-members.js b/scripts/docs/processors/remove-private-members.js new file mode 100644 index 00000000..1762c11e --- /dev/null +++ b/scripts/docs/processors/remove-private-members.js @@ -0,0 +1,19 @@ +module.exports = function removePrivateMembers() { + return { + name: 'remove-private-members', + description: 'Remove member docs with @private tags', + $runAfter: ['tags-parsed'], + $runBefore: ['rendering-docs'], + $process: function(docs) { + docs.forEach(function(doc){ + if (doc.members) { + doc.members = doc.members.filter(function(member){ + return !member.tags.tagsByName.get("private"); + }) + } + }) + + return docs; + } + } +}; diff --git a/scripts/docs/tag-defs/tag-defs.js b/scripts/docs/tag-defs/tag-defs.js new file mode 100644 index 00000000..ca0dabb3 --- /dev/null +++ b/scripts/docs/tag-defs/tag-defs.js @@ -0,0 +1,4 @@ +module.exports = [ + {'name': 'demo'}, + {'name': 'usage'} +]; diff --git a/scripts/docs/templates/common.template.html b/scripts/docs/templates/common.template.html new file mode 100644 index 00000000..aa71fe04 --- /dev/null +++ b/scripts/docs/templates/common.template.html @@ -0,0 +1,231 @@ +--- +layout: "v2_fluid/docs_base" +version: "<$ version.current.name $>" +versionHref: "<$ version.current.href $>" +path: "<$ doc.path $>" +category: platform +id: "{{<$ doc.name $> | slugify}}" +title: "<@ if doc.docType == "directive" @><$ doc.name | dashCase $><@ else @><$ doc.name $><@ endif @>" +header_sub_title: "<$ doc.docType | capital $> in module <$ doc.module $>" +doc: "<$ doc.name $>" +docType: "<$ doc.docType $>" +--- + +<@ macro paramList(paramData) -@> + <@- if paramData -@>( + <@- for param in paramData -@> + <$ param | escape $><@ if not loop.last @>, <@ endif @> + <@- endfor @>) + <@- endif @> +<@- endmacro -@> + +<@ macro githubViewLink(doc) -@> + <$ doc.fileInfo.relativePath $> (line <$ doc.location.start.line+1 $>) +<@- endmacro -@> + +<@ macro paramTable(params, isDirective) -@> +
<@ if isDirective @>Attr<@ else @>Param<@ endif @> | +Type | +Details | +
---|---|---|
+ <$ param.name $>
+ <@ if param.alias @>| <$ param.alias $><@ endif @>
+ <@ if param.type.optional @> (optional) <@ endif @>
+ |
+ + <$ typeList(param.typeList) $> + | +
+ <$ param.description | marked $>
+ <@ if param.default @> (default: <$ param.default $>) <@ endif @> + |
+
<$ fn.name $>(<@- for param in fn.params @><$ sep() $>
+ <@- if param.type.optional @>[<@ endif -@>
+ <$ param.name $>
+ <@- if param.type.optional @>]<@ endif -@>
+ <@ endfor @>)
+ <@ if fn.alias @>(alias: <$ fn.alias $>)<@ endif @>
+<@ endmacro -@>
+
+<@ macro typeList(types) -@>
+ <@ set separator = joiner("|") @>
+ <@ for type in types @><$ separator() $><$ type | code $><@ endfor @>
+<@- endmacro -@>
+
+<@- macro typeInfo(fn) -@>
+ <$ typeList(fn.typeList) $> <$ fn.description $>
+<@- endmacro -@>
+
+<@ block body @>
+
+
+<@ block content @>
+
+<@ block header @>
+
+<$ doc.directiveInfo.properties[0].values $>
Attribute | + +<@ set hasTypes = false @> +<@ for prop in doc.properties @> +<@ if prop.type @> +<@ set hasTypes = true @> +<@ endif @> +<@ endfor @> +<@ if hasTypes @> +Type | +<@ endif @> + +Description | +
---|---|---|
+<$ prop.name $> + | + +<@ if hasTypes @> ++<$ prop.type.name $> + | +<@ endif @> + ++<$ prop.description $> + | +