Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 12, 2023. It is now read-only.

Commit ae340f6

Browse files
committed
added command to export config, fixes #88
1 parent 26c9da7 commit ae340f6

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

‎src/extension.ts‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,15 @@ export function activate(context: vscode.ExtensionContext): void {
7070

7171
}),
7272

73+
74+
// Export config for easy debug.
7375
vscode.commands.registerCommand(`${EXT_ID}.exportConfig`, () => {
74-
// this doesn't work?
75-
// vscode.workspace.openTextDocument({ language: 'json', content: JSON.stringify(config)});
76-
output.writeln('[JS & CSS Minifier Configuration]');
77-
output.writeln(`\t${JSON.stringify(config)}`);
78-
output.show();
76+
77+
vscode.workspace.openTextDocument({ language: 'json', content: JSON.stringify(config, null, 4)})
78+
.then(doc => {
79+
vscode.window.showTextDocument(doc);
80+
});
81+
7982
})
8083

8184
);

‎src/test/workspace/.autoprefixerrc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /