Skip to content

Instantly share code, notes, and snippets.

View emiliobondioli's full-sized avatar

Emilio Bondioli emiliobondioli

  • Turin, Italy
View GitHub Profile
@emiliobondioli
emiliobondioli / magpie.js
Last active January 27, 2022 22:55
Nuxt Magpie module
const fs = require('fs')
const { URL } = require('url')
const { join } = require('path')
const axios = require('axios')
const consola = require('consola')
const defaults = {
path: '/_images', // dir where downloaded images will be stored
extensions: ['jpg', 'jpeg', 'gif', 'png', 'webp'],
baseUrl: '' // cms url