forked from Julienh/Sharrre
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Julienh#278 from Julienh/2.0.0
2.0.0 - Release
- Loading branch information
Showing
30 changed files
with
1,664 additions
and
745 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Contribution guide | ||
|
||
If you want to contribute, here are some tips: | ||
|
||
There is a grunt file, so use it anytime you add a feature. | ||
|
||
``` | ||
# npm install | ||
# grunt & | ||
``` | ||
|
||
## Adding a platform | ||
|
||
If you want to add a platform, just copy an existing one and adapt it. | ||
|
||
The base options of a platform are as follow: | ||
|
||
* url : The url use to share the plugin, it can be overrident globally or by platform | ||
* urlCount: Override the url method | ||
* count: If set to false, will not call any API to get the count of shares | ||
* popup: {width/height}: the size of the popup | ||
|
||
These methods must be implemented: | ||
|
||
* settings : Return the platform configuration | ||
* url : The url used to get the share count if available | ||
* trackingAction : {site, action} : Datas sent to analytics | ||
* load : Will be called when displaying the button without template | ||
* tracking: Will be called to track sharing | ||
* popup : Will be called to open a popup when using a template |
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,58 @@ | ||
module.exports = function (grunt) { | ||
|
||
grunt.initConfig({ | ||
sass: { | ||
options: { | ||
sourceMap: true | ||
}, | ||
dist: { | ||
files: { | ||
'dist/style.css': 'src/sass/style.scss', | ||
'dist/test.css': 'src/sass/test.scss' | ||
} | ||
} | ||
}, | ||
uglify: { | ||
options: { | ||
"separator": ";", | ||
"preserveComments": function (node, comment) { | ||
// preserve comments that start with a bang | ||
return /^!/.test(comment.value); | ||
} | ||
}, | ||
my_target: { | ||
files: { | ||
"dist/jquery.sharrre.min.js": [ | ||
"src/js/platform/platform.js", | ||
"src/js/platform/*.js", | ||
"src/js/**/*.js" | ||
] | ||
} | ||
} | ||
}, | ||
copy: { | ||
main: { | ||
files: [ | ||
{src: ['dist/jquery.sharrre.min.js'], dest: 'jquery.sharrre.min.js', filter: 'isFile'} | ||
] | ||
} | ||
}, | ||
watch: { | ||
sass: { | ||
files: ['src/**/*.scss'], | ||
tasks: ['sass'] | ||
}, | ||
uglify: { | ||
files: ['src/**/*.js'], | ||
tasks: ['uglify', 'copy'] | ||
} | ||
} | ||
}); | ||
grunt.loadNpmTasks("grunt-sass"); | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-contrib-copy'); | ||
|
||
grunt.registerTask('default', ['watch']); | ||
|
||
}; |
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,21 @@ | ||
The MIT License | ||
|
||
Copyright (c) Sharrre | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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
Oops, something went wrong.