-
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.
- Loading branch information
0 parents
commit b56bb4f
Showing
22 changed files
with
4,298 additions
and
0 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,19 @@ | ||
{ | ||
"parserOpts": { | ||
// Allow returns in the module | ||
"allowReturnOutsideFunction": true | ||
}, | ||
|
||
"env": { | ||
"ava": { | ||
"sourceMaps": "inline", | ||
"plugins": [ | ||
"transform-es2015-modules-commonjs" | ||
] | ||
}, | ||
|
||
"rollup": { | ||
"plugins": [] | ||
} | ||
} | ||
} |
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,60 @@ | ||
# cmake | ||
/cmake-build-debug | ||
|
||
# babel dist | ||
/lib | ||
|
||
# Numerous always-ignore extensions | ||
*.bak | ||
*.patch | ||
*.diff | ||
*.err | ||
*.orig | ||
*.log | ||
*.rej | ||
*.swo | ||
*.swp | ||
*.zip | ||
*.vi | ||
*~ | ||
*.sass-cache | ||
*.lock | ||
*.rdb | ||
*.db | ||
nohup.out | ||
.nyc_output | ||
coverage.lcov | ||
package-lock.json | ||
|
||
# OS or Editor folders | ||
.DS_Store | ||
._* | ||
.cache | ||
.project | ||
.settings | ||
.tmproj | ||
*.esproj | ||
*.sublime-project | ||
*.sublime-workspace | ||
nbproject | ||
thumbs.db | ||
|
||
# Folders to ignore | ||
.hg | ||
.svn | ||
.CVS | ||
.idea | ||
node_modules | ||
old/ | ||
*-old/ | ||
*-notrack/ | ||
no-track/ | ||
build/ | ||
combo/ | ||
reference/ | ||
jscoverage_lib/ | ||
temp/ | ||
tmp/ | ||
|
||
# codecov.io | ||
coverage/ |
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,7 @@ | ||
# Gifx | ||
|
||
Originally a fork of [`gif`](https://www.npmjs.com/package/gif). | ||
|
||
NOW WIP | ||
|
||
---- |
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,24 @@ | ||
{ | ||
'targets': [ | ||
{ | ||
'target_name': 'gifx', | ||
'sources': [ | ||
'cc/Gifx.cc' | ||
], | ||
'include_dirs': [ | ||
'<!(node -e "require(\'nan\')")' | ||
], | ||
'dependencies': [ | ||
'<(module_root_dir)/giflib/giflib.gyp:giflib' | ||
], | ||
'cflags_cc!': [ '-fno-exceptions' ], | ||
'conditions': [ | ||
['OS=="mac"', { | ||
'xcode_settings': { | ||
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES' | ||
} | ||
}] | ||
] | ||
} | ||
] | ||
} |
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,32 @@ | ||
#include "Gifx.h" | ||
|
||
Nan::Persistent<FunctionTemplate> Gifx::constructor; | ||
|
||
/* | ||
* Initialize Gifx. | ||
*/ | ||
|
||
void | ||
Gifx::Initialize(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target) { | ||
Nan::HandleScope scope; | ||
|
||
// Constructor | ||
Local<FunctionTemplate> ctor = Nan::New<FunctionTemplate>(Gifx::New); | ||
constructor.Reset(ctor); | ||
ctor->InstanceTemplate()->SetInternalFieldCount(1); | ||
ctor->SetClassName(Nan::New("Gifx").ToLocalChecked()); | ||
|
||
Nan::SetPrototypeMethod(ctor, "hello", Hello); | ||
} | ||
|
||
NAN_METHOD(Gifx::New) { | ||
if (!info.IsConstructCall()) { | ||
return Nan::ThrowTypeError("Class constructors cannot be invoked without 'new'"); | ||
} | ||
|
||
info.GetReturnValue().Set(info.This()); | ||
} | ||
|
||
NAN_METHOD(Gifx::Hello) { | ||
info.GetReturnValue().Set(info.This()); | ||
} |
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,22 @@ | ||
#ifndef __GIFX_GIFX_H__ | ||
#define __GIFX_GIFX_H__ | ||
|
||
#include <v8.h> | ||
#include <nan.h> | ||
|
||
using namespace v8; | ||
|
||
class Gifx: public Nan::ObjectWrap { | ||
public: | ||
static Nan::Persistent<FunctionTemplate> constructor; | ||
static void Initialize(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target); | ||
static NAN_METHOD(New); | ||
static NAN_METHOD(Hello); | ||
|
||
Gifx(); | ||
|
||
private: | ||
~Gifx(); | ||
}; | ||
|
||
#endif |
Oops, something went wrong.