@sheplu/editorconfig 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +21 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,13 +1,28 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { copyFile } from 'node:fs/promises';
3
+ import { writeFileSync } from "node:fs";
4
4
 
5
- export async function createEditorConfig(path = '.editorconfig') {
6
- await copyFile('.editorconfig', path);
5
+ const editorconfigContent = `root = true
6
+
7
+ [*]
8
+ indent_style = tab
9
+ indent_size = 4
10
+ tab_width = 4
11
+ end_of_line = lf
12
+ charset = utf-8
13
+ spelling_language = en
14
+ trim_trailing_whitespace = true
15
+ insert_final_newline = true
16
+ quote_type = single
17
+ spaces_around_operators = true
18
+ `;
19
+
20
+ export function createEditorConfig(path = '.editorconfig') {
21
+ writeFileSync(path, editorconfigContent, 'utf8');
7
22
  };
8
23
 
9
- async function main() {
10
- await createEditorConfig('tets');
24
+ function main() {
25
+ createEditorConfig();
11
26
  };
12
27
 
13
- await main();
28
+ main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheplu/editorconfig",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {