You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-13 00:10:37 +02:00
Tools: Fixed build
This commit is contained in:
@ -11,7 +11,7 @@ import * as stopExternalEditing from './stopExternalEditing';
|
|||||||
import * as toggleExternalEditing from './toggleExternalEditing';
|
import * as toggleExternalEditing from './toggleExternalEditing';
|
||||||
import * as toggleSafeMode from './toggleSafeMode';
|
import * as toggleSafeMode from './toggleSafeMode';
|
||||||
|
|
||||||
const index: any[] = [
|
const index:any[] = [
|
||||||
copyDevCommand,
|
copyDevCommand,
|
||||||
exportFolders,
|
exportFolders,
|
||||||
exportNotes,
|
exportNotes,
|
||||||
|
@ -30,7 +30,7 @@ import * as toggleNoteList from './toggleNoteList';
|
|||||||
import * as toggleSideBar from './toggleSideBar';
|
import * as toggleSideBar from './toggleSideBar';
|
||||||
import * as toggleVisiblePanes from './toggleVisiblePanes';
|
import * as toggleVisiblePanes from './toggleVisiblePanes';
|
||||||
|
|
||||||
const index: any[] = [
|
const index:any[] = [
|
||||||
commandPalette,
|
commandPalette,
|
||||||
editAlarm,
|
editAlarm,
|
||||||
exportPdf,
|
exportPdf,
|
||||||
|
@ -4,7 +4,7 @@ import * as focusElementNoteTitle from './focusElementNoteTitle';
|
|||||||
import * as showLocalSearch from './showLocalSearch';
|
import * as showLocalSearch from './showLocalSearch';
|
||||||
import * as showRevisions from './showRevisions';
|
import * as showRevisions from './showRevisions';
|
||||||
|
|
||||||
const index: any[] = [
|
const index:any[] = [
|
||||||
focusElementNoteBody,
|
focusElementNoteBody,
|
||||||
focusElementNoteTitle,
|
focusElementNoteTitle,
|
||||||
showLocalSearch,
|
showLocalSearch,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// AUTO-GENERATED using `gulp buildCommandIndex`
|
// AUTO-GENERATED using `gulp buildCommandIndex`
|
||||||
import * as focusElementNoteList from './focusElementNoteList';
|
import * as focusElementNoteList from './focusElementNoteList';
|
||||||
|
|
||||||
const index: any[] = [
|
const index:any[] = [
|
||||||
focusElementNoteList,
|
focusElementNoteList,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// AUTO-GENERATED using `gulp buildCommandIndex`
|
// AUTO-GENERATED using `gulp buildCommandIndex`
|
||||||
import * as focusSearch from './focusSearch';
|
import * as focusSearch from './focusSearch';
|
||||||
|
|
||||||
const index: any[] = [
|
const index:any[] = [
|
||||||
focusSearch,
|
focusSearch,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// AUTO-GENERATED using `gulp buildCommandIndex`
|
// AUTO-GENERATED using `gulp buildCommandIndex`
|
||||||
import * as focusElementSideBar from './focusElementSideBar';
|
import * as focusElementSideBar from './focusElementSideBar';
|
||||||
|
|
||||||
const index: any[] = [
|
const index:any[] = [
|
||||||
focusElementSideBar,
|
focusElementSideBar,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import * as historyBackward from './historyBackward';
|
|||||||
import * as historyForward from './historyForward';
|
import * as historyForward from './historyForward';
|
||||||
import * as synchronize from './synchronize';
|
import * as synchronize from './synchronize';
|
||||||
|
|
||||||
const index: any[] = [
|
const index:any[] = [
|
||||||
historyBackward,
|
historyBackward,
|
||||||
historyForward,
|
historyForward,
|
||||||
synchronize,
|
synchronize,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
const utils = require('../utils');
|
const utils = require('../utils');
|
||||||
const glob = require('glob');
|
const glob = require('glob');
|
||||||
const rootDir = utils.rootDir();
|
const rootDir = utils.rootDir();
|
||||||
const pathUtils = require('@joplin/lib/path-utils');
|
|
||||||
|
|
||||||
async function processDirectory(dir) {
|
async function processDirectory(dir) {
|
||||||
const tsFiles = glob.sync('{**/*.ts,**/*.tsx}', {
|
const tsFiles = glob.sync('{**/*.ts,**/*.tsx}', {
|
||||||
@ -11,7 +10,7 @@ async function processDirectory(dir) {
|
|||||||
const fileContent = [];
|
const fileContent = [];
|
||||||
|
|
||||||
for (const tsFile of tsFiles) {
|
for (const tsFile of tsFiles) {
|
||||||
const f = pathUtils.filename(tsFile);
|
const f = utils.getFilename(tsFile);
|
||||||
fileContent.push(`import * as ${f} from './${f}';`);
|
fileContent.push(`import * as ${f} from './${f}';`);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,7 +19,7 @@ async function processDirectory(dir) {
|
|||||||
fileContent.push('const index:any[] = [');
|
fileContent.push('const index:any[] = [');
|
||||||
|
|
||||||
for (const tsFile of tsFiles) {
|
for (const tsFile of tsFiles) {
|
||||||
const f = pathUtils.filename(tsFile);
|
const f = utils.getFilename(tsFile);
|
||||||
fileContent.push(`\t${f},`);
|
fileContent.push(`\t${f},`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,4 +182,13 @@ utils.insertContentIntoFile = async (filePath, marker, contentToInsert, createIf
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
utils.getFilename = (path) => {
|
||||||
|
const lastPart = path.split('/').pop();
|
||||||
|
if (lastPart.indexOf('.') < 0) return lastPart;
|
||||||
|
|
||||||
|
const splitted = lastPart.split('.');
|
||||||
|
splitted.pop();
|
||||||
|
return splitted.join('.');
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = utils;
|
module.exports = utils;
|
||||||
|
Reference in New Issue
Block a user