updated readme; upgraded @google/clasp to v1.5.3
This commit is contained in:
committed by
Elisha Nuchi
parent
461c78c21e
commit
118af27cc0
@@ -1,11 +1,11 @@
|
||||
|
||||
## React + Google Apps Script
|
||||
## React + Google Apps Script
|
||||
*Use this demo project as your boilerplate React app for HTML dialogs in Google Sheets, Docs and Forms.*
|
||||
|
||||
This project uses labnol's excellent [apps-script-starter](https://github.com/labnol/apps-script-starter) as a starting point, adding support for React. It demonstrates how easy it is to build React apps that interact with Google Apps server-side scripts. Simply clone this project and modify the source code to get started developing with React for Google Apps Script client-side dialogs.
|
||||
|
||||

|
||||
*The demo app for Google Sheets shows insertion/deletion/activation of sheets through React-built HTML dialog.*
|
||||
*The demo app for Google Sheets shows insertion/deletion/activation of sheets through React-built HTML dialog.*
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -23,19 +23,16 @@ Paste the **scriptId** into the .clasp.json file as below:
|
||||
{"rootDir": "dist",
|
||||
"scriptId":"...paste scriptId here..."}
|
||||
```
|
||||
If you have not enabled Google's Apps Script API, do so by visiting https://script.google.com/home/usersettings.
|
||||
Log into CLASP to push code to the server from the command line:
|
||||
```
|
||||
npx clasp login
|
||||
```
|
||||
Modify the server-side and client-side source code in the `src` folder using ES6/7 and React. Change the scopes in `appsscript.json` if needed. When you're ready, build the app!
|
||||
Modify the server-side and client-side source code in the `src` folder using ES6/7 and React. Change the scopes in `appsscript.json` if needed. When you're ready, build the app and deploy!
|
||||
```
|
||||
npm run build
|
||||
npm run deploy
|
||||
```
|
||||
Webpack will display any linting errors, and then bundle your files in `dist`. Finally, push your files to Google's servers using CLASP:
|
||||
```
|
||||
clasp push
|
||||
```
|
||||
|
||||
Webpack will display any linting errors, bundle your files in `dist`, and push your files to Google's servers using CLASP. You can run `npm run build` to just build.
|
||||
|
||||
## The sample app
|
||||
Insert/activate/delete sheets through a simple HTML dialog, built with React. Access the dialog through the new menu item that appears. You may need to refresh the spreadsheet and approve the app's permissions the first time you use it.
|
||||
@@ -98,7 +95,7 @@ This project includes support for GAS definitions and autocomplete through a [Te
|
||||
|
||||
Tern provides many indispensable tools for working with Google Apps Script, such as autocompletion on variables and properties, function argument hints and querying the type of an expression.
|
||||
|
||||
- Autocomplete example. Lists all available methods from the appropriate Google Apps Script API:
|
||||
- Autocomplete example. Lists all available methods from the appropriate Google Apps Script API:
|
||||

|
||||
|
||||
- Full definitions with links to official documentation, plus information on argument and return type:
|
||||
@@ -131,4 +128,4 @@ const clientConfig = Object.assign({}, sharedConfigSettings, {
|
||||
{
|
||||
```
|
||||
## Suggestions
|
||||
Open a pull request!
|
||||
Open a pull request!
|
||||
|
||||
Reference in New Issue
Block a user