From be8081c98cbd4d259340ed4847b1901a3799fa29 Mon Sep 17 00:00:00 2001 From: Grant Timmerman Date: Fri, 8 Mar 2019 11:08:18 -0800 Subject: [PATCH] feat: Add main export for repo as module. Fixes #65. --- index.js | 24 ++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 index.js diff --git a/index.js b/index.js new file mode 100644 index 00000000..0f430d9a --- /dev/null +++ b/index.js @@ -0,0 +1,24 @@ +/** + * Exports all quickstarts. + */ +module.exports = { + quickstart: { + // Format {service}_{version}, like the Node client. + // @see https://github.com/googleapis/google-api-nodejs-client/tree/master/src/apis + admin_directory_v1: require('./adminSDK/directory'), + admin_reports_v1: require('./adminSDK/reports'), + reseller_v1: require('./adminSDK/reseller'), + script_v1: require('./apps-script/quickstart'), + calendar_v3: require('./calendar/quickstart'), + classroom_v1: require('./classroom/quickstart'), + docs_v1: require('./docs/quickstart'), + drive_v3: require('./drive/quickstart'), + appsactivity_v1: require('./drive/activity'), + appsactivity_v2: require('./drive/activity-v2'), + gmail_v1: require('./gmail/quickstart'), + people_v1: require('./people/quickstart'), + sheets_v4: require('./sheets/quickstart'), + slides_v1: require('./slides/quickstart'), + tasks_v1: require('./tasks/quickstart'), + }, +}; diff --git a/package.json b/package.json index 01c4635a..d76813d8 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "gsuite-node-samples", + "name": "@gsuite/samples", "version": "1.0.0", "description": "Node.js samples for [G Suite API](https://developers.google.com/gsuite/) docs.", "license": "MIT", @@ -22,6 +22,7 @@ "scripts": { "lint": "eslint **/*.js" }, + "main": ".", "eslintIgnore": [ "getFoldersUnderRoot.js", "**/node_modules/**"