imdone-core 1.53.10 → 1.53.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/adapters/markdown.js
CHANGED
|
@@ -138,6 +138,7 @@ function resolveFileUrl(src, filePath) {
|
|
|
138
138
|
const srcDir = dirname(filePath);
|
|
139
139
|
const srcPath = resolve(srcDir, src) // filePath ? path.join(filePath, src) : path.resolve(src);
|
|
140
140
|
const srcUrl = pathToFileURL(srcPath);
|
|
141
|
+
if (src.endsWith('/')) return srcUrl + '/';
|
|
141
142
|
|
|
142
143
|
return srcUrl;
|
|
143
144
|
|
|
@@ -16,7 +16,8 @@ function format(content, data, mustache) {
|
|
|
16
16
|
try {
|
|
17
17
|
content = template(content, opts)(data)
|
|
18
18
|
} catch (e) {
|
|
19
|
-
|
|
19
|
+
console.error(e)
|
|
20
|
+
// content = content.replace(opts.interpolate, `~~\${${e}}~~`)
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
if (mustache) {
|
|
@@ -24,6 +25,7 @@ function format(content, data, mustache) {
|
|
|
24
25
|
try {
|
|
25
26
|
content = template(content, opts)(data)
|
|
26
27
|
} catch (e) {
|
|
28
|
+
console.error(e)
|
|
27
29
|
content = content.replace(opts.interpolate, `~~{{${e}}}~~`)
|
|
28
30
|
}
|
|
29
31
|
}
|
|
@@ -40,6 +40,14 @@ module.exports = class DefaultBoardActionsPlugin extends Plugin {
|
|
|
40
40
|
return project.copyToClipboard(title, `"${title}" copied to clipboard`)
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
|
+
{
|
|
44
|
+
title: `Open in ${isWindows ? 'Explorer' : 'Finder'}`,
|
|
45
|
+
keys: ['alt+shift+o'],
|
|
46
|
+
icon: "folder",
|
|
47
|
+
async action () {
|
|
48
|
+
await project.openPath(project.path)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
43
51
|
]
|
|
44
52
|
}
|
|
45
53
|
|
|
@@ -22,7 +22,6 @@ module.exports = class PluginManager extends Emitter {
|
|
|
22
22
|
this.pluginsMap = {}
|
|
23
23
|
this.pluginPath = _path.join(project.path, '.imdone', 'plugins')
|
|
24
24
|
this.onDevChange = debounce(this.onDevChange.bind(this), 1000)
|
|
25
|
-
this.loadPlugins()
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
async startDevMode() {
|
package/lib/project.js
CHANGED
|
@@ -57,21 +57,26 @@ module.exports = class WorkerProject extends Project {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
init(cb) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
this.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
const promise = new Promise(async (resolve, reject) => {
|
|
61
|
+
this.repo.project = this
|
|
62
|
+
|
|
63
|
+
this.pluginManager = new PluginManager(this)
|
|
64
|
+
this.pluginManager.on('plugin-installed', () => this.emitUpdate())
|
|
65
|
+
this.pluginManager.on('plugin-uninstalled', () => this.emitUpdate())
|
|
66
|
+
this.pluginManager.on('plugins-reloaded', () => this.emitUpdate())
|
|
67
|
+
await this.pluginManager.loadPlugins()
|
|
68
|
+
this.data = this.pluginManager.getBoardProperties()
|
|
69
|
+
this.dataKeys = this.getDataKeys(this.data)
|
|
70
|
+
|
|
71
|
+
console.log('data', this.data)
|
|
72
|
+
console.log('dataKeys', this.dataKeys)
|
|
73
|
+
EVENTS.forEach((event) => {
|
|
74
|
+
this.repo.on(event, (data) => onChange(this, event, data))
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
this.repo.on('task.found', (task) => this.pluginManager.onTaskFound(task))
|
|
72
78
|
|
|
73
|
-
|
|
74
|
-
this.repo.init((err, files) => {
|
|
79
|
+
this.repo.init(async (err, files) => {
|
|
75
80
|
if (err) {
|
|
76
81
|
if (cb) cb(err)
|
|
77
82
|
else reject(err)
|