• Stars
    star
    168
  • Rank 225,507 (Top 5 %)
  • Language
    C++
  • License
    MIT License
  • Created over 9 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A very small, understandable node native extension with approachable project structure

Node Native Extension Boilerplate

Build Status

A very approachable node native extension.

This repository serves as a nearly minimal native extension built on Nan with enough tooling to also make it a great starting point for more complex projects.

Building

To compile the extension for the first time, run

$ npm i
$ npm run configure
$ npm run build

All subsequent builds only need npm run build

You can confirm everything built correctly by running the test suite.

Working With the Extension Locally

After building:

$ node
> var NativeExtension = require('./')
undefined
> NativeExtension.aString()
'This is a thing.'
> NativeExtension.aBoolean()
false
> NativeExtension.nothing()
undefined
> 

To run tests:

$ npm test

or to run test continuously

$ npm test -- watch

The Parts

File Contents
NativeExtension.cc Represents the top level of the module. C++ constructs that are exposed to javascript are exported here
functions.cc Example top-level functions. These functions demonstrate how to build and return various js types.
index.js The main entry point for the node dependency
binding.gyp Describes your node native extention to the build system (node-gyp). As you add source files to the project, you should also add them to the binding file.

More Repositories

1

mirror-displays

A Mac app and command-line tool for fiddling with display mirroring: on/off/toggle
Objective-C
148
star
2

ios-color-picker

A color picker for iOS
Objective-C
118
star
3

Bayes

Naive Bayes Classifier in Swift for Mac and iOS
Swift
30
star
4

OHMKit

Declarative mapping between JSON and Objective-C classes
Objective-C
20
star
5

SwiftImage

CoreImage helpers in Swift
Swift
15
star
6

bake

A static site generator that's just Pandoc and Make
HTML
12
star
7

TokenField

SwiftUI wrapper for NSTokenField
Swift
11
star
8

SafeCast

Safe casting for Objective-C
Objective-C
11
star
9

HLSCore

A collection of Swift packages for working with HLS
Swift
10
star
10

LiveStreamParser

A Parser for HTTP Live Streaming in Objective-C
Objective-C
8
star
11

ogol

Swift
7
star
12

Scope

Swift
6
star
13

React-Native-Pedometer-App

An iOS pedometer in React Native
Objective-C
6
star
14

gba-print

printf for the GameBoy Advance
Objective-C
4
star
15

pebble-template

template for your pebbling
C
3
star
16

ios-color-picker-example

A color picker for iOS
Objective-C
3
star
17

yelp-ios-api-v2

An easy to use iOS client for Yelp Search v2
Objective-C
3
star
18

scrape

Download HLS Streams
Swift
3
star
19

HabitForming

A habit-tracking app for iOS
Objective-C
3
star
20

BindBackstop

(Binding<T?>, T) -> Binding<T>
Swift
3
star
21

Sanstring

NSRegularExpression playground
Swift
3
star
22

DropPin

A global geospatial pin-board for iOS with a Parse back-end
Objective-C
2
star
23

React-Native-Pedometer

A CoreMotion Pedometer Native Module for React Native
Objective-C
2
star
24

FFCTextField

iOS Text field with a floating name label and validations
Swift
2
star
25

JPGlitch

ok. let's explore jpegs ๐Ÿ”ญ
Swift
2
star
26

PebbleTunnel

Infinite Tunnel for Pebble
C
2
star
27

Compass

Sometimes a map just isn't enough
Swift
2
star
28

FFCPieChart

iOS Pie Charts
Objective-C
1
star
29

docket

Shows a timeline overlay to keep you on schedule
Swift
1
star
30

Uncontrollable

MV-nothing
Objective-C
1
star
31

elevate

JavaScript
1
star
32

code-snippets

Xcode snippets. Blocks, GCD, Core Data. I don't need to remember that stuff.
Objective-C
1
star
33

fcanas.github.io

HTML
1
star
34

manifest-cycle-bug

Swift
1
star
35

downdown

๐Ÿ’€๐Ÿ’€๐Ÿ’€ naรฏve, broken markdown parsing with regular expressions and swift ๐Ÿ’€๐Ÿ’€๐Ÿ’€
Swift
1
star
36

streamer

HLS Notes and Resources
HTML
1
star
37

FFCTemplate

A model-based template in Objective-C
Objective-C
1
star
38

petulant-octo-shame

an ๐Ÿ˜ never forgets his bash scripts
Shell
1
star
39

Trim

Objective-C
1
star
40

js-cocoa

A Cocoa App written in JavaScript
JavaScript
1
star
41

dit

Basic CLI for Reminders on macOS
Swift
1
star
42

single-media-player

An iOS app that plays a single piece of media
Swift
1
star
43

FFCStorage

Auth and Network handling so you can store models in a RESTful API
Objective-C
1
star