diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..f9a4b09 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,42 @@ + +## [0.2.2](https://github.com/softmonkeyjapan/angular-google-picker/compare/0.2.1...0.2.2) (2015-10-07) + + +### Bug Fixes + +* **callbacks:** fix callbacks using ES6 ([1f29a74](https://github.com/softmonkeyjapan/angular-google-picker/commit/1f29a74)) + + + + +## [0.2.1](https://github.com/softmonkeyjapan/angular-google-picker/compare/0.2.0...0.2.1) (2015-06-25) + + +### Bug Fixes + +* **callbacks:** improve support for cancel, picked and loaded callback (resolve #13) ([fad944b](https://github.com/softmonkeyjapan/angular-google-picker/commit/fad944b)), closes [#13](https://github.com/softmonkeyjapan/angular-google-picker/issues/13) + + + + +# [0.2.0](https://github.com/softmonkeyjapan/angular-google-picker/compare/0.1.4...0.2.0) (2015-05-23) + + + + +## [0.1.4](https://github.com/softmonkeyjapan/angular-google-picker/compare/0.1.3...0.1.4) (2015-05-17) + + + + +## [0.1.2](https://github.com/softmonkeyjapan/angular-google-picker/compare/0.1.1...0.1.2) (2014-11-06) + + + + +## [0.1.1](https://github.com/softmonkeyjapan/angular-google-picker/compare/0.1.0...0.1.1) (2014-10-07) + + + + +# 0.1.0 (2014-09-28) diff --git a/README.md b/README.md index d7273ea..f02e16e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ angular-google-picker ===================== -[![npm version](https://badge.fury.io/js/angular-google-picker.svg)](http://badge.fury.io/js/angular-google-picker) [![Bower version](https://badge.fury.io/bo/angular-google-picker.svg)](http://badge.fury.io/bo/angular-google-picker) [![Coverage Status](https://coveralls.io/repos/github/softmonkeyjapan/angular-google-picker/badge.svg?branch=master)](https://coveralls.io/github/softmonkeyjapan/angular-google-picker?branch=master) +[![npm version](https://badge.fury.io/js/angular-google-picker.svg)](http://badge.fury.io/js/angular-google-picker) +[![Bower version](https://badge.fury.io/bo/angular-google-picker.svg)](http://badge.fury.io/bo/angular-google-picker) +[![Coverage Status](https://coveralls.io/repos/github/softmonkeyjapan/angular-google-picker/badge.svg?branch=master)](https://coveralls.io/github/softmonkeyjapan/angular-google-picker?branch=master) [![Build Status](https://travis-ci.org/softmonkeyjapan/angular-google-picker.svg?branch=master)](https://travis-ci.org/softmonkeyjapan/angular-google-picker) +[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) Angular directive that interact with the Google Picker API : * [Google Picker API Overview](https://developers.google.com/picker/) @@ -13,7 +16,7 @@ Angular directive that interact with the Google Picker API : **File Size:** 2.1Kb minified -# Installation +## Installation 1. Using Bower (recommended) @@ -32,7 +35,7 @@ Angular directive that interact with the Google Picker API : Download [https://github.com/softmonkeyjapan/angular-google-picker/archive/0.2.2.zip](https://github.com/softmonkeyjapan/angular-google-picker/archive/0.2.2.zip) -# Usage +## Usage 1. Include Google client and api script in your layout @@ -106,7 +109,7 @@ Every file is a json object that looks like : ``` -# Configuration +## Configuration In order to work, Google Picker needs to connect to the Google API using an application credentials (Api Key and client ID). For more information on how to create an application/project, please refer to [https://developers.google.com/drive/web/](https://developers.google.com/drive/web/). To do so, you'll need to configure the service. @@ -129,7 +132,7 @@ angular.module('myApp', ['lk-google-picker']) }]) ``` -### Features +## Features The Picker use the concept of views and features that allow you to customize it. The service provider allow you to enable some features to the Picker the same way you define your API Key or client ID (using either configure or setters). @@ -180,11 +183,11 @@ angular.module('myApp', ['lk-google-picker']) Please refer to [https://developers.google.com/picker/docs/reference](https://developers.google.com/picker/docs/reference) for more informations. -# Callbacks +## Callbacks The directive provide you 3 callbacks that you can use in order to work with the Picker. -### onLoaded +### `onLoaded` This callback is triggered after the picker has been initialized and shown on the page. @@ -202,7 +205,7 @@ angular.module('myApp', ['lk-google-picker']) Open my Google Drive ``` -### onPicked +### `onPicked` This callback is triggered after you select files and click on the `select` button from the Picker. @@ -220,7 +223,7 @@ angular.module('myApp', ['lk-google-picker']) Open my Google Drive ``` -### onCancel +### `onCancel` This callback is triggered after the picker has been closed by clicking on the cancel button from the picker. @@ -238,7 +241,7 @@ angular.module('myApp', ['lk-google-picker']) Open my Google Drive ``` -# Example +## Demo The demo version available at [http://softmonkeyjapan.github.io/angular-google-picker/](http://softmonkeyjapan.github.io/angular-google-picker/) can be found in the `example` folder. You will need a server in order to try it on your local machine. Since the Google Picker demo application is setup to allow origin from localhost:8000, I encourage you to use the python `SimpleHTTPServer` : @@ -251,11 +254,5 @@ Serving HTTP on 0.0.0.0 port 8000 ... You should now be able to browse to `localhost:8000` and see it in action from your localhost. - -# Demo - -A demo version is available at [http://softmonkeyjapan.github.io/angular-google-picker/](http://softmonkeyjapan.github.io/angular-google-picker/). - - -# License +## License Licensed under the MIT license diff --git a/gulpfile.js b/gulpfile.js index 89cbe4e..cb7e5d4 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -2,6 +2,9 @@ var gulp = require('gulp'); var KarmaServer = require('karma').Server; var uglify = require('gulp-uglify'); var rename = require('gulp-rename'); +var conventionalChangelog = require('gulp-conventional-changelog'); + +gulp.task('default', ['watch']); // Copy non-uglify version to "dist" gulp.task('copy', ['test'], function () { @@ -30,4 +33,10 @@ gulp.task('watch', function () { gulp.watch('test/**/*.spec.js', ['test']); }); -gulp.task('default', ['watch']); +gulp.task('changelog', function () { + return gulp.src('CHANGELOG.md', {buffer: false}) + .pipe(conventionalChangelog({ + preset: 'angular' + })) + .pipe(gulp.dest('.')); +}); diff --git a/package.json b/package.json index 86b6f8c..364ef2a 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,10 @@ "author": "Loic Kartono (http://www.kartono-loic.com)", "scripts": { "postinstall": "bower install", - "prepublish": "npm test", "pretest": "rimraf coverage/", - "test": "gulp test" + "test": "gulp test", + "preversion": "npm test", + "postversion": "gulp changelog && git commit -a --amend --no-edit && npm publish" }, "contributors": [ { @@ -20,10 +21,11 @@ "coveralls": "^2.11.9", "cz-conventional-changelog": "^1.1.6", "gulp": "^3.8.8", + "gulp-conventional-changelog": "^1.1.0", "gulp-rename": "^1.2.0", "gulp-uglify": "^1.0.1", "jasmine-core": "^2.4.1", - "karma": "^0.13.22", + "karma": "^1.1.0", "karma-coverage": "^1.0.0", "karma-jasmine": "^1.0.2", "karma-phantomjs-launcher": "^1.0.0",