Skip to content

Commit

Permalink
Added command to create new resx file, update namespace and C# resour…
Browse files Browse the repository at this point in the history
…ce file generator fix (#95)
  • Loading branch information
pmahend1 authored Nov 29, 2024
1 parent acc7fd0 commit beba886
Show file tree
Hide file tree
Showing 25 changed files with 1,044 additions and 873 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
webpack.config.js
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ node_modules
dist
.pnp.*
.yarn/*
.idea
!.yarn/patches
!.yarn/plugins
!.yarn/releases
Expand Down
10 changes: 6 additions & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"script": "watch", // this is from package.json
"problemMatcher": "$ts-checker-webpack-watch", //connor4312.esbuild-problem-matchers
"isBackground": true,
"presentation": {
"reveal": "never"
"reveal": "never",
"showReuseMessage": true,
"panel": "dedicated"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
}
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# Change Log

## 7.0.0 - 29-Nov-2024

- Added feature to add a new resx file.
- Added feature to add/update resx namespace.
- Improvements to C# resource file generation. No longer needs resgen.
- Fixed some issues with generation of C# resource file.
- Webview Resx editor is default now.
- `yarn` upgrades.

## 6.1.1 - 18-Jun-2024

- `yarn` upgrades.
- Fixes [braces vulnerability](https://github.com/advisories/GHSA-grv7-fg5c-xmjg)
- Fixes [braces vulnerability](https://github.com/advisories/GHSA-grv7-fg5c-xmjg)

## 6.1.0 - 17-Apr-2024

Expand Down
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,8 @@ It offers the following features;
- To and Fro updates between Text document and ResxEditors as soon as typed valid resx data.
- To and fro updates Text document and ResxEditors when Save triggered on either.
- Automatically regenerate strongly typed resource class file(controlled by setting)

### Settings

`generateStronglyTypedResourceClassOnSave`: Generate/update strongly typed resource class files when updates to resx files are made. Default is **`false`**.
Ex: Resource1.resx → Resource1.Designer.cs
> **Note**: *Windows:* You will need to add `resgen` to environment PATH.
> Other platforms it is generated by the extension. May not be reliable.
- Add a new resx file.
- Update C# namespace of a resx file.

### ResXpress: Markdown Preview

Expand All @@ -63,6 +58,14 @@ Preview resx file as a nice Webview table.

![Screenshot3](./images/webPreview.gif)

### Adding new resx file

![Adding resx file](./images/createNewResxFile.gif)

### Updating resx C# namespace

![Resx namespace](./images/updateResxNamespace.gif)

### Resx Data Snippet

- Type `resx` and snippet will pop up.
Expand All @@ -76,9 +79,10 @@ Preview resx file as a nice Webview table.
- Built in markdown support
- VS code 1.69+

## Extension Settings
### Settings

None as of now.
`generateStronglyTypedResourceClassOnSave`: Generate/update strongly typed resource class files when updates to resx files are made. Default is **`false`**.
Ex: Resource1.resx → Resource1.Designer.cs

## Known Issues

Expand Down
Binary file added images/createNewResxFile.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/resxEditor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/updateResxNamespace.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 30 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"color": "#123456",
"theme": "dark"
},
"version": "6.1.1",
"version": "7.0.0",
"engines": {
"vscode": "^1.69.0"
},
Expand All @@ -38,7 +38,7 @@
"filenamePattern": "*.resx"
}
],
"priority": "option"
"priority": "default"
}
],
"commands": [
Expand All @@ -53,6 +53,14 @@
{
"command": "resxpress.newpreview",
"title": "ResXpress: Web Preview"
},
{
"command": "resxpress.setNameSpace",
"title": "ResXpress: Set Namespace"
},
{
"command": "resxpress.createResxFile",
"title": "ResXpress: Create a Resx Resources file"
}
],
"snippets": [
Expand All @@ -76,6 +84,18 @@
"group": "3_preview",
"when": "resourceExtname == .resx"
}
],
"explorer/context": [
{
"command": "resxpress.setNameSpace",
"group": "3_preview",
"when": "resourceExtname == .resx"
},
{
"command": "resxpress.createResxFile",
"group": "3_preview",
"when": "foldersViewVisible"
}
]
},
"configuration": [
Expand All @@ -85,7 +105,7 @@
"resxpress.configuration.generateStronglyTypedResourceClassOnSave": {
"type": "boolean",
"default": false,
"markdownDescription": "Generate/update strongly typed resource class files when updates to resx files are made. Default is **`false`** \n\n Ex: Resource1.resx → Resource1.Designer.cs \n\n > **Note**: Windows : You will need to add `resgen` to environment PATH. \n\n Other platforms it is generated by extension. May not be reliable. "
"markdownDescription": "Generate/update strongly typed resource class files when updates to resx files are made. Default is **`false`** \n\n Ex: Resource1.resx → Resource1.Designer.cs"
}
}
}
Expand All @@ -107,13 +127,13 @@
],
"markdown": "standard",
"scripts": {
"compile": "tsc -p ./",
"lint": "eslint -c .eslintrc.json --ext .ts ./src",
"watch": "tsc -watch -p ./",
"vscode:prepublish": "webpack --mode production",
"webpack": "webpack --mode development",
"webpack-dev": "webpack --mode development --watch",
"test-compile": "tsc -p ./"
"compile": "webpack --mode development",
"watch": "webpack --mode development --watch",
"vscode:prepublish": "npm run package",
"package": "webpack --mode production --devtool hidden-source-map",
"compile-tests": "tsc -p . --outDir out",
"pretest": "npm run compile-tests",
"test": "vscode-test"
},
"devDependencies": {
"@types/glob": "^8.0.0",
Expand Down
Loading

0 comments on commit beba886

Please sign in to comment.