Skip to content

Commit

Permalink
Fix for Hermes.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Mar 25, 2023
1 parent 821cda9 commit c281ccc
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 10 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,23 @@ or get the full development version and minified scripts from [**GitHub**](https
//...
```

##### CommonJS (Browserify and Node.js command line applications)
##### CommonJS

```js
var JZZ = require('jzz');
require('jzz-midi-smf')(JZZ);
//...
```

##### TypeScript / ES6

```ts
import { JZZ } from 'jzz';
import { SMF } from 'jzz-midi-smf';
SMF(JZZ);
//...
```

##### AMD

```js
Expand Down
3 changes: 2 additions & 1 deletion javascript/JZZ.midi.SMF.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(function(global, factory) {
/* istanbul ignore next */
if (typeof exports === 'object' && typeof module !== 'undefined') {
factory.SMF = factory;
module.exports = factory;
}
else if (typeof define === 'function' && define.amd) {
Expand All @@ -14,7 +15,7 @@
/* istanbul ignore next */
if (JZZ.MIDI.SMF) return;

var _ver = '1.7.2';
var _ver = '1.7.3';

var _now = JZZ.lib.now;
function _error(s) { throw new Error(s); }
Expand Down
2 changes: 1 addition & 1 deletion minified/JZZ.midi.SMF.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jzz-midi-smf",
"version": "1.7.2",
"version": "1.7.3",
"description": "Standard MIDI Files: read / write / play",
"main": "javascript/JZZ.midi.SMF.js",
"scripts": {
Expand All @@ -16,10 +16,10 @@
],
"author": "jazz-soft (https://jazz-soft.net/)",
"dependencies": {
"jzz": "^1.6.0"
"jzz": "^1.6.1"
},
"devDependencies": {
"eslint": "^8.35.0",
"eslint": "^8.36.0",
"grunt": "^1.6.1",
"grunt-contrib-jshint": "^3.2.0",
"grunt-contrib-uglify": "^5.2.2",
Expand Down
15 changes: 11 additions & 4 deletions test/mocha.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
var assert = require('assert');
var fs = require('fs');
var JZZ = require('jzz');
const assert = require('assert');
const fs = require('fs');
const JZZ = require('jzz');
require('..')(JZZ);
const version = require('../package.json').version;

function Sample(done, list) {
this.done = done;
Expand All @@ -14,6 +15,12 @@ function Sample(done, list) {
};
}

describe('Info', function() {
it('version ' + version, function() {
assert.equal(JZZ.MIDI.SMF.version(), version);
});
});

describe('functions', function() {
var smf = JZZ.MIDI.SMF(1, 100); // test without the 'new' keyword
var trk = JZZ.MIDI.SMF.MTrk(); // test without the 'new' keyword
Expand Down Expand Up @@ -163,7 +170,7 @@ describe('functions', function() {
});

describe('integration: read / write / play', function() {
console.log('JZZ.MIDI.SMF v' + JZZ.MIDI.SMF.version());
//console.log('JZZ.MIDI.SMF v' + JZZ.MIDI.SMF.version());
it('MIDI file type 0; fps/ppf', function(done) {
// new file
var smf = new JZZ.MIDI.SMF(0, 24, 16);
Expand Down

0 comments on commit c281ccc

Please sign in to comment.