NoobYou can support me here: OverviewQuickly get started on new projects by copying the files you need from a template folder. Quick pick menus and variable substitutions allow the user to select how the initial project should be configured. Features
Known Issues
Thanks to
.noob\settings.jsonIf the folder you are copying files from contains a .noob folder and if that folder contains a settings.json, you'll be able to access some more advanced features of noob such as presenting the user with a menu of options to select from and specifying files in the folder that should have variables substituted. To have nested menus, simply create subfolders that also contain a .noob\settings.json file. Folder ChoiceTo provide a menu of options, simply create a folderPickItems element in your .noob\settings.json file as an array of objects that are very similar to the structure of a QuickPickItem. In addition to the array of options, you can provide a folderPickPlaceHolder element to indicate the prompt for the quick pick menu when it is displayed to the user. The possible options are described below:
Note that any folders that appear in the list of folder choices will be excluded from the copy if they are not the chosen folder. Variable SubstitutionTo substitue variables within a file, simply include the path to the file name in the toSubstitute array.
The following variables are supported:
Common FilesIf you have files that are common to all project types, simply place them in the configured noob folder. This allows your subfolders to only contain the differences. Why?This extension was created to solve a specific problem (aren't they all?). When starting a new project for the AL programming language, I would typically create a new project in Azure DevOps with a name that matched the name of my app. I would initialise the project with a .gitignore and README.md file that I intended to overwrite later (because the AL programming language is not an option to select when creating the gitignore). I would then ensure my local c:\dev\repos folder contained a folder that matched my customer name (for my per-tenant-extension), and clone the remote repository to the local folder. Finally I would overwrite the .gitignore and README.md with files from my template folder (along with many other files such as a logo, an app.json, a ruleset.json and all of the other files I need for my project). Oh, actually finally, I would then open my app.json file and put in a new GUID for the app id, and then set the app name to be the same as my current folder and reference the customer name in the publisher. When I said I would copy files from my template folder, I would set up my template folder by using the AL.GO! command in the AL Language extension to create an empty project for the version of AL and fill in my additional files. The template would need to be updated every time the file formats change in AL or new files are added in. This extension allows me to do all of the above with a single command in VS Code. It also allows me to centrally control the template folder within its own Azure DevOps repo so I can ensure settings can be rolled out to all developers easily with a simple refresh. When I created this extension, I figured the tool was fairly generic and may be useful to other developers for AL that configure their projects in a different way, or even for developers to get started on a project using a language I've never heard of. If you can make use of this tool, please enjoy using it. About meI am me. |