Skip to content
This repository was archived by the owner on Oct 30, 2020. It is now read-only.

Commit e6603cb

Browse files
committed
Use platform specific endline character
1 parent 6c5faac commit e6603cb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cssModuleToInterface.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import path from 'path';
2+
import os from 'os';
23

34
const filenameToInterfaceName = (filename) => {
45
return path.basename(filename)
@@ -9,13 +10,13 @@ const filenameToInterfaceName = (filename) => {
910
const cssModuleToTypescriptInterfaceProperties = (cssModuleKeys, indent = ' ') => {
1011
return cssModuleKeys
1112
.map((key) => `${indent}'${key}': string;`)
12-
.join('\n');
13+
.join(os.EOL);
1314
};
1415

1516
const cssModuleToNamedExports = (cssModuleKeys) => {
1617
return cssModuleKeys
1718
.map((key) => `export const ${key}: string;`)
18-
.join('\n');
19+
.join(os.EOL);
1920
};
2021

2122
const allWordsRegexp = /^\w+$/i;

0 commit comments

Comments
 (0)