1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

Chore: fix build

This commit is contained in:
Laurent Cozic 2023-07-25 15:31:44 +01:00
parent 672ef1fd7c
commit d8a54da496
2 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,5 @@
const utils = require('../utils');
const rootDir = utils.rootDir();
const { globSync } = require('@joplin/utils/fs');
module.exports = {
src: '',
@ -11,7 +10,7 @@ module.exports = {
//
// https://github.com/isaacs/node-glob/issues/371
const tsFiles = globSync('{**/*.ts,**/*.tsx}', {
const tsFiles = utils.globSync('{**/*.ts,**/*.tsx}', {
cwd: rootDir,
ignore: [
'**/.git/**',

View File

@ -1,5 +1,6 @@
const fs = require('fs-extra');
const execa = require('execa');
const glob = require('glob');
const utils = {};
@ -217,4 +218,11 @@ utils.msleep = (ms) => {
});
};
utils.globSync = (pattern, options = {}) => {
let output = glob.sync(pattern, options);
output = output.map(f => f.replace(/\\/g, '/'));
output.sort();
return output;
};
module.exports = utils;