{
"scriptId":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"rootDir":"src"
}
scriptID
can be found by opening up the script editor and then select Project Settings > IDs
rootDir
is optional - depends on where you place the code.
IMPORTANT: This file needs to be placed inside the location where the code for a specific appscript instance lives.
Depending on how clasp is installed, we can execute it directly by typing in clasp or prefixing npx on the clasp command
eg:
clasp status //installed globally
npx clasp status //installed inside a project
Command | Description |
---|---|
clasp login | Perform login on the clasp command-line Make sure to enable API access |
clasp clone | Clones the script project - Clone using scriptID clasp clone "15ImUCpyi1Jsd8yF8Z6wey_7cw793CymWTLxOqwMka3P1CzE5hQun6qiC" - Clone using script/editor URL clasp clone "https://script.google.com/d/15ImUCpyi1Jsd8yF8Z6wey_7cw793CymWTLxOqwMka3P1CzE5hQun6qiC/edit" - Clone to a sub directory clasp clone "15ImUCpyi1Jsd8yF8Z6wey_7cw793CymWTLxOqwMka3P1CzE5hQun6qiC" --rootDir ./src |
clasp push | Write local files to appscript - Upload current cloned project directory clasp push -Upload subdirectory that contains the project clasp push -P "src" |
clasp open | Opens the current project in the browser |
Written with StackEdit.