-
Notifications
You must be signed in to change notification settings - Fork 35
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
exclusions and subfolders #64
Comments
seriously? no response since 2014? anyway, just in case anyone's still looking (like me), and i have to figure this out myself. it's best to use full paths (/path/to/folder) instead of relative paths (path/to/folder) when handling subfolders. just like how i configured it below. keep the full path of your project somewhere in a config file. or your exclusion list will get really long. "base_dir": "/Users/username/Sites/projectname" load the config file inside conf: grunt.file.readJSON('config.json') then append the 'sftp-deploy': {
build: {
auth: {
host: '<%= conf.remote_host %>',
port: 22,
authKey: '<%= conf.env %>'
},
src: '<%= conf.base_dir %>',
dest: '<%= conf.remote_dir %>',
exclusions: [
'<%= conf.base_dir %>/**/.DS_Store',
'<%= conf.base_dir %>/application/cache',
'<%= conf.base_dir %>/node_modules',
'<%= conf.base_dir %>/public/assets/js/src',
'<%= conf.base_dir %>/public/assets/scss',
'<%= conf.base_dir %>/public/prototype',
'<%= conf.base_dir %>/.sass-cache',
'<%= conf.base_dir %>/.bowerrc',
'<%= conf.base_dir %>/.editorconfig',
'<%= conf.base_dir %>/.eslintrc',
'<%= conf.base_dir %>/.ftppass*',
'<%= conf.base_dir %>/.git',
'<%= conf.base_dir %>/.gitattributes',
'<%= conf.base_dir %>/.gitignore',
'<%= conf.base_dir %>/.htmlhintrc',
'<%= conf.base_dir %>/.sass-lint.yml',
'<%= conf.base_dir %>/bower.json',
'<%= conf.base_dir %>/config.json*',
'<%= conf.base_dir %>/Gemfile*',
'<%= conf.base_dir %>/Gruntfile.js',
'<%= conf.base_dir %>/package.json'
],
concurrency: 4,
progress: true
}
} additional tips, If you want to ignore just the contents of a folder, but keep the folder intact on the remote server. use the star (*):
if you want to completely exclude it. do it like this:
|
Not sure of its wrongly described in the readme, but i couldnt get subfolders like
dist/tmp
get excluded unless i changed it to./dist/tmp
.In the grunt-ftp-deploy project there was a PR for changing relative pathes to prefxied pathes in the docs:
https://github.com/zonak/grunt-ftp-deploy/pull/54/files
This possibly applies to here as well.
The text was updated successfully, but these errors were encountered: