-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b92746
commit fc8a15c
Showing
4 changed files
with
151 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
module.exports = function(grunt) { | ||
|
||
// Project configuration. | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
watch: { | ||
files: ["./css/ssp_c5.css","js/socialshareprivacy/socialshareprivacy/socialshareprivacy.css"], | ||
tasks: ["combine"] | ||
}, | ||
clean: ["./build/"], | ||
compress: { | ||
main: { | ||
options: { | ||
archive: 'build/social_share_privacy_<%= pkg.version %>.zip' | ||
}, | ||
files: [ | ||
{cwd: "build", | ||
src: ['./**'], | ||
dest: 'social_share_privacy/'}, // includes files in path and its subdirs | ||
] | ||
} | ||
}, | ||
copy: { | ||
build: { | ||
files: [ | ||
{ | ||
src: [ 'blocks/**',"controllers/**", "controller.php","css/ssp_combined.css","elements/**","helpers/**", "icon.png", "languages/**", "libraries/**" , "LICENSE.TXT", "single_pages/**"], | ||
dest: 'build', | ||
expand: true | ||
}, | ||
{ | ||
cwd: "js/socialshareprivacy", | ||
src: [ | ||
"jquery.socialshareprivacy.min.js", | ||
"jquery.socialshareprivacy.js", | ||
"socialshareprivacy/*", | ||
"socialshareprivacy/images/*.png" | ||
], | ||
dest: 'build/js/socialshareprivacy', | ||
expand: true | ||
} | ||
] | ||
}, | ||
}, | ||
concat: { | ||
options: { | ||
separator: '' | ||
}, | ||
dist: { | ||
src: ['css/ssp_c5.css', 'js/socialshareprivacy/socialshareprivacy/socialshareprivacy.css'], | ||
dest: 'css/ssp_combined.css' | ||
} | ||
}, | ||
// adjust image paths | ||
sed: { | ||
imgpaths: { | ||
path:"css/ssp_combined.css", | ||
pattern: "(url\\s*(\\s*['\"]\?\)\\s*\([^/]))", | ||
replacement: '$1../js/socialshareprivacy/socialshareprivacy/$2', | ||
recursive: false | ||
} | ||
}, | ||
po2mo: { | ||
files: { | ||
src: 'languages/**/*.po', | ||
expand: true, | ||
}, | ||
}, | ||
}); | ||
|
||
// Load the plugin that provides the "uglify" task. | ||
// grunt.loadNpmTasks('grunt-contrib-less'); | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-contrib-clean'); | ||
grunt.loadNpmTasks('grunt-contrib-copy'); | ||
grunt.loadNpmTasks('grunt-contrib-compress'); | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
grunt.loadNpmTasks('grunt-sed'); | ||
grunt.loadNpmTasks('grunt-po2mo'); | ||
|
||
// Default task(s). | ||
grunt.registerTask('default', ['watch']); | ||
grunt.registerTask('combine', ['concat','sed']); | ||
grunt.registerTask('zip', ['clean',"copy","compress"]); | ||
grunt.registerTask('build', ['po2mo','combine']); | ||
grunt.registerTask('deploy', ['build','zip']); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"name": "addon_socialshareprivacy", | ||
"version": "1.3.0", | ||
"description": "Concrete5 Addon Social Share Privacy", | ||
"main": "controller.php", | ||
"directories": { | ||
"test": "tests" | ||
}, | ||
"dependencies": { | ||
"grunt-contrib-clean": "~0.5.0" | ||
}, | ||
"devDependencies": { | ||
"grunt-contrib-clean": "~0.5.0", | ||
"grunt-contrib-concat": "~0.3.0", | ||
"grunt-contrib-copy": "~0.5.0", | ||
"grunt-contrib-watch": "~0.6.1", | ||
"grunt-contrib-compress": "~0.7.0", | ||
"grunt-bump": "0.0.13", | ||
"grunt": "~0.4.4", | ||
"grunt-css-url-rewrite": "~0.3.3", | ||
"grunt-sed": "~0.1.1", | ||
"grunt-po2mo": "~0.1.0" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/patrickheck/addon_socialshareprivacy.git" | ||
}, | ||
"keywords": [ | ||
"social", | ||
"sharing", | ||
"privacy", | ||
"twitter", | ||
"google", | ||
"g+", | ||
"googleplus", | ||
"plus", | ||
"facebook", | ||
"like", | ||
"recommend", | ||
"share" | ||
], | ||
"author": "Patrick Heck", | ||
"license": "MIT", | ||
"readmeFilename": "README.md" | ||
} |