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 toggleSafeMode from './toggleSafeMode';
|
||||
|
||||
const index: any[] = [
|
||||
const index:any[] = [
|
||||
copyDevCommand,
|
||||
exportFolders,
|
||||
exportNotes,
|
||||
|
@ -30,7 +30,7 @@ import * as toggleNoteList from './toggleNoteList';
|
||||
import * as toggleSideBar from './toggleSideBar';
|
||||
import * as toggleVisiblePanes from './toggleVisiblePanes';
|
||||
|
||||
const index: any[] = [
|
||||
const index:any[] = [
|
||||
commandPalette,
|
||||
editAlarm,
|
||||
exportPdf,
|
||||
|
@ -4,7 +4,7 @@ import * as focusElementNoteTitle from './focusElementNoteTitle';
|
||||
import * as showLocalSearch from './showLocalSearch';
|
||||
import * as showRevisions from './showRevisions';
|
||||
|
||||
const index: any[] = [
|
||||
const index:any[] = [
|
||||
focusElementNoteBody,
|
||||
focusElementNoteTitle,
|
||||
showLocalSearch,
|
||||
|
@ -1,7 +1,7 @@
|
||||
// AUTO-GENERATED using `gulp buildCommandIndex`
|
||||
import * as focusElementNoteList from './focusElementNoteList';
|
||||
|
||||
const index: any[] = [
|
||||
const index:any[] = [
|
||||
focusElementNoteList,
|
||||
];
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// AUTO-GENERATED using `gulp buildCommandIndex`
|
||||
import * as focusSearch from './focusSearch';
|
||||
|
||||
const index: any[] = [
|
||||
const index:any[] = [
|
||||
focusSearch,
|
||||
];
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// AUTO-GENERATED using `gulp buildCommandIndex`
|
||||
import * as focusElementSideBar from './focusElementSideBar';
|
||||
|
||||
const index: any[] = [
|
||||
const index:any[] = [
|
||||
focusElementSideBar,
|
||||
];
|
||||
|
||||
|
@ -3,7 +3,7 @@ import * as historyBackward from './historyBackward';
|
||||
import * as historyForward from './historyForward';
|
||||
import * as synchronize from './synchronize';
|
||||
|
||||
const index: any[] = [
|
||||
const index:any[] = [
|
||||
historyBackward,
|
||||
historyForward,
|
||||
synchronize,
|
||||
|
@ -1,7 +1,6 @@
|
||||
const utils = require('../utils');
|
||||
const glob = require('glob');
|
||||
const rootDir = utils.rootDir();
|
||||
const pathUtils = require('@joplin/lib/path-utils');
|
||||
|
||||
async function processDirectory(dir) {
|
||||
const tsFiles = glob.sync('{**/*.ts,**/*.tsx}', {
|
||||
@ -11,7 +10,7 @@ async function processDirectory(dir) {
|
||||
const fileContent = [];
|
||||
|
||||
for (const tsFile of tsFiles) {
|
||||
const f = pathUtils.filename(tsFile);
|
||||
const f = utils.getFilename(tsFile);
|
||||
fileContent.push(`import * as ${f} from './${f}';`);
|
||||
}
|
||||
|
||||
@ -20,7 +19,7 @@ async function processDirectory(dir) {
|
||||
fileContent.push('const index:any[] = [');
|
||||
|
||||
for (const tsFile of tsFiles) {
|
||||
const f = pathUtils.filename(tsFile);
|
||||
const f = utils.getFilename(tsFile);
|
||||
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;
|
||||
|
Reference in New Issue
Block a user