Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/product-os/dreamsheets-scripts
contains dreamsheet scripts used for scaffolded dreamsheets (or google app script spreadsheet) projects
https://github.com/product-os/dreamsheets-scripts
google-apps-script google-sheets
Last synced: 6 days ago
JSON representation
contains dreamsheet scripts used for scaffolded dreamsheets (or google app script spreadsheet) projects
- Host: GitHub
- URL: https://github.com/product-os/dreamsheets-scripts
- Owner: product-os
- License: apache-2.0
- Created: 2022-04-07T17:49:34.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-31T05:56:46.000Z (3 months ago)
- Last Synced: 2024-09-30T18:19:00.934Z (about 1 month ago)
- Topics: google-apps-script, google-sheets
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/dreamsheets-scripts
- Size: 762 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Dreamsheets Scripts
This package includes scripts and configuration used to scaffold and develop a _dreamsheet_ project/codebase using version controlled typescript. A "dreamsheet" is a google sheets project that has [google-app-script](https://developers.google.com/apps-script/guides/sheets) (typescript) code it relies upon to give the google spreadsheet "super-powers".
## Installation
You can create/scaffold a brand *new* dreamsheets project by running
```bash
npx dreamsheets-scripts@latest init name-of-new-project
```Alternatively, you can use this tool in an existing project by navigating to the project and adding ```dreamsheets-scripts@lastest``` to your
*devDependancies* and adding the following to your package.json's `"scripts"` section:```yaml
"build": "dsx build",
"test": "dsx test",
"push": "dsx push ",
```## Usage
### `dsx init `
Hydrates the specified directory (`new-project-name-or-path`) with a new, ready to develop dreamsheets project. It will copy template files to that directory, initialize it as git repo, and install dependencies.### `dsx test`
Runs unit ~and integration~ testing.
> Integration tests will be implimented in a larger future release.### `dsx build`
Bundles the source into a single javascript file (as is necessary for google app script) it readiness for deployment. This bundle is located at `dist/index.bundle.js`.### `dsx push [--oauth-scopes=scope1,scop2]`
Deploys the bundled script to the specified live (google sheet's) google app script.
You can alternatively specify the `script-id` via an environment variable (or a .env file) like:```
DSX_SCRIPT_ID=myScriptId_123 dsx push
```> Before you run this `push` sub-command, please ensure that you are logged in via [clasp](https://github.com/google/clasp) by running (this only needs to be done once across all projects)
> ```npx @google/clasp login```
> Once logged in, your access tokens will be saved in `~/.clasprc.json` in your home directory.#### OAuth Scops option
By default, the only oAuth scope used for deployment is 'https://www.googleapis.com/auth/spreadsheets'. If you would like to change that scope or provide extra scopes, you can do so by adding a `--oauth-scopes` flag. This should be a comma separated list of urls, for example:```
--oauth-scopes=https://www.googleapis.com/auth/spreadsheets.readonly,https://www.googleapis.com/auth/userinfo.email
```