https://github.com/icfnext/grunt-slang
Sling files to Sling
https://github.com/icfnext/grunt-slang
Last synced: about 1 year ago
JSON representation
Sling files to Sling
- Host: GitHub
- URL: https://github.com/icfnext/grunt-slang
- Owner: icfnext
- Created: 2014-02-05T23:58:29.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2019-08-12T14:22:11.000Z (almost 7 years ago)
- Last Synced: 2025-03-30T09:31:33.150Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 14
- Watchers: 3
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# grunt-slang
> Deploy modified files to AEM's CRX using the Apache Sling Post servlet
## Slang Task
### Usage Example
```js
slang: {
// AEM author configuration
author: {
options: {
host: 'dev.example.com',
port: '4502',
ignorePaths: true
}
},
// AEM publish configuration
publish: {
options: {
host: 'dev.example.com',
port: '4503',
ignorePaths: true
}
}
},
watch: {
// watch task for AEM author
author: {
files: ['<%= pathTo.projectDesign %>**/*.{css,html,js,jsp,txt}'],
tasks: ['slang:author'],
options: {
spawn: false
}
},
// watch task for AEM publish
publish: {
files: ['<%= pathTo.projectDesign %>**/*.{css,html,js,jsp,txt}'],
tasks: ['slang:publish'],
options: {
spawn: false
}
}
}
```
You also need to set the path to the modified file on every watch event, since we only want to upload modified files/folders and not everything:
```
// we only want to upload the modified file to AEM, not all files
grunt.event.on('watch', function(action, filepath) {
grunt.config.set('slang.author.src', filepath);
grunt.config.set('slang.publish.src', filepath);
});
```