Selaa lähdekoodia

Fixed typo and uncommited package

Andrea Condoluci 9 vuotta sitten
vanhempi
commit
d1b6064bcc

+ 3 - 1
.gitignore

@@ -31,7 +31,9 @@ build/Release
 
 # Dependency directory
 # https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
-node_modules
+node_modules/*
+!node_modules/karma-musicxml2js-preprocessor/
+
 
 # Optional npm cache directory
 .npm

+ 8 - 0
node_modules/karma-musicxml2js-preprocessor/.gitattributes

@@ -0,0 +1,8 @@
+# See https://help.github.com/articles/dealing-with-line-endings
+
+# By default, normalize all files to unix line endings when commiting.
+* text
+
+# Denote all files that are truly binary and should not be modified.
+*.png binary
+*.jpg binary

+ 1 - 0
node_modules/karma-musicxml2js-preprocessor/.gitignore

@@ -0,0 +1 @@
+node_modules

+ 25 - 0
node_modules/karma-musicxml2js-preprocessor/lib/index.js

@@ -0,0 +1,25 @@
+/*globals module*/
+var escapeString = function (str) {
+    'use strict';
+    return str.replace(/'/g, '\\\'').replace(/\r?\n/g, '\\n\' +\n    \'');
+};
+
+var createPreprocessor = function (logger, basePath) {
+    'use strict';
+    return function (content, file, done) {
+        var xmlPath = file.originalPath.replace(basePath + '/', ''),
+            filename = xmlPath;
+
+        file.path = file.path + '.js';
+        done("window.__xml__ = window.__xml__ || {};\nwindow.__xml__['" +
+                filename + "'] = new DOMParser().parseFromString('" + escapeString(content) +
+                "', 'text/xml');\n"
+              );
+    };
+};
+
+createPreprocessor.$inject = ['logger', 'config.basePath'];
+
+module.exports = {
+    'preprocessor:musicxml2js': ['factory', createPreprocessor]
+};

+ 5 - 0
node_modules/karma-musicxml2js-preprocessor/package.json

@@ -0,0 +1,5 @@
+{
+  "name": "karma-musicxml2js-preprocessor",
+  "version": "0.0.1",
+  "main": "lib/index.js"
+}

+ 1 - 1
test/MusicalScore/ScoreIO/MusicSheetReader.ts

@@ -61,5 +61,5 @@ describe("Music Sheet Reader Tests", () => {
         // Staff Entries on first measure
         // chai.expect(sheet.SourceMeasures[0].VerticalSourceStaffEntryContainers[0].StaffEntries.length).to.equal(4);
         done();
-    })
+    });
 });