Skip to content

Commit 6475bdc

Browse files
author
AJ Keller
committed
REFACTOR: move files around to conform to jamstik
1 parent 36f6c69 commit 6475bdc

File tree

8 files changed

+16
-6
lines changed

8 files changed

+16
-6
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
* Removed simulator file back into cyton repo
66
* Removed `safe-buffer` in place of `buffer`
7+
* Removed support for node version 5 and below
78

89
# v0.2.7
910

package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@
22
"name": "openbci-utilities",
33
"version": "0.3.0",
44
"description": "The official utility package of Node.js SDK for the OpenBCI Biosensor Boards.",
5-
"main": "index.js",
5+
"main": "dist/openbci.utils.js",
6+
"module": "src/index.js",
67
"scripts": {
8+
"build": "webpack",
9+
"start": "webpack-dev-server",
10+
"prepublish": "npm run build",
711
"test": "npm run test-lint && npm run test-cov",
812
"test-lint": "semistandard | snazzy",
913
"test-cov": "istanbul cover ./node_modules/mocha/bin/_mocha -- -R spec && codecov"
1014
},
15+
"files": ["dist"],
1116
"keywords": [
1217
"openbci",
1318
"openbci-node",
@@ -32,6 +37,8 @@
3237
"test": "test"
3338
},
3439
"devDependencies": {
40+
"babel-core": "^6.26.0",
41+
"babel-loader": "^7.1.2",
3542
"bluebird": "3.4.6",
3643
"chai": "^4.0.0",
3744
"chai-as-promised": "^7.1.1",
@@ -44,7 +51,9 @@
4451
"semistandard": "^11.0.0",
4552
"sinon": "^2.3.7",
4653
"sinon-chai": "^2.8.0",
47-
"snazzy": "^7.0.0"
54+
"snazzy": "^7.0.0",
55+
"webpack": "^3.8.1",
56+
"webpack-dev-server": "^2.9.3"
4857
},
4958
"repository": {
5059
"type": "git",

index.js renamed to src/index.js

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/openBCIConstants-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* global describe, it, afterEach */
66
let bluebirdChecks = require('./bluebirdChecks');
77
let assert = require('assert');
8-
let k = require('../openBCIConstants');
8+
let k = require('../src/openBCIConstants');
99
let chai = require('chai');
1010
let expect = chai.expect;
1111
let should = chai.should(); // eslint-disable-line no-unused-vars

test/openBCIUtilities-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// jshint expr: true
66
/* global describe, it, after, afterEach, before, beforeEach */
77
const bluebirdChecks = require('./bluebirdChecks');
8-
const openBCIUtilities = require('../openBCIUtilities');
8+
const openBCIUtilities = require('../src/openBCIUtilities');
99
const sinon = require('sinon');
1010
const chai = require('chai');
1111
const expect = chai.expect;
@@ -23,7 +23,7 @@ const bufferEqual = require('buffer-equal');
2323

2424
const _ = require('lodash');
2525

26-
let k = require('../openBCIConstants');
26+
let k = require('../src/openBCIConstants');
2727

2828
const defaultChannelSettingsArray = k.channelSettingsArrayInit(k.OBCINumberOfChannelsDefault);
2929

@@ -52,7 +52,7 @@ describe('openBCIUtilities', function () {
5252
rawDataPacket,
5353
sampleNumber
5454
});
55-
expect(bufferEqual(rawDataPacket.slice(2, 2 + k.OBCIPacketSizeBLERaw), data), `expected ${data.toString('hex')} but got ${rawDataPacket.slice(2, 2 + k.OBCIPacketSizeBLERaw).toString('hex')}`).to.be.true();
55+
expect(rawDataPacket.slice(2, 2 + k.OBCIPacketSizeBLERaw).toString()).to.equal(data.toString());
5656
expect(rawDataPacket[k.OBCIPacketPositionSampleNumber]).to.equal(sampleNumber);
5757
expect(rawDataPacket[k.OBCIPacketPositionStartByte]).to.equal(k.OBCIByteStart);
5858
expect(rawDataPacket[k.OBCIPacketPositionStopByte]).to.equal(k.OBCIStreamPacketStandardRawAux);

0 commit comments

Comments
 (0)