From 4af77841d8f1976a9669b78f48d618501805a07a Mon Sep 17 00:00:00 2001 From: yutaro Date: Thu, 19 Nov 2015 10:46:40 +0900 Subject: [PATCH 1/4] Add closure compiled dist --- Gruntfile.coffee | 10 ++++++++++ dist/googleSpreadsheetsParser.min.js | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 dist/googleSpreadsheetsParser.min.js diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 99951c9..389cc52 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -25,8 +25,18 @@ module.exports = (grunt)-> url: "https://spreadsheets.google.com/feeds/cells/1vyPu1EtzU1DvGXfthjrR-blJ8mGe75TL4BFNWtFMm0I/od6/public/values?alt=json" dest: 'spec/fixtures/sampleDataFeed.json' + 'closure-compiler': + publish: + js: 'dist/googleSpreadsheetsParser.js' + jsOutputFile: 'dist/googleSpreadsheetsParser.min.js' + noreport: true + options: + compilation_level: 'SIMPLE_OPTIMIZATIONS' + grunt.loadNpmTasks 'grunt-contrib-coffee' grunt.loadNpmTasks 'grunt-karma' grunt.loadNpmTasks 'grunt-http' + grunt.loadNpmTasks 'grunt-closure-compiler' grunt.registerTask 'spec', ['http', 'karma'] + grunt.registerTask 'publish', ['coffee:dist', 'closure-compiler:publish'] diff --git a/dist/googleSpreadsheetsParser.min.js b/dist/googleSpreadsheetsParser.min.js new file mode 100644 index 0000000..c9b9ed2 --- /dev/null +++ b/dist/googleSpreadsheetsParser.min.js @@ -0,0 +1,4 @@ +var GoogleSpreadsheetsParser,GoogleSpreadsheetsUtil; +GoogleSpreadsheetsUtil=function(){function d(){}d.prototype.extractKey=function(b){b=b.match(/https:\/\/docs.google.com\/spreadsheets\/d\/(.+)\/pubhtml/);return null===b||2!==b.length?null:b[1]};d.prototype.getWorksheetId=function(b){var a;a=new XMLHttpRequest;a.open("GET","https://spreadsheets.google.com/feeds/worksheets/"+b+"/public/basic?alt=json",!1);a.send();b=[];200===a.status&&(a=JSON.parse(a.responseText),b=a.feed.entry[0].id.$t.match(/https:\/\/spreadsheets.google.com\/feeds\/worksheets\/.+\/public\/basic\/(.+)/));return null=== +b||2!==b.length?null:b[1]};d.prototype.getFeeds=function(b,a){var c,e;e=new XMLHttpRequest;e.open("GET","https://spreadsheets.google.com/feeds/cells/"+b+"/"+a+"/public/values?alt=json",!1);e.send();c=null;200===e.status&&(c=JSON.parse(e.responseText));return c};d.prototype.makeTitle=function(b){var a,c,e,d;d=[];c=0;for(e=b.length;c Date: Thu, 19 Nov 2015 10:54:52 +0900 Subject: [PATCH 2/4] Publish to npm --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4866969..1bcefef 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { - "name": "google-spread-sheet-parser", + "name": "google-spreadsheets-parser", + "description": "Simple Google Spreadsheets parser for JavaScript", "version": "0.1.0", "scripts": { "test": "grunt spec" @@ -7,10 +8,11 @@ "keywords": [ "google", "spreadsheet", + "google drive", "parser", "json" ], - "author": "@tanaka_yutaro", + "author": "yutaro ", "license": "MIT", "repository": "git@github.com:TanakaYutaro/google-spreadsheets-parser.git", "devDependencies": { From 3a6523edad261c9ef756bbade39d7cc208c4f3a7 Mon Sep 17 00:00:00 2001 From: yutaro Date: Thu, 19 Nov 2015 11:12:39 +0900 Subject: [PATCH 3/4] Publish to bower --- bower.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 bower.json diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..368ad5e --- /dev/null +++ b/bower.json @@ -0,0 +1,17 @@ +{ + "name": "google-spreadsheets-parser", + "version": "0.1.0", + "homepage": "https://github.com/TanakaYutaro/google-spreadsheets-parser", + "authors": [ + "yutaro " + ], + "description": "Simple Google Spreadsheets parser for JavaScript", + "license": "MIT", + "keywords": [ + "google", + "spreadsheet", + "google drive", + "parser", + "json" + ] +} From adc644c809374cda74691b454dd2cc74534d73a3 Mon Sep 17 00:00:00 2001 From: yutaro Date: Thu, 19 Nov 2015 11:16:50 +0900 Subject: [PATCH 4/4] Update README.md Add installation info --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index b79cd26..08de1a1 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,22 @@ # google-spreadsheets-parser Simple Google Spreadsheets parser for JavaScript +## Installation + +#### NPM +``` +npm install google-spreadsheets-parser +``` + +#### Bower +``` +bower install google-spreadsheets-parser +``` + +#### Manual Download +Download from [here](https://github.com/TanakaYutaro/google-spreadsheets-parser/releases) + + ## Introduction 1. Create new Google Spreadsheet