[null,null,["最終更新日 2025-07-25 UTC。"],[[["\u003cp\u003e\u003ccode\u003edscc-gen\u003c/code\u003e is a tool that automates repetitive tasks in creating and managing Data Studio community connectors.\u003c/p\u003e\n"],["\u003cp\u003eIt simplifies connector development by providing commands to create projects, push code updates, and deploy to Looker Studio.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use \u003ccode\u003edscc-gen\u003c/code\u003e with existing connectors or create new ones from scratch, streamlining their workflow.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003edscc-gen\u003c/code\u003e utilizes \u003ccode\u003eclasp\u003c/code\u003e for command-line interaction with Apps Script projects and provides various helpful commands like \u003ccode\u003enpm run watch\u003c/code\u003e, \u003ccode\u003enpm run try_latest\u003c/code\u003e, and \u003ccode\u003enpm run update_production\u003c/code\u003e for efficient development and deployment.\u003c/p\u003e\n"],["\u003cp\u003eTo get started with an existing connector, you need to obtain the \u003ccode\u003escriptId\u003c/code\u003e from the Apps Script project URL.\u003c/p\u003e\n"]]],[],null,["# Local development\n\nWhile you can accomplish all connector-related tasks using the online Apps\nScript environment, some of them can become repetitive and error-prone over\ntime.\n\n[`dscc-gen`](https://github.com/googledatastudio/dscc-gen) is an opinionated tool that's meant to address these repetitive\ntasks so you can focus on solving your business problem instead of errors that\ncan be avoided through automation.\n\nRequirements\n------------\n\n- [npm 5.2.0 or later](https://www.npmjs.com/get-npm)\n- Some familiarity with the command-line.\n\nUsing `dscc-gen`\n----------------\n\n`dscc-gen` can [create new community-connector projects](#new_connectors) or be\n[used with existing ones](#existing_connectors).\n\n### Existing connectors\n\n`dscc-gen` can also be used with existing projects. First,\n[copy your `scriptId`](#get_your_script_id), then run the following command (replacing\n`YOUR_SCRIPT_ID` with your `scriptId`.): \n\n npx @google/dscc-gen connector --script_id YOUR_SCRIPT_ID\n\nYou'll be prompted for a few details for your connector. If you don't already\nhave a deployment called \"Production\", one will be created for you. None of your\nexisting code will be modified, but you will have access to\n[everything `dscc-gen` can do](#what_can_dscc-gen_do).\n\n### New connectors\n\nTo create a new community-connector with `dscc-gen`, run the following command: \n\n npx @google/dscc-gen connector\n\n| **Note:** [npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) was added to npm 5.2.0. It runs one-off executables without modifying your `PATH`.\n\nYou'll be prompted for a few details for your new connector. First-time users\nwill be asked to authenticate `clasp`. [`clasp`](/apps-script/guides/clasp) is a tool for creating \\&\nmodifying Apps Script projects from the command-line.\n\nAfter completing the prompts, `dscc-gen` will create a new Apps Script project\nand print out [everything it can do](#what_can_dscc-gen_do).\n\nWhat can `dscc-gen` do?\n-----------------------\n\n| Command | Description |\n|-----------------------------|-------------------------------------------------------------|\n| `npm run open` | Open your project in Apps Script. |\n| `npm run push` | Push your local changes to Apps Script. |\n| `npm run watch` | Watch for local changes, and push them to Apps Script. |\n| `npm run prettier` | Format your code using community standards. |\n| `npm run try_latest` | Open the deployment with your latest code in Looker Studio. |\n| `npm run try_production` | Open your Production deployment in Looker Studio. |\n| `npm run update_production` | Update your production deployment to use your latest code. |\n\n| **Note:** All of these commands should be run from the top-level directory of your project.\n\nHow should I Use it?\n--------------------\n\nUsing `dscc-gen` often goes a little like this:\n\n1. Identify a feature you'd like to add to your connector.\n2. Run `npm run watch`, so local changes will be pushed to Apps Script.\n3. Make your code changes using your [favorite](https://code.visualstudio.com/) [JavaScript](https://www.sublimetext.com/) [editor](http://spacemacs.org/).\n4. Run `npm run tryLatest` and check that your new feature is working as expected.\n5. Run `npm run updateProduction` to update your production deployment to have your new feature.\n6. Run `npm run tryProduction` and double check that the new feature works.\n\nGet your script Id\n------------------\n\nTo get your `scriptId`, navigate to your existing project, then copy the section\nof the url after `/d/` and before `/edit`. For example: the following url:\n\n- Original Url: `https://script.google.com/a/google.com/d/example-script-id/edit`\n- Script Id: `example-script-id`"]]