diff --git a/.eslintrc.json b/.eslintrc.json index 370c332..19d2db9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,20 +8,6 @@ "plugins": [ "@typescript-eslint" ], - "rules": { - "@typescript-eslint/naming-convention": [ - "warn", - { - "selector": "import", - "format": [ "camelCase", "PascalCase" ] - } - ], - "@typescript-eslint/semi": "warn", - "curly": "warn", - "eqeqeq": "warn", - "no-throw-literal": "warn", - "semi": "off" - }, "ignorePatterns": [ "out", "dist", diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..dc24e83 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,24 @@ +# Changelog +### v0.1.1 + +- Fix command identifier + + Use ID of extension as prefix in command ID and title. + +### v0.1.0 + +- Create LICENSE + + +- Add support for multiple files + + Use an object as config where each key-value is a file to be written. + + +- Scaffold to apply one file from settings + + Adds some configuration options to write one file from settings to the configured (or defaulted) dotfiles folder. + + +- Initial commit + diff --git a/package-lock.json b/package-lock.json index ebcad02..a9c9367 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dotfiles", - "version": "0.1.0", + "version": "0.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dotfiles", - "version": "0.1.0", + "version": "0.1.1", "license": "MIT", "devDependencies": { "@types/mocha": "^10.0.6", diff --git a/package.json b/package.json index 5d58874..65cfa5e 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "https://github.com/grgar/vscode-dotfiles" }, "description": "Apply dotfiles from settings", - "version": "0.1.0", + "version": "0.1.1", "license": "MIT", "preview": true, "engines": { @@ -23,8 +23,8 @@ "contributes": { "commands": [ { - "command": "config-setup.apply", - "title": "Apply Config from Config Setup" + "command": "dotfiles.apply", + "title": "dotfiles: Apply Config" } ], "configuration": { diff --git a/src/extension.ts b/src/extension.ts index 3f3d33b..e8f3739 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -6,7 +6,7 @@ const configNamespace = "dotfiles"; async function apply() { const config = vscode.workspace.getConfiguration(configNamespace); - const directory = config.get("directory", process.env["XDG_CONFIG_DIR"] ?? path.join(process.env["HOME"]!, ".config")); + const directory = config.get("directory") || process.env["XDG_CONFIG_DIR"] || path.join(process.env["HOME"]!, ".config"); const files = Object.entries(config.get("files", {})); for (const [file, content] of files) { const filePath = path.join(directory, file); @@ -24,7 +24,7 @@ async function apply() { } export function activate(context: vscode.ExtensionContext) { - context.subscriptions.push(vscode.commands.registerCommand('config-setup.apply', apply)); + context.subscriptions.push(vscode.commands.registerCommand("dotfiles.apply", apply)); } export function deactivate() { }