Closed MTRNord closed 8 years ago
I wonder if this could have been made neater, by doing e.g.
var path_separator = '/'
if (process.platform == 'win32') {
path_separator == '\\'
}
var folderName = filepath.split(path_separator).slice(-1)[0]
var jsonFile = path.normalize(filepath + path_separator + folderName + '.json')
? (with similar changes where you build the blocksFolder
string)
As I now mentioned in the linked issue it could also be a good thing to use path.join() also codeclimate would give it than a better result maybe :D Doc Reference: https://nodejs.org/api/path.html#path_path_join_path I am testing this now on my Mashine. If it works I will tell here :)
As mentioned in https://github.com/davidferguson/pibakery-blocks/issues/7 in windows the drag and drop did not work. Here is the fix for it.