Skip to content
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 .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
.DS_Store
.gitignore
node_modules
37 changes: 37 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
module.exports = function(grunt) {

grunt
.initConfig({
pkg : grunt.file.readJSON('package.json'),
// LINT
jshint : {
options : {
sub : true, // Allow object['member'], and don't insist on object.member
},
all : ['*.js']
},
uglify : {
all : {
files : {
'dist/openfb.min.js' : ['openfb.js']
}
}
},
shell : {
commit_dist : {
command : 'git commit -am "Release" dist/*.js'
}
},
release : {
options : {
npm: false,
npmtag: false
}
}
});
grunt.loadNpmTasks('grunt-release');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['jshint', 'uglify']);
};
1 change: 1 addition & 0 deletions dist/openfb.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions openfb.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,14 +274,16 @@ var openFB = (function () {
}

// The public API
return {
var publicApi = {
init: init,
login: login,
logout: logout,
revokePermissions: revokePermissions,
api: api,
oauthCallback: oauthCallback,
getLoginStatus: getLoginStatus
}
};
module.exports = publicApi;
return publicApi;
}());

}());
24 changes: 24 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "open-fb",
"version": "0.0.5",
"repository": "jhberges/OpenFB",
"main": "dist/openfb.min.js",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-uglify": "^0.8.0",
"grunt-release": "^0.11.0",
"grunt-shell": "^1.1.2"
},
"dependencies": {},
"author": {
"name": "ccoenraets"
},
"contributors": [
{
"name": "Jan-Helge Bergesen",
"email": "jhberges@gmail.com",
"url": "http://github.com/jhberges"
}
]
}