Skip to content

Commit

Permalink
Fixed file deletion. Readme updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
gavoja committed Apr 5, 2016
1 parent b973f73 commit bf09de8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ JavaScript
```JavaScript
const aemsync = require('aemsync')

let workingDir = "~/workspace/my_project"
let workingDir = '~/workspace/my_project'
let targets = [
"http://admin:admin@localhost:4502",
"http://admin:admin@localhost:4503"
'http://admin:admin@localhost:4502',
'http://admin:admin@localhost:4503'
]
let exclude = "**/*.orig" // Skip merge files.
let exclude = '**/*.orig' // Skip merge files.
let pushInterval = 300

new aemsync.Watcher(workingDir, exclude, () => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aemsync",
"version": "1.0.0-rc.0",
"version": "1.0.1",
"description": "Adobe AEM Synchronization Tool",
"author": "Michal Kochel <[email protected]>",
"keywords": [
Expand Down
1 change: 0 additions & 1 deletion src/handlers/content-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const RE_TARGET_PATH = /^.*\/target\/(.*\/)?jcr_root\/.*$/
class ContentHandler {
process (items, localPath) {
let cleanPath = localPath.replace(/\\/g, '/')

// TODO: Simplify path checking.

// Ignore dot-prefixed files and directories except ".content.xml".
Expand Down
4 changes: 4 additions & 0 deletions src/watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ class Watcher {

fs.stat(localPath, (err, stats) => {
if (err) {
// If file does not exist - process deletion.
if (err.code === 'ENOENT') {
callback(localPath)
}
return
}

Expand Down

0 comments on commit bf09de8

Please sign in to comment.