File tree Expand file tree Collapse file tree 5 files changed +13
-33
lines changed Expand file tree Collapse file tree 5 files changed +13
-33
lines changed Original file line number Diff line number Diff line change 66 - GIT_AUTHOR_EMAIL=yosuke.kurami@gmail.com
77language : node_js
88node_js :
9- - 6
109- 8
1110- 9
1211before_script :
Original file line number Diff line number Diff line change 2424 ],
2525 "author" : " quramy" ,
2626 "license" : " MIT" ,
27+ "engines" : {
28+ "node" : " >=8.0.0"
29+ },
2730 "dependencies" : {
2831 "camelcase" : " ^5.3.1" ,
2932 "chalk" : " ^2.1.0" ,
Original file line number Diff line number Diff line change 1+ import * as fs from "fs" ;
12import * as os from "os" ;
23import * as path from "path" ;
34import isThere from "is-there" ;
45import * as mkdirp from 'mkdirp' ;
5- import { writeFile } from "./fs" ;
6+ import * as util from "util" ;
7+
8+ const writeFile = util . promisify ( fs . writeFile ) ;
69
710
811interface DtsContentOptions {
@@ -71,7 +74,7 @@ export class DtsContent {
7174 mkdirp . sync ( outPathDir ) ;
7275 }
7376
74- await writeFile ( this . outputFilePath , this . formatted ) ;
77+ await writeFile ( this . outputFilePath , this . formatted , 'utf8' ) ;
7578 }
7679}
7780
Original file line number Diff line number Diff line change 11/* this file is forked from https://raw.githubusercontent.com/css-modules/css-modules-loader-core/master/src/file-system-loader.js */
22
33import Core from 'css-modules-loader-core'
4+ import * as fs from 'fs'
45import * as path from 'path'
6+ import * as util from 'util'
57import { Plugin } from "postcss" ;
6- import { readFile } from "./fs" ;
78
89
910type Dictionary < T > = {
1011 [ key : string ] : T | undefined ;
1112} ;
1213
14+ const readFile = util . promisify ( fs . readFile ) ;
15+
1316
1417export default class FileSystemLoader {
1518 private root : string ;
@@ -51,7 +54,7 @@ export default class FileSystemLoader {
5154 }
5255
5356 try {
54- source = await readFile ( fileRelativePath ) ;
57+ source = await readFile ( fileRelativePath , "utf-8" ) ;
5558 }
5659 catch ( error ) {
5760 if ( relativeTo && relativeTo !== '/' ) {
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments