Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some system files and folders to ignore #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Options:
**/jcr_root/*
**/@(.git|.svn|.hg|target)
**/@(.git|.svn|.hg|target)/**
as well as Windows, macOS, and Linux system files (via https://www.toptal.com/developers/gitignore/api/windows,macos,linux).
-d <delay> Time to wait since the last change before push.
Default: 300 ms
-q <packmgr_path> Package manager path.
Expand Down
45 changes: 42 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,45 @@ const PACKAGE_JSON = path.join(DIRNAME, 'package.json')
const VERSION = JSON.parse(fs.readFileSync(PACKAGE_JSON, 'utf8')).version
const DEFAULTS = {
workingDir: '.',
exclude: ['**/jcr_root/*', '**/@(.git|.svn|.hg|target)', '**/@(.git|.svn|.hg|target)/**'],
exclude: [
'**/jcr_root/*',
'**/@(.git|.svn|.hg|target)',
'**/@(.git|.svn|.hg|target)/**',
// Linux temp files
'**/*~',
'**/.fuse_hidden*',
'**/.directory/**',
'**/.Trash-*',
'**/.Trash-*/**',
'**/.nfs*',
// macOS
'**/.DS_Store',
'**/.Apple',
'**/.LSOverride',
'**/._*',
'**/.DocumentRevisions-V100',
'**/.fseventsd',
'**/.Spotlight-V100',
'**/.TemporaryItems',
'**/.Trashes',
'**/.VolumeIcon.icns',
'**/.com.apple.timemachine.donotpresent',
'**/.AppleDB/**',
'**/.AppleDesktop/**',
'**/Network Trash Folder/**',
'**/Temporary Items/**',
'**/.apdisk/**',
'**/*.icloud',
// Windows
'**/Thumbs.db',
'**/Thumbs.db:encryptable',
'**/ehthumbs.db',
'**/ethumbs_vista.db',
'**/*.stackdump',
'**/[Dd]esktop.ini',
'**/$RECYCLE.BIN/**',
'**/*.lnk'
],
packmgrPath: '/crx/packmgr/service.jsp',
targets: ['http://admin:admin@localhost:4502'],
delay: 300,
Expand All @@ -40,6 +78,7 @@ Options:
**/jcr_root/*
**/@(.git|.svn|.hg|target)
**/@(.git|.svn|.hg|target)/**
as well as Windows, macOS, and Linux system files (via https://www.toptal.com/developers/gitignore/api/windows,macos,linux).
-d <delay> Time to wait since the last change before push.
Default: ${DEFAULTS.interval} ms
-q <packmgr_path> Package manager path.
Expand Down Expand Up @@ -103,7 +142,7 @@ async function post ({ archivePath, target, packmgrPath, checkIfUp }) {
// Errors when installing selected nodes.
if (errorLines.length) {
result.err = new Error('Error installing nodes:\n' + errorLines.join('\n'))
// Error code in status.
// Error code in status.
} else if (obj.crx.response.status.code !== '200') {
result.err = new Error(obj.crx.response.status.textNode)
}
Expand Down Expand Up @@ -191,7 +230,7 @@ export async function * aemsync (args) {
const payload = []
let timeoutId

// Process file changes in the background.
// Process file changes in the background.
;(async function () {
for await (const localPath of watch(workingDir)) {
payload.push(localPath)
Expand Down