Skip to content

Commit

Permalink
Version 1.3.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennykorsukewitz committed Nov 14, 2023
1 parent e282420 commit 6e8ad04
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 11 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

All notable changes to the "Znuny" extension will be documented in this file.

## [1.2.1]
## [1.3.0]

### AddFolderToWorkspace

- `Znuny - AddFolderToWorkspace: Add manually a directory...` - Paths can be added manually from now on. After that, the new workspace can be saved directly in the settings.
- Updated some title and placeHolder for `Znuny - AddFolderToWorkspace`
- Added additional check if vscode.workspace.workspaceFolders exists.
- Saves the new manually entered directory globally.
- Added new setting `znuny.addFolderToWorkspace.recursiveWorkspaces` to use recursive Workspaces (only first level).

## [1.2.0]

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

| Versions | Status |
| ------ | ------ |
| ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/dennykorsukewitz/Znuny%206.0) ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/dennykorsukewitz/Znuny%206.4) ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/dennykorsukewitz/Znuny%206.5) <br> ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/dennykorsukewitz/Znuny%207.0) ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/DK4/dev) | [![GitHub commits since tagged version](https://img.shields.io/github/commits-since/dennykorsukewitz/VSCode-Znuny/1.2.0/dev)](https://github.com/dennykorsukewitz/VSCode-Znuny/compare/1.2.0...dev) ![GitHub Workflow Lint](https://github.com/dennykorsukewitz/VSCode-Znuny/actions/workflows/lint.yml/badge.svg?branch=dev&style=flat&label=Lint) [![Snippet](https://github.com/dennykorsukewitz/VSCode-Znuny/actions/workflows/snippet.yml/badge.svg)](https://github.com/dennykorsukewitz/VSCode-Znuny/actions/workflows/snippet.yml) ![GitHub Workflow Pages](https://github.com/dennykorsukewitz/VSCode-Znuny/actions/workflows/pages.yml/badge.svg?branch=dev&style=flat&label=GitHub%20Pages) |
| ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/dennykorsukewitz/Znuny%206.0) ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/dennykorsukewitz/Znuny%206.4) ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/dennykorsukewitz/Znuny%206.5) <br> ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/dennykorsukewitz/Znuny%207.0) ![GitHub label version](https://img.shields.io/github/labels/dennykorsukewitz/DK4/dev) | [![GitHub commits since tagged version](https://img.shields.io/github/commits-since/dennykorsukewitz/VSCode-Znuny/1.3.0/dev)](https://github.com/dennykorsukewitz/VSCode-Znuny/compare/1.3.0...dev) ![GitHub Workflow Lint](https://github.com/dennykorsukewitz/VSCode-Znuny/actions/workflows/lint.yml/badge.svg?branch=dev&style=flat&label=Lint) [![Snippet](https://github.com/dennykorsukewitz/VSCode-Znuny/actions/workflows/snippet.yml/badge.svg)](https://github.com/dennykorsukewitz/VSCode-Znuny/actions/workflows/snippet.yml) ![GitHub Workflow Pages](https://github.com/dennykorsukewitz/VSCode-Znuny/actions/workflows/pages.yml/badge.svg?branch=dev&style=flat&label=GitHub%20Pages) |

## Features

Expand Down Expand Up @@ -113,7 +113,8 @@ This Function provides a searchable list of folders (Workspaces) that can be add

| Name | Description | Default Value |
| - | - | - |
| znuny.addFolderToWorkspace.workspaces | All searchable Workspaces. | /workspace/ |
| znuny.addFolderToWorkspace.workspaces | Provides a list of folders (Workspaces) that can be added to the current VSC Workspace. | /Users/ |
| znuny.addFolderToWorkspace.recursiveWorkspaces | Provides a searchable (only first level) list of folders (Workspaces) that can be added to the current VSC Workspace. | /Users/ |

---

Expand Down
12 changes: 9 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# [1.2.1]
# [1.3.0]

## AddFolderToWorkspace

- `Znuny - AddFolderToWorkspace: Add manually a directory...` - Paths can be added manually from now on. After that, the new workspace can be saved directly in the settings.
- Updated some title and placeHolder for `Znuny - AddFolderToWorkspace`
### Maintenance

- Added additional check if vscode.workspace.workspaceFolders exists.
- Saves the new manually entered directory globally.

### Recursive Workspaces (only first level)

- Added new setting `znuny.addFolderToWorkspace.recursiveWorkspaces` to use recursive Workspaces (only first level).
14 changes: 12 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "znuny",
"displayName": "Znuny",
"description": "Znuny is an extension that helps you to make Znuny development easier, faster and more error-free.",
"version": "1.2.0",
"version": "1.3.0",
"publisher": "dennykorsukewitz",
"icon": "doc/images/icon.png",
"license": "SEE LICENSE IN LICENSE",
Expand Down Expand Up @@ -537,9 +537,19 @@
"items": {
"type": "string"
},
"description": "Provides a searchable list of folders (Workspaces) that can be added to the current VSC Workspace.",
"description": "Provides a list of folders (Workspaces) that can be added to the current VSC Workspace.",
"default": []
},
"znuny.addFolderToWorkspace.recursiveWorkspaces": {
"type": "array",
"items": {
"type": "string"
},
"description": "Provides a searchable (only first level) list of folders (Workspaces) that can be added to the current VSC Workspace.",
"default": [
"/Users/"
]
},
"znuny.statusBar.enabled": {
"type": "string",
"description": "Defines when the StatusBar should be updated.",
Expand Down
9 changes: 6 additions & 3 deletions src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,17 @@ function initAddFolderToWorkspace(context) {
let config = vscode.workspace.getConfiguration('znuny').get('addFolderToWorkspace');

// Check if workspaces are defined.
if (!config.workspaces.length) {
if (!config.workspaces.length && !config.recursiveWorkspaces.length) {
vscode.commands.executeCommand('workbench.action.openSettings', 'addFolderToWorkspace');
vscode.window.showWarningMessage(`Znuny - AddFolderToWorkspace: Workspaces - Undefined`, { detail: 'Define at least one workspace (fullpath).\n\nExample: "/Users/workspace/"', modal: true });
return;
}

// Get all first level directories.
config.workspaces.forEach(myWorkspace => {
// Add all stored workspaces / directories.
workspaceDirectories = config.workspaces || [];

// Get all first level directories from given directories.
config.recursiveWorkspaces.forEach(myWorkspace => {
let workspaceDirectory = fs.readdirSync(myWorkspace, { withFileTypes: true })
.filter(dir => dir.isDirectory())
.map(dir => myWorkspace + dir.name);
Expand Down

0 comments on commit 6e8ad04

Please sign in to comment.