gd-pages v1.1.0
Google Drive Pages
Publish your static files to Google Drive server and share
Inspired by Host webpages with Drive
Install
$ sudo npm install -g gd-pages
Creating a Service Account using the Google Developers Console
From the Google Developers Console, select your project or create a new one.
Under "APIs & auth", click "Credentials".
Under "OAuth", click the "Create new client ID" button.
Select "Service account" as the application type, key type "P12 Key" and click "Create Client ID".
The key for your new service account should prompt for download automatically.
Go to "APIs" than enable "Drive API" and "Drive SDK"
Notice: was taken from https://github.com/extrabacon/google-oauth-jwt
Usage
It waits for 4 parameters:
1. Service account -> Email address
2. Path to pem file
3. Path to folder for upload
4. Folder name
5. Sub folder (optional) can be useful for example: project-name/dev
$ gd-pages 525-8om6ltm23s2ep4@developer.gserviceaccount.com ./Test-39c6f.p12 ./dist project
var gdPages = require('gd-pages');
gdPages('525-8om6ltm23s2ep4@developer.gserviceaccount.com', './Test-39c6f.p12', './dist', 'project');
License
MIT © ButuzGOL