enketo-xslt
Advanced tools
Comparing version 1.15.4 to 1.15.5
@@ -5,2 +5,7 @@ ## Change Log | ||
[1.15.5] - 2018-01-03 | ||
--------------------- | ||
##### Changed | ||
- Syntax to facilitate incorporation into a executable application. | ||
[1.15.4] - 2017-12-22 | ||
@@ -7,0 +12,0 @@ --------------------- |
19
index.js
@@ -1,14 +0,13 @@ | ||
var xslModel, xslForm, | ||
fs = require('fs'), | ||
path = require('path'), | ||
xslModelPath = path.resolve(__dirname, './xsl/openrosa2xmlmodel.xsl'), | ||
xslFormPath = path.resolve(__dirname, './xsl/openrosa2html5form.xsl'); | ||
const fs = require( 'fs' ); | ||
const path = require( 'path' ); | ||
const xslModelPath = path.join( __dirname, './xsl/openrosa2xmlmodel.xsl' ); | ||
const xslFormPath = path.join( __dirname, './xsl/openrosa2html5form.xsl' ); | ||
// only read once | ||
xslModel = fs.readFileSync(xslModelPath, {encoding: 'utf8'}); | ||
xslForm = fs.readFileSync(xslFormPath, {encoding: 'utf8'}); | ||
const xslModel = fs.readFileSync( xslModelPath, { encoding: 'utf8' } ); | ||
const xslForm = fs.readFileSync( xslFormPath, { encoding: 'utf8' } ); | ||
module.exports = { | ||
xslModel: xslModel, | ||
xslForm: xslForm | ||
}; | ||
xslModel: xslModel, | ||
xslForm: xslForm | ||
}; |
{ | ||
"name": "enketo-xslt", | ||
"version": "1.15.4", | ||
"version": "1.15.5", | ||
"description": "XSL stylesheets for the Enketo XForm transformation", | ||
@@ -26,3 +26,6 @@ "main": "index.js", | ||
"author": "Martijn van de Rijdt", | ||
"license": "Apache-2.0" | ||
} | ||
"license": "Apache-2.0", | ||
"devDependencies": { | ||
"mocha": "^4.1.0" | ||
} | ||
} |
@@ -1,16 +0,18 @@ | ||
var sheets = require('../index'), | ||
assert = require('assert'); | ||
/* eslint-env mocha */ | ||
describe('sheets', function() { | ||
const sheets = require( '../index' ); | ||
const assert = require( 'assert' ); | ||
it('should return an xslForm sheet', function() { | ||
assert.equal(typeof sheets.xslForm, 'string'); | ||
assert.equal(sheets.xslForm.length > 0, true); | ||
}); | ||
describe( 'sheets', () => { | ||
it('should return an xslModel sheet', function() { | ||
assert.equal(typeof sheets.xslModel, 'string'); | ||
assert.equal(sheets.xslModel.length > 0, true); | ||
}); | ||
it( 'should return an xslForm sheet', () => { | ||
assert.equal( typeof sheets.xslForm, 'string' ); | ||
assert.equal( sheets.xslForm.length > 0, true ); | ||
} ); | ||
}); | ||
it( 'should return an xslModel sheet', () => { | ||
assert.equal( typeof sheets.xslModel, 'string' ); | ||
assert.equal( sheets.xslModel.length > 0, true ); | ||
} ); | ||
} ); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
119735
13
52
1