mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-06-08 00:00:19 +08:00
Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1536e98ba4 | |||
| baee422090 | |||
| 07de25c90f | |||
| 027b10a6dd | |||
| bb4308e7d8 | |||
| eb31e9b2a1 | |||
| 7af7715f90 | |||
| 934e63d34a | |||
| baff7b3d7c | |||
| acbb3382fe | |||
| 4bb44f1a18 | |||
| edf4c75bbd | |||
| fdffb055be | |||
| d0c680fe3a | |||
| 5cd719d272 | |||
| 9c88cfb577 | |||
| fa047d2171 | |||
| 3154fea2b9 | |||
| 7b069a3e58 | |||
| 602f14771c | |||
| 396bce1710 | |||
| 82d2ae8c4d | |||
| 0c9eb8e1dd | |||
| 3830de5d69 | |||
| ec0e1ff3a1 | |||
| 5d35434866 | |||
| 016f174b53 | |||
| 997f7a03aa | |||
| 5bf1cbeba3 |
@@ -1,3 +1,33 @@
|
||||
<a name="3.2.2"></a>
|
||||
## [3.2.2](https://github.com/driftyco/ionic-native/compare/v3.2.1...v3.2.2) (2017-03-23)
|
||||
|
||||
|
||||
|
||||
<a name="3.2.1"></a>
|
||||
## [3.2.1](https://github.com/driftyco/ionic-native/compare/v3.2.0...v3.2.1) (2017-03-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **secure-storage:** update the pluginRef (#1228) ([baff7b3](https://github.com/driftyco/ionic-native/commit/baff7b3))
|
||||
|
||||
|
||||
|
||||
<a name="3.2.0"></a>
|
||||
# [3.2.0](https://github.com/driftyco/ionic-native/compare/v3.1.1...v3.2.0) (2017-03-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **media-plugin:** MediaPlugin.create promise never fires (#1220) ([82d2ae8](https://github.com/driftyco/ionic-native/commit/82d2ae8))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **jins-meme:** add support for jins meme smart glasses (#1212) ([9c88cfb](https://github.com/driftyco/ionic-native/commit/9c88cfb))
|
||||
|
||||
|
||||
|
||||
<a name="3.1.1"></a>
|
||||
## [3.1.1](https://github.com/driftyco/ionic-native/compare/v3.1.0...v3.1.1) (2017-03-21)
|
||||
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
[](https://circleci.com/gh/driftyco/ionic-native) [](http://commitizen.github.io/cz-cli/)
|
||||
[](https://www.npmjs.com/package/ionic-native)
|
||||
[](https://circleci.com/gh/driftyco/ionic-native) [](http://commitizen.github.io/cz-cli/) 
|
||||
|
||||
[](https://nodei.co/npm/ionic-native/)
|
||||
[](https://nodei.co/npm/ionic-native/)
|
||||
|
||||
# Ionic Native
|
||||
|
||||
@@ -43,11 +40,10 @@ import { Camera } from '@ionic-native/camera';
|
||||
]
|
||||
...
|
||||
})
|
||||
```
|
||||
|
||||
```
|
||||
export class AppModule { }
|
||||
```
|
||||
|
||||
```typescript
|
||||
import { Geolocation } from '@ionic-native/geolocation';
|
||||
import { Platform } from 'ionic-angular';
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "3.1.1",
|
||||
"version": "3.2.2",
|
||||
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
@@ -40,7 +40,7 @@
|
||||
"build": "npm run clean && npm run lint && npm run build:core && npm run build:modules",
|
||||
"build:core": "ngc -p scripts/build/tsconfig-core.json",
|
||||
"build:modules": "node scripts/build/build.js",
|
||||
"clean": "rimraf dist",
|
||||
"clean": "rimraf dist .tmp",
|
||||
"shipit": "npm run build && gulp readmes && npm run npmpub",
|
||||
"npmpub": "node scripts/build/publish.js",
|
||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0"
|
||||
|
||||
+7
-14
@@ -12,14 +12,14 @@ const ROOT = path.resolve(path.join(__dirname, '../../')), // root ionic-native
|
||||
PLUGIN_PACKAGE_JSON = require(path.resolve(__dirname, 'plugin-package.json')), // plugin package.json template
|
||||
PLUGIN_TS_CONFIG = require(path.resolve(__dirname, 'tsconfig-plugin.json')), // plugin tsconfig template
|
||||
BUILD_TMP = path.resolve(ROOT, '.tmp'), // tmp directory path
|
||||
BUILD_DIST_ROOT = path.resolve(ROOT, 'dist/packages-dist/@ionic-native'), // dist directory root path
|
||||
BUILD_PLUGINS_DIST = path.resolve(BUILD_DIST_ROOT, 'plugins'), // plugins dist directory path
|
||||
BUILD_DIST_ROOT = path.resolve(ROOT, 'dist/@ionic-native'), // dist directory root path
|
||||
BUILD_CORE_DIST = path.resolve(BUILD_DIST_ROOT, 'core'); // core dist directory path
|
||||
|
||||
|
||||
// dependency versions
|
||||
const ANGULAR_VERSION = '2.4.8',
|
||||
RXJS_VERSION = '5.0.1',
|
||||
const ANGULAR_VERSION = '*',
|
||||
RXJS_VERSION = '^5.0.1',
|
||||
MIN_CORE_VERSION = '^3.1.0',
|
||||
IONIC_NATIVE_VERSION = require(path.resolve(ROOT, 'package.json')).version;
|
||||
|
||||
// package dependencies
|
||||
@@ -28,7 +28,7 @@ const CORE_PEER_DEPS = {
|
||||
};
|
||||
|
||||
const PLUGIN_PEER_DEPS = {
|
||||
'@ionic-native/core': IONIC_NATIVE_VERSION,
|
||||
'@ionic-native/core': MIN_CORE_VERSION,
|
||||
'@angular/core': ANGULAR_VERSION,
|
||||
'rxjs': RXJS_VERSION
|
||||
};
|
||||
@@ -36,13 +36,6 @@ const PLUGIN_PEER_DEPS = {
|
||||
// set peer dependencies for all plugins
|
||||
PLUGIN_PACKAGE_JSON.peerDependencies = PLUGIN_PEER_DEPS;
|
||||
|
||||
|
||||
// Delete dist directory and any temporary files
|
||||
console.log('Removing old TMP directory');
|
||||
fs.removeSync(BUILD_TMP);
|
||||
fs.removeSync(BUILD_PLUGINS_DIST);
|
||||
|
||||
|
||||
// Create tmp/dist directories
|
||||
console.log('Making new TMP directory');
|
||||
fs.mkdirpSync(BUILD_TMP);
|
||||
@@ -78,7 +71,7 @@ const addPluginToQueue = pluginName => {
|
||||
let tsConfigPath;
|
||||
|
||||
fs.mkdirpAsync(PLUGIN_BUILD_DIR) // create tmp build dir
|
||||
.then(() => fs.mkdirpAsync(path.resolve(BUILD_PLUGINS_DIST, pluginName))) // create dist dir
|
||||
.then(() => fs.mkdirpAsync(path.resolve(BUILD_DIST_ROOT, pluginName))) // create dist dir
|
||||
.then(() => {
|
||||
|
||||
// Write tsconfig.json
|
||||
@@ -97,7 +90,7 @@ const addPluginToQueue = pluginName => {
|
||||
packageJson.name = `@ionic-native/${pluginName}`;
|
||||
packageJson.version = IONIC_NATIVE_VERSION;
|
||||
|
||||
return fs.writeJsonAsync(path.resolve(BUILD_PLUGINS_DIST, pluginName, 'package.json'), packageJson);
|
||||
return fs.writeJsonAsync(path.resolve(BUILD_DIST_ROOT, pluginName, 'package.json'), packageJson);
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
|
||||
+25
-38
@@ -7,51 +7,38 @@ const fs = require('fs-extra-promise').useFs(require('fs-extra')),
|
||||
|
||||
|
||||
const ROOT = path.resolve(path.join(__dirname, '../../')),
|
||||
DIST = path.resolve(ROOT, 'dist', 'packages-dist', '@ionic-native'),
|
||||
PLUGINS_ROOT = path.resolve(DIST, 'plugins'),
|
||||
CORE = path.resolve(DIST, 'core');
|
||||
DIST = path.resolve(ROOT, 'dist', '@ionic-native');
|
||||
|
||||
const FLAGS = '--access public'; // add any flags here if you want... (example: --tag alpha)
|
||||
|
||||
console.log('Publishing @ionic-native/core');
|
||||
exec(`npm publish ${CORE} ${FLAGS}`)
|
||||
.then(() => {
|
||||
const PACKAGES = fs.readdirSync(DIST);
|
||||
|
||||
const PLUGINS = fs.readdirSync(PLUGINS_ROOT);
|
||||
|
||||
const QUEUE = queue({
|
||||
concurrency: 10
|
||||
});
|
||||
const QUEUE = queue({
|
||||
concurrency: 10
|
||||
});
|
||||
|
||||
PLUGINS.forEach(pluginName => {
|
||||
PACKAGES.forEach(packageName => {
|
||||
|
||||
QUEUE.push(done => {
|
||||
QUEUE.push(done => {
|
||||
|
||||
console.log(`Publishing plugin ${pluginName}`);
|
||||
const pluginPath = path.resolve(PLUGINS_ROOT, pluginName);
|
||||
|
||||
exec(`npm publish ${pluginPath} ${FLAGS}`)
|
||||
.then(() => done())
|
||||
.catch(done);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
QUEUE.start((err) => {
|
||||
|
||||
if (err) {
|
||||
console.log('Error publishing ionic-native. ', err);
|
||||
} else {
|
||||
console.log('Done publishing ionic-native!');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
})
|
||||
.catch(e => {
|
||||
|
||||
console.log('Publish failed');
|
||||
console.log(e);
|
||||
console.log(`Publishing @ionic-native/${packageName}`);
|
||||
const packagePath = path.resolve(DIST, packageName);
|
||||
exec(`npm publish ${packagePath} ${FLAGS}`)
|
||||
.then(() => done())
|
||||
.catch(done);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
QUEUE.start((err) => {
|
||||
|
||||
if (err) {
|
||||
console.log('Error publishing ionic-native. ', err);
|
||||
} else {
|
||||
console.log('Done publishing ionic-native!');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"emitDecoratorMetadata": true,
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "../../dist/packages-dist/",
|
||||
"outDir": "../../dist/",
|
||||
"rootDir": "../../src/",
|
||||
"target": "es5",
|
||||
"skipLibCheck": true,
|
||||
|
||||
@@ -7,16 +7,14 @@
|
||||
"emitDecoratorMetadata": true,
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "../../../dist/packages-dist/",
|
||||
"outDir": "../../../dist/@ionic-native/",
|
||||
"paths": {
|
||||
"@ionic-native/core": ["../../../dist/packages-dist/@ionic-native/core"]
|
||||
"@ionic-native/core": ["../../../dist/@ionic-native/core"]
|
||||
},
|
||||
"rootDir": "../../../src/",
|
||||
"rootDir": "../../../src/@ionic-native/plugins/",
|
||||
"target": "es5",
|
||||
"skipLibCheck": true,
|
||||
"lib": ["es2015", "dom"]
|
||||
},
|
||||
"files": [
|
||||
"../../../src/@ionic-native/plugins/{{PLUGIN}}/index.ts"
|
||||
]
|
||||
"files": []
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@
|
||||
"sitePath": "../ionic-site",
|
||||
"v2DocsDir": "docs/v2/native",
|
||||
"docsDest": "../ionic-site/content/docs/v2/native",
|
||||
"pluginDir": "dist/packages-dist/@ionic-native/plugins"
|
||||
"pluginDir": "dist/@ionic-native"
|
||||
}
|
||||
|
||||
@@ -17,162 +17,163 @@ module.exports = function(currentVersion) {
|
||||
|
||||
return new Package('ionic-v2-docs', [jsdocPackage, nunjucksPackage, typescriptPackage, linksPackage])
|
||||
|
||||
// .processor(require('./processors/latest-version'))
|
||||
.processor(require('./processors/readmes'))
|
||||
.processor(require('./processors/npm-id'))
|
||||
.processor(require('./processors/remove-private-members'))
|
||||
.processor(require('./processors/hide-private-api'))
|
||||
// .processor(require('./processors/collect-inputs-outputs'))
|
||||
// .processor(require('./processors/latest-version'))
|
||||
.processor(require('./processors/readmes'))
|
||||
.processor(require('./processors/npm-id'))
|
||||
.processor(require('./processors/remove-private-members'))
|
||||
.processor(require('./processors/hide-private-api'))
|
||||
// .processor(require('./processors/collect-inputs-outputs'))
|
||||
|
||||
// for debugging docs
|
||||
// .processor(function test(){
|
||||
// return {
|
||||
//
|
||||
// $runBefore: ['rendering-docs'],
|
||||
// $process: function(docs){
|
||||
// docs.forEach(function(doc){
|
||||
// if (doc.name == "Camera"){
|
||||
//
|
||||
// // console.log(doc.tags);
|
||||
// // doc.tags.forEach(function(tag){
|
||||
// // if(tag.tagName == 'classes'){
|
||||
// //
|
||||
// // }
|
||||
// // });
|
||||
//
|
||||
// // doc.moduleDoc.exports.forEach(function(d,i){
|
||||
// // if(d.name === 'CameraOptions') {
|
||||
// // console.log('Name: ' + d.name);
|
||||
// // console.log('Type: ' + d.docType);
|
||||
// // console.log('First member: ', d.members[0]);
|
||||
// // }
|
||||
// // });
|
||||
//
|
||||
//
|
||||
// // var exports = doc.exportSymbol.parent.exports;
|
||||
// // for(var p in exports) {
|
||||
// // if(p == 'CameraOptions')
|
||||
// // {
|
||||
// // var x = exports[p];
|
||||
// // console.log(x.members.quality);
|
||||
// // }
|
||||
// // }
|
||||
// // doc.members.forEach(function(method){
|
||||
// // if (method.name === "getPicture") {
|
||||
// // console.log(method);
|
||||
// // }
|
||||
// // })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
.config(function(log) {
|
||||
log.level = 'error'; //'silly', 'debug', 'info', 'warn', 'error'
|
||||
})
|
||||
// for debugging docs
|
||||
// .processor(function test(){
|
||||
// return {
|
||||
//
|
||||
// $runBefore: ['rendering-docs'],
|
||||
// $process: function(docs){
|
||||
// docs.forEach(function(doc){
|
||||
// if (doc.name == "Camera"){
|
||||
//
|
||||
// // console.log(doc.tags);
|
||||
// // doc.tags.forEach(function(tag){
|
||||
// // if(tag.tagName == 'classes'){
|
||||
// //
|
||||
// // }
|
||||
// // });
|
||||
//
|
||||
// // doc.moduleDoc.exports.forEach(function(d,i){
|
||||
// // if(d.name === 'CameraOptions') {
|
||||
// // console.log('Name: ' + d.name);
|
||||
// // console.log('Type: ' + d.docType);
|
||||
// // console.log('First member: ', d.members[0]);
|
||||
// // }
|
||||
// // });
|
||||
//
|
||||
//
|
||||
// // var exports = doc.exportSymbol.parent.exports;
|
||||
// // for(var p in exports) {
|
||||
// // if(p == 'CameraOptions')
|
||||
// // {
|
||||
// // var x = exports[p];
|
||||
// // console.log(x.members.quality);
|
||||
// // }
|
||||
// // }
|
||||
// // doc.members.forEach(function(method){
|
||||
// // if (method.name === "getPicture") {
|
||||
// // console.log(method);
|
||||
// // }
|
||||
// // })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
.config(function(log) {
|
||||
log.level = 'error'; //'silly', 'debug', 'info', 'warn', 'error'
|
||||
})
|
||||
|
||||
.config(function(renderDocsProcessor, computePathsProcessor) {
|
||||
.config(function(renderDocsProcessor, computePathsProcessor) {
|
||||
|
||||
versions = [];
|
||||
// new version, add it to the versions list
|
||||
if (currentVersion != 'nightly' && !_.includes(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: '/' + config.v2DocsDir.replace('content/', ''),
|
||||
folder: folder,
|
||||
name: version
|
||||
};
|
||||
});
|
||||
versions = [];
|
||||
// new version, add it to the versions list
|
||||
if (currentVersion != 'nightly' && !_.includes(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: '/' + config.v2DocsDir.replace('content/', ''),
|
||||
folder: folder,
|
||||
name: version
|
||||
};
|
||||
});
|
||||
|
||||
var versionData = {
|
||||
list: versions,
|
||||
current: _.find(versions, {name: currentVersion}),
|
||||
latest: _.find(versions, {name: latestVersion}) || _.first(versions)
|
||||
};
|
||||
var versionData = {
|
||||
list: versions,
|
||||
current: _.find(versions, {name: currentVersion}),
|
||||
latest: _.find(versions, {name: latestVersion}) || _.first(versions)
|
||||
};
|
||||
|
||||
renderDocsProcessor.extraData.version = versionData;
|
||||
computePathsProcessor.pathTemplates = [{
|
||||
docTypes: ['class'],
|
||||
getOutputPath: function(doc) {
|
||||
return doc.originalModule.replace(config.pluginDir + '/', '')
|
||||
.replace('/index', '') + '/README.md';
|
||||
}
|
||||
}];
|
||||
})
|
||||
renderDocsProcessor.extraData.version = versionData;
|
||||
computePathsProcessor.pathTemplates = [{
|
||||
docTypes: ['class'],
|
||||
getOutputPath: function(doc) {
|
||||
return doc.originalModule.replace(config.pluginDir + '/', '')
|
||||
.replace('/plugins', '')
|
||||
.replace('/index', '') + '/README.md';
|
||||
}
|
||||
}];
|
||||
})
|
||||
|
||||
//configure file reading
|
||||
.config(function(readFilesProcessor, readTypeScriptModules) {
|
||||
//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, '../..');
|
||||
// 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/@ionic-native/plugins/**/*.ts'];
|
||||
})
|
||||
readTypeScriptModules.basePath = path.resolve(path.resolve(__dirname, '../..'));
|
||||
readTypeScriptModules.sourceFiles = ['./src/@ionic-native/plugins/**/*.ts'];
|
||||
})
|
||||
|
||||
.config(function(parseTagsProcessor) {
|
||||
parseTagsProcessor.tagDefinitions = parseTagsProcessor.tagDefinitions
|
||||
.concat(require('./tag-defs/tag-defs'));
|
||||
})
|
||||
.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 = [];
|
||||
// }
|
||||
// });
|
||||
// })
|
||||
// .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 links
|
||||
.config(function(getLinkInfo) {
|
||||
getLinkInfo.useFirstAmbiguousLink = false;
|
||||
})
|
||||
|
||||
// Configure file writing
|
||||
.config(function(writeFilesProcessor) {
|
||||
writeFilesProcessor.outputFolder = './dist/packages-dist/';
|
||||
})
|
||||
// Configure file writing
|
||||
.config(function(writeFilesProcessor) {
|
||||
writeFilesProcessor.outputFolder = './dist/';
|
||||
})
|
||||
|
||||
// Configure rendering
|
||||
.config(function(templateFinder, templateEngine) {
|
||||
// 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: '#>'
|
||||
};
|
||||
// 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')
|
||||
);
|
||||
// add custom filters to nunjucks
|
||||
templateEngine.filters.push(
|
||||
require('./filters/capital'),
|
||||
require('./filters/code'),
|
||||
require('./filters/dump')
|
||||
);
|
||||
|
||||
templateFinder.templateFolders.unshift(path.resolve(__dirname, 'templates'));
|
||||
templateFinder.templateFolders.unshift(path.resolve(__dirname, 'templates'));
|
||||
|
||||
// Specify how to match docs to templates.
|
||||
templateFinder.templatePatterns = [
|
||||
'${ doc.template }',
|
||||
'${ doc.docType }.template.md',
|
||||
'readme.template.md'
|
||||
];
|
||||
});
|
||||
// Specify how to match docs to templates.
|
||||
templateFinder.templatePatterns = [
|
||||
'${ doc.template }',
|
||||
'${ doc.docType }.template.md',
|
||||
'readme.template.md'
|
||||
];
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
var config = require('../config.json');
|
||||
var projectPackage = require('../../package.json');
|
||||
var path = require('path');
|
||||
var fs = require('fs-extra-promise').useFs(require('fs-extra'));
|
||||
|
||||
module.exports = function(gulp) {
|
||||
gulp.task('docs', [], function() {
|
||||
var Dgeni = require('dgeni');
|
||||
@@ -18,6 +21,9 @@ module.exports = function(gulp) {
|
||||
gulp.task('readmes', [], function() {
|
||||
var Dgeni = require('dgeni');
|
||||
var semver = require('semver');
|
||||
|
||||
fs.copySync(path.resolve(__dirname, '..', '..', 'README.md'), path.resolve(__dirname, '..', '..', config.pluginDir, 'core', 'README.md'));
|
||||
|
||||
try {
|
||||
var ionicPackage = require('./dgeni-readmes-config')(projectPackage.version);
|
||||
var dgeni = new Dgeni([ionicPackage]);
|
||||
|
||||
@@ -23,16 +23,18 @@ function run {
|
||||
# CD in to the site dir to commit updated docs
|
||||
cd $SITE_DIR
|
||||
|
||||
# Add all files to git
|
||||
git add .
|
||||
|
||||
# if no changes, don't commit
|
||||
CHANGED=$(git diff-index --name-only HEAD --)
|
||||
if [ -z "$CHANGED" ];
|
||||
CHANGED=$(git diff-index --name-only HEAD 2>/dev/null | wc -l)
|
||||
if [ $CHANGED -eq 0 ];
|
||||
then
|
||||
echo "-- No changes detected for the following commit, docs not updated."
|
||||
echo "https://github.com/driftyco/$CIRCLE_PROJECT_REPONAME/commit/$CIRCLE_SHA1"
|
||||
else
|
||||
git config --global user.email "hi@ionicframework.com"
|
||||
git config --global user.name "Ionitron"
|
||||
git add -A
|
||||
git commit -am "Automated build of native docs driftyco/$CIRCLE_PROJECT_REPONAME@$CIRCLE_SHA1"
|
||||
# in case a different commit was pushed to ionic-site during doc/demo gen,
|
||||
# try to rebase around it before pushing
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface DeeplinkMatch {
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Ionic Deeplinks
|
||||
* @name Deeplinks
|
||||
* @description This plugin handles deeplinks on iOS and Android for both custom URL scheme links
|
||||
* and Universal App Links.
|
||||
*
|
||||
@@ -32,9 +32,9 @@ export interface DeeplinkMatch {
|
||||
* ```typescript
|
||||
* import { Deeplinks } from '@ionic-native/deeplinks';
|
||||
*
|
||||
* constructor(private deepLinks: DeepLinks) { }
|
||||
* constructor(private deeplinks: Deeplinks) { }
|
||||
*
|
||||
* this.deepLinks.route({
|
||||
* this.deeplinks.route({
|
||||
* '/about-us': AboutPage,
|
||||
* '/universal-links-test': AboutPage,
|
||||
* '/products/:productId': ProductPage
|
||||
@@ -53,7 +53,7 @@ export interface DeeplinkMatch {
|
||||
* the actual navigation for you:
|
||||
*
|
||||
* ```typescript
|
||||
* this.deepLinks.routeWithNavController(this.navController, {
|
||||
* this.deeplinks.routeWithNavController(this.navController, {
|
||||
* '/about-us': AboutPage,
|
||||
* '/products/:productId': ProductPage
|
||||
* }).subscribe((match) => {
|
||||
|
||||
@@ -21,7 +21,7 @@ export interface FingerprintOptions {
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @name FingerprintAIO
|
||||
* @name Fingerprint AIO
|
||||
* @description
|
||||
* Use simple fingerprint authentication on Android and iOS.
|
||||
* Requires Cordova plugin: cordova-plugin-fingerprint-aio. For more info about plugin, vist: https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio
|
||||
|
||||
@@ -122,15 +122,20 @@ export interface GeolocationOptions {
|
||||
* ```typescript
|
||||
* import { Geolocation } from '@ionic-native/geolocation';
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* Geolocation.getCurrentPosition().then((resp) => {
|
||||
* constructor(private geolocation: Geolocation) {}
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.geolocation.getCurrentPosition().then((resp) => {
|
||||
* // resp.coords.latitude
|
||||
* // resp.coords.longitude
|
||||
* }).catch((error) => {
|
||||
* console.log('Error getting location', error);
|
||||
* });
|
||||
*
|
||||
* let watch = Geolocation.watchPosition();
|
||||
* let watch = this.geolocation.watchPosition();
|
||||
* watch.subscribe((data) => {
|
||||
* // data can be a set of coordinates, or an error (if an error occurred).
|
||||
* // data.coords.latitude
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, CordovaCheck } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
declare var cordova: any;
|
||||
|
||||
/**
|
||||
* @name Jins Meme
|
||||
* @description
|
||||
* Implementation of the JINS MEME SDK
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import { JinsMeme } from '@ionic-native/jins-meme';
|
||||
*
|
||||
* constructor(private jinsMeme: JinsMeme) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.jinsMeme.setAppClientID(appClientId: string, clientSecret: string)
|
||||
* .then(this.jinsMeme.startScan())
|
||||
* .catch(console.log('jinsMeme.setAppClientID authentication error!'));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Jins Meme',
|
||||
plugin: 'JinsMemeSDK-Plugin-Cordova',
|
||||
pluginRef: 'cordova.plugins.JinsMemePlugin',
|
||||
repo: 'https://github.com/jins-meme/JinsMemeSDK-Plugin-Cordova.git'
|
||||
})
|
||||
@Injectable()
|
||||
export class JinsMeme {
|
||||
/**
|
||||
* Authentication and authorization of App and SDK.
|
||||
* Must call this method at first.
|
||||
*
|
||||
*@param {string} setAppClientID
|
||||
*@param {string} clientSecret
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setAppClientID(appClientId: string, clientSecret: string): Promise<any> { return; }
|
||||
/**
|
||||
* Starts scanning for JINS MEME.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
clearFunction: 'stopScan',
|
||||
clearWithArgs: true
|
||||
})
|
||||
startScan(): Observable<any> { return; }
|
||||
/**
|
||||
* Stops scanning JINS MEME.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
stopScan(): Promise<any> { return; }
|
||||
/**
|
||||
* Establishes connection to JINS MEME.
|
||||
* @param {string} target
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@CordovaCheck({
|
||||
observable: true
|
||||
})
|
||||
connect(target: string): Observable<any> {
|
||||
return new Observable<any>((observer: any) => {
|
||||
let data = cordova.plugins.JinsMemePlugin.connect(target, observer.next.bind(observer), observer.complete.bind(observer), observer.error.bind(observer));
|
||||
return () => console.log(data);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Set auto connection mode.
|
||||
*@param {Boolean} flag
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setAutoConnect(flag: boolean): Promise<any> { return; }
|
||||
/**
|
||||
* Returns whether a connection to JINS MEME has been established.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
isConnected(): Promise<any> { return; }
|
||||
/**
|
||||
* Disconnects from JINS MEME.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
disconnect(): Promise<any> { return; }
|
||||
/**
|
||||
* Starts receiving realtime data.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
clearFunction: 'stopDataReport',
|
||||
clearWithArgs: true
|
||||
})
|
||||
startDataReport(): Observable<any> { return; }
|
||||
/**
|
||||
* Stops receiving data.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
stopDataReport(): Promise<any> { return; }
|
||||
/**
|
||||
* Returns SDK version.
|
||||
*
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getSDKVersion(): Promise<any> { return; }
|
||||
/**
|
||||
* Returns JINS MEME connected with other apps.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getConnectedByOthers(): Promise<any> { return; }
|
||||
/**
|
||||
* Returns calibration status
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
isCalibrated(): Promise<any> { return; }
|
||||
/**
|
||||
* Returns device type.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getConnectedDeviceType(): Promise<any> { return; }
|
||||
/**
|
||||
* Returns hardware version.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getConnectedDeviceSubType(): Promise<any> { return; }
|
||||
/**
|
||||
* Returns FW Version.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getFWVersion(): Promise<any> { return; }
|
||||
/**
|
||||
* Returns HW Version.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getHWVersion(): Promise<any> { return; }
|
||||
/**
|
||||
* Returns response about whether data was received or not.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
isDataReceiving(): Promise<any> { return; }
|
||||
}
|
||||
@@ -12,7 +12,7 @@ export type LinkedInLoginScopes = 'r_basicprofile' | 'r_emailaddress' | 'rw_comp
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import { LinkedIn } from 'ionic-native';
|
||||
* import { LinkedIn } from '@ionic-native/linkedin';
|
||||
*
|
||||
* constructor(private linkedin: LinkedIn) { }
|
||||
*
|
||||
|
||||
@@ -14,7 +14,7 @@ export class MediaObject {
|
||||
* @param src {string} A URI containing the audio content.
|
||||
* @param onStatusUpdate {Function} A callback function to be invoked when the status of the file changes
|
||||
*/
|
||||
constructor(private _objectInstnace: any) {}
|
||||
constructor(private _objectInstance: any) {}
|
||||
|
||||
/**
|
||||
* Get the current amplitude of the current recording.
|
||||
@@ -256,7 +256,8 @@ export class MediaPlugin {
|
||||
// Creates a new media object
|
||||
// Resolves with the media object
|
||||
// or rejects with the error
|
||||
const instance = new Media(src, () => resolve(new Media(instance)), reject, onStatusUpdate);
|
||||
const instance = new Media(src, resolve, reject, onStatusUpdate);
|
||||
return resolve(new MediaObject(instance));
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export class SecureStorageObject {
|
||||
@Plugin({
|
||||
pluginName: 'SecureStorage',
|
||||
plugin: 'cordova-plugin-secure-storage',
|
||||
pluginRef: 'plugins.securestorage',
|
||||
pluginRef: 'cordova.plugins.SecureStorage',
|
||||
repo: 'https://github.com/Crypho/cordova-plugin-secure-storage',
|
||||
platforms: ['Android', 'iOS', 'Windows Phone', 'Browser']
|
||||
})
|
||||
|
||||
@@ -45,7 +45,7 @@ export interface SpeechRecognitionListeningOptionsAndroid {
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @name SpeechRecognition
|
||||
* @name Speech Recognition
|
||||
* @description
|
||||
* This plugin does speech recognition using cloud services
|
||||
*
|
||||
|
||||
@@ -11,7 +11,7 @@ export interface TTSOptions {
|
||||
}
|
||||
|
||||
/**
|
||||
* @name TextToSpeech
|
||||
* @name Text To Speech
|
||||
* @description
|
||||
* Text to Speech plugin
|
||||
*
|
||||
|
||||
@@ -51,7 +51,7 @@ export interface ToastOptions {
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* thisoast.show("I'm a toast", '5000', 'center').subscribe(
|
||||
* this.toast.show("I'm a toast", '5000', 'center').subscribe(
|
||||
* toast => {
|
||||
* console.log(toast);
|
||||
* }
|
||||
|
||||
@@ -18,7 +18,7 @@ export interface VideoOptions {
|
||||
}
|
||||
|
||||
/**
|
||||
* @name VideoPlayer
|
||||
* @name Video Player
|
||||
* @description
|
||||
* A Codova plugin that simply allows you to immediately play a video in fullscreen mode.
|
||||
*
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"@ionic-native/core": ["./dist/packages-dist/@ionic-native/core"]
|
||||
"@ionic-native/core": ["./dist/@ionic-native/core"]
|
||||
},
|
||||
"rootDir": ".",
|
||||
"target": "es5",
|
||||
|
||||
Reference in New Issue
Block a user