Prechádzať zdrojové kódy

Removed submodules - made them standalone

Andrea Condoluci 9 rokov pred
rodič
commit
51f3958f2d

+ 2 - 2
karma.conf.js

@@ -26,7 +26,7 @@ module.exports = function (config) {
             pattern: 'test/data/*.xml',
             included: true
         }, {
-            pattern: 'test/data/*.mxl.str',
+            pattern: 'test/data/*.mxl.base64',
             included: true
         }, {
             pattern: 'test/data/*.mxl',
@@ -39,7 +39,7 @@ module.exports = function (config) {
         // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
         preprocessors: {
             'test/data/*.xml': ['xml2js'],
-            'test/data/*.mxl.str': ['mxl2js']
+            'test/data/*.mxl.base64': ['base64-to-js']
         },
 
         // test results reporter to use

+ 1 - 1
package.json

@@ -54,6 +54,6 @@
   },
   "devDependencies": {
     "karma-xml2js-preprocessor": "",
-    "karma-mxl2js-preprocessor": "file:submodules/karma-mxl2js-preprocessor"
+    "karma-base64-to-js-preprocessor": ""
   }
 }

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

@@ -1,8 +0,0 @@
-# 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

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

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

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

@@ -1,25 +0,0 @@
-/*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]
-};

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

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

+ 0 - 8
submodules/karma-mxl2js-preprocessor/.gitattributes

@@ -1,8 +0,0 @@
-# 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

+ 0 - 1
submodules/karma-mxl2js-preprocessor/.gitignore

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

+ 0 - 25
submodules/karma-mxl2js-preprocessor/lib/index.js

@@ -1,25 +0,0 @@
-/*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 path = file.originalPath.replace(basePath + '/', ''),
-            filename = path.replace('.str', '');
-
-        file.path = file.path + '.js';
-        done("window.__mxl__ = window.__mxl__ || {};\nwindow.__mxl__['" +
-                // filename + "'] = '" + escapeString(content) + "';\n"
-                filename + "'] = window.atob('" + content + "');\n"
-              );
-    };
-};
-
-createPreprocessor.$inject = ['logger', 'config.basePath'];
-
-module.exports = {
-    'preprocessor:mxl2js': ['factory', createPreprocessor]
-};

+ 0 - 5
submodules/karma-mxl2js-preprocessor/package.json

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

+ 1 - 1
test/Common/FileIO/Mxl.ts

@@ -5,7 +5,7 @@ import { extractSheetFromMxl } from "../../../src/Common/FileIO/Mxl.ts";
 describe("MXL Tests", () => {
   // Load the mxl file
   function getSheet(filename: string): string {
-    return ((window as any).__mxl__)[filename];
+    return ((window as any).__raw__)[filename];
   }
 
   // Generates a test for a mxl file name

+ 0 - 0
test/data/MozartTrio.mxl.str → test/data/MozartTrio.mxl.base64