matype / stylefmt

stylefmt is a tool that automatically formats stylesheets.
Other
2.1k stars 89 forks source link

Revert #151 #160

Closed mrmlnc closed 8 years ago

mrmlnc commented 8 years ago

Please give the possibility to set cwd.

matype commented 8 years ago

@mrmlnc Why do you want to add cwd option? I read your code of vscode-stylefmt (thanks for creating it :) ). You use cwd here. stylefmt can read a file from stdin, so I think that you don't have to get current working directory from options, and run stylefmt as a postcss plugin.

May I ask if you understand what I mean? So sorry, I"m not good at English.

mrmlnc commented 8 years ago

@morishitter, cwd need to search config in current project directory by params.js. For example, add console.log(process.cwd()) in params.js and run plugin:

// process.cwd() in params.js
C:\Program Files (x86)\Microsoft VS Code

// Current project (where has been launched the plugin)
C:\projects\test\test.css