This is an application for rearranging files in the project of Google Apps Script which can be seen at the script editor.
This is an application for rearranging Google Apps Scripts (GAS) in a project which can be seen at the script editor.
Have you ever thought about rearranging Google Apps Scripts in a project which can be seen at the script editor? I also have thought about it. Finally, I could find the workaround to do it. And recently, I have given this function to ggsrun which is a CLI tool. Furthermore, I thought that if there is a GUI application for rearranging scripts in a project, it may be useful for more users. So I created this. This application is add-on application which was made of GAS. The flow of rearrangement of files in a project using this application is as follows.
1. Read a Google Apps Script project that you selected from your Google Drive by select box and text box. In the select box, users can select a project file. In the text box, users can directly input the file ID of project.
2. When the project is selected, the files in the project are displayed on the side bar.
3. The displayed files can be rearranged by user's mouse.
4. When the rearrangement was completed, users can saved the project with the rearranged files.
- When the rearranged project is saved, users can select overwrite or create as new project on user's Google Drive.
The projects of the standalone script type and the container-bound script type can be used.
1. For rearranging scripts, there is one important point. When scripts in a project is rearranged, version history of scripts is reset once. So if you don't want to reset the version history, please push "Save!" with "Create as new project". By saving with "Create as new project", new project with the rearranged scripts will be created to root folder on your Google Drive. When you click "Overwrite to project", the rearranged scripts will be reflected to the selected project.
2. About appsscript.json, this file got to be displayed to the top of files at script editor by recent updated. But the order of files in the project can be changed by this addon. So appsscript.json is included in the file list.
- Post-install tip
1. After installation, click Add-ons -> RearrangeScripts -> Rearrange scripts
2. By this, addon is launched at sidebar, users can see "Select project".
3. At "Select project", users select a standalone project by clicking the triangle of right side. The list is displayed only standalone projects.
4. If you want to rearrange projects of bound script type, you can do it by inputting file ID of the project to text box, and click "ok".
5. When users select one of project or input file ID, "Rearrange scripts" and scripts in the selected project are shown. The scripts are shown at gray color zone.
6. Users can rearrange and reorder each scripts using own mouse.
7. When the rearrangement is done, the project can be saved by clicking "Save!" button. At that time, users can select the save method. When "Overwrite to project" is selected, the rearranged scripts are overwritten to the selected project. When "Create as new project" is selected, the rearranged scripts are saved as a new project. The new project is created to root folder.
8. When users click filename of the project, the project is opened.