You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-19
Original file line number
Diff line number
Diff line change
@@ -30,35 +30,35 @@ You can do this one of two ways:
30
30
1. In the menu that appears, choose `Other` for the `Application type`.
31
31
1. Give it any name you like and click `Create`.
32
32
1. Finally, download your credentials using the `Download as JSON` button to the right.
33
-
- Save these credentials to a location of your choosing; `~/Downloads` is fine.
33
+
* Save these credentials to a location of your choosing; `~/Downloads` is fine.
34
34
1. You may close the Developer Console window.
35
35
36
36
#### 1.2 Independent Developer Console Project
37
37
38
38
1. Create a new Dev Console Project
39
39
1. Use [this link](https://console.developers.google.com/start/api?id=drive&credential=client_key) to create the project. It will auto-activate the Google Drive API.
40
-
- If you have multiple Google Accounts, append `&authuser=1` to the end of the url to choose which account to login with. Note that `authuser` is zero-indexed.
40
+
* If you have multiple Google Accounts, append `&authuser=1` to the end of the url to choose which account to login with. Note that `authuser` is zero-indexed.
41
41
1. Make sure `Create a New Project` is selected and hit `Continue`.
42
42
1. Once the project has been created, click `Go to Credentials`.
43
43
1. Acquire Google Drive Client Secret Credentials
44
44
1. Select `Add credentials`, choose the `OAuth 2.0 client ID` type
45
45
1. Click `Configure Consent Screen`.
46
46
1. Select your email address from the dropdown and assign your add-on a Project Name.
47
-
- This can always be changed later.
47
+
* This can always be changed later.
48
48
1.`Save` your Consent Screen
49
49
1. In the menu that appears, choose `Other` for the `Application type`.
50
50
1. Give it any name you like and click `Create`.
51
51
1. Finally, download your credentials using the `Download as JSON` button to the right.
52
-
- Save these credentials to a location of your choosing; `~/Downloads` is fine.
52
+
* Save these credentials to a location of your choosing; `~/Downloads` is fine.
53
53
1. You may close the Developer Console window.
54
-
- To return to this project later, select `Resources` > `Developer Console Project` while editing your script. Then click the link at the top of the dialog to open the Developer Console with this project selected.
54
+
* To return to this project later, select `Resources` > `Developer Console Project` while editing your script. Then click the link at the top of the dialog to open the Developer Console with this project selected.
55
55
56
56
### 2. Authenticate `gapps`
57
57
58
58
This process will set up Google Drive authentication to allow uploading and importing of the Apps Script project.
59
59
60
60
1. Run `gapps auth path/to/client_secret_abcd.json`
61
-
- i.e. `gapps auth ~/Downloads/client_secret_1234567890-abcd.apps.googleusercontent.com.json`
61
+
* i.e. `gapps auth ~/Downloads/client_secret_1234567890-abcd.apps.googleusercontent.com.json`
62
62
1. Follow the directions by clicking on the link generated by the script.
63
63
1. After you're successfully authenticated, feel free to delete the `client_secret.json` credentials file.
64
64
@@ -72,21 +72,21 @@ This proces will create `gapps.config.json` and a sub-directory where all Apps S
72
72
73
73
1. Navigate to your Apps Script project from Google Drive (must be a [standalone script](https://developers.google.com/apps-script/guides/standalone))
74
74
1. Get your project ID from the address bar, located after `/d/` and before `/edit`.
75
-
- For example, '//script.google.com/a/google.com/d/__abc123-xyz098__/edit?usp=drive_web'
75
+
* For example, '//script.google.com/a/google.com/d/__abc123-xyz098__/edit?usp=drive_web'
76
76
1. Navigate to a directory where your Apps Script project will live
77
77
1. Run `gapps init <fileId>` within your project directory.
78
-
- For example, `gapps init abc123-xyz098`
78
+
* For example, `gapps init abc123-xyz098`
79
79
80
80
#### 3.2 A new Apps Script project
81
81
82
82
1. Head to [https://script.google.com](https://script.google.com) and create a new blank project.
83
83
1. Save the mostly empty project and give it a name.
84
-
- Saving is important; the project is not in your Google Drive until it is saved.
84
+
* Saving is important; the project is not in your Google Drive until it is saved.
85
85
1. Get your project ID from the address bar, located after `/d/` and before `/edit`.
86
-
- For example, '//script.google.com/a/google.com/d/__abc123-xyz098__/edit?usp=drive_web'
86
+
* For example, '//script.google.com/a/google.com/d/__abc123-xyz098__/edit?usp=drive_web'
87
87
1. Navigate to a directory where your Apps Script project will live
88
88
1. Run `gapps init <fileId>` within your project directory.
89
-
- For example, `gapps init abc123-xyz098`
89
+
* For example, `gapps init abc123-xyz098`
90
90
91
91
92
92
### 4. Develop locally
@@ -100,14 +100,7 @@ Run `gapps upload` from within your project directory. You should then be able t
100
100
101
101
## Best Practices
102
102
103
-
- Only upload to Google Drive and never edit files in the web IDE
104
-
- This way the true state of the code is locally or in git and you'll never
105
-
need to deal with issues where the states locally and remotely are not in
106
-
sync.
107
-
- You also get the benefits of structuring code within directories
108
-
- Individual developers can have separate devevelopment Apps Script projects,
109
-
and the overall solution can have shared test, ua-testing, and production
110
-
targets all with different settings.
103
+
Check out Matt Hessinger's blog post: [Advanced development process with apps](http://googledevelopers.blogspot.com/2015/12/advanced-development-process-with-apps.html)
0 commit comments