1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 10:16:26 +00:00

export styles of code blocks

This commit is contained in:
Baptiste Augrain
2018-12-15 12:42:39 +01:00
parent 418a789568
commit d76b7235db
8 changed files with 179 additions and 46 deletions

View File

@@ -1,5 +1,6 @@
const fs = require('fs')
const path = require('path')
import fs from 'fs'
import fx from 'fs-extra'
import path from 'path'
/**
* @description Copy a file from source to destination
@@ -14,7 +15,8 @@ function copyFile (srcPath, dstPath) {
return new Promise((resolve, reject) => {
const dstFolder = path.dirname(dstPath)
if (!fs.existsSync(dstFolder)) fs.mkdirSync(dstFolder)
fx.ensureDirSync(dstFolder)
const input = fs.createReadStream(decodeURI(srcPath))
const output = fs.createWriteStream(dstPath)