imdone-core 1.37.0 → 1.37.1
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/file.js +1 -0
- package/lib/project-factory.js +8 -0
- package/package.json +1 -1
package/lib/file.js
CHANGED
|
@@ -698,6 +698,7 @@ File.prototype.modifyTask = function (task, config, noEmit) {
|
|
|
698
698
|
if (this.getContent().trim() === newContent.trim()) return
|
|
699
699
|
this.setContent(newContent)
|
|
700
700
|
this.setModified(true)
|
|
701
|
+
task.lastLine = task.line + description.length
|
|
701
702
|
if (!noEmit) {
|
|
702
703
|
this.emit('task.modified', task)
|
|
703
704
|
this.emit('file.modified', this)
|
package/lib/project-factory.js
CHANGED
|
@@ -5,8 +5,16 @@ const ProjectContext = require('./ProjectContext')
|
|
|
5
5
|
const Project = require('./project')
|
|
6
6
|
const context = require('./context/ApplicationContext')
|
|
7
7
|
|
|
8
|
+
function createWatchedFSProject({path, config, repo = watchedFsStore(new Repository(path, config))}) {
|
|
9
|
+
context().repo = repo
|
|
10
|
+
context().projectContext = new ProjectContext(repo)
|
|
11
|
+
context().project = new Project(repo)
|
|
12
|
+
return context().project
|
|
13
|
+
}
|
|
14
|
+
|
|
8
15
|
module.exports = {
|
|
9
16
|
createWatchedFileSystemProject: function(path) {
|
|
17
|
+
if (typeof path === 'object' && path.confg) return createWatchedFSProject(path)
|
|
10
18
|
const repo = watchedFsStore(new Repository(path))
|
|
11
19
|
context().repo = repo
|
|
12
20
|
context().projectContext = new ProjectContext(repo)
|