This commit is contained in:
peli 2020-06-25 07:38:23 -07:00
Родитель 7eb1bd5c29
Коммит 424249f5d6
1 изменённых файлов: 15 добавлений и 9 удалений

Просмотреть файл

@ -1,18 +1,24 @@
const replace = require('replace-in-file');
const pkg = require('./package.json')
const pkg = require('../package.json')
const version = pkg.version;
console.log(`patching docs to ${version}`)
const options = {
files: './docs/**/*.html',
from: "/dist/jacdac.umd.js",
to: `https://cdn.jsdelivr.net/npm/jacdac-ts@${version}`
};
try {
async function patchDocs() {
console.log(`patching docs to ${version}`)
const options = {
files: './docs/**/*.html',
from: "/dist/jacdac.umd.js",
to: `https://cdn.jsdelivr.net/npm/jacdac-ts@${version}`
};
try {
const results = await replace(options)
console.log('Replacement results:', results);
}
catch (error) {
console.error('Error occurred:', error);
}
}
}
patchDocs();