зеркало из https://github.com/microsoft/jacdac-ts.git
patch: fix load path
This commit is contained in:
Родитель
7eb1bd5c29
Коммит
424249f5d6
|
@ -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();
|
Загрузка…
Ссылка в новой задаче