|
|
|
@ -116,23 +116,7 @@ const http = require('http'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let src = 'node_modules/Luciole/' |
|
|
|
|
let currentPath = path.join(basePath, src) |
|
|
|
|
if (!fs.existsSync(currentPath)) { |
|
|
|
|
fs.mkdirSync(currentPath,{recursive :true}) |
|
|
|
|
} |
|
|
|
|
const zipPath = path.join(currentPath,'Luciole_webfonts.zip') |
|
|
|
|
const file = fs.createWriteStream(zipPath) |
|
|
|
|
const request = http.get("http://www.luciole-vision.com/Fichiers/Luciole_webfonts.zip", function(response) { |
|
|
|
|
response.pipe(file) |
|
|
|
|
response.on('end', () => { |
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
var AdmZip = require("adm-zip") |
|
|
|
|
var zip = new AdmZip(zipPath) |
|
|
|
|
zip.extractAllTo(/*target path*/ currentPath, /*overwrite*/ true) |
|
|
|
|
},500) |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const importLucioleFont = () => { |
|
|
|
|
copySync( |
|
|
|
|
'node_modules/Luciole/Luciole_webfonts/Read Me.txt', |
|
|
|
|
'fonts/vendor/Luciole/Read Me.txt', |
|
|
|
@ -186,6 +170,25 @@ fs.writeFileSync( |
|
|
|
|
), |
|
|
|
|
css |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let currentPath = path.join(basePath, src) |
|
|
|
|
if (!fs.existsSync(currentPath)) { |
|
|
|
|
fs.mkdirSync(currentPath,{recursive :true}) |
|
|
|
|
} |
|
|
|
|
const zipPath = path.join(currentPath,'Luciole_webfonts.zip') |
|
|
|
|
const file = fs.createWriteStream(zipPath) |
|
|
|
|
const request = http.get("http://www.luciole-vision.com/Fichiers/Luciole_webfonts.zip", function(response) { |
|
|
|
|
response.pipe(file) |
|
|
|
|
response.on('end', () => { |
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
var AdmZip = require("adm-zip") |
|
|
|
|
var zip = new AdmZip(zipPath) |
|
|
|
|
zip.extractAllTo(/*target path*/ currentPath, /*overwrite*/ true) |
|
|
|
|
importLucioleFont() |
|
|
|
|
},500) |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// example
|
|
|
|
|