Преглед изворни кода

chore(package): remove shortid dependency, move increase-memory-limit to devDependency

closes #487
sschmid пре 6 година
родитељ
комит
bf4d735548

+ 1 - 2
package.json

@@ -49,10 +49,8 @@
   "homepage": "http://opensheetmusicdisplay.org",
   "dependencies": {
     "es6-promise": "^4.2.5",
-    "increase-memory-limit": "^1.0.6",
     "jszip": "^3.0.0",
     "loglevel": "^1.5.0",
-    "shortid": "^2.2.14",
     "typescript-collections": "^1.1.2",
     "vexflow": "^1.2.87"
   },
@@ -72,6 +70,7 @@
     "eslint-plugin-standard": "^4.0.0",
     "html-webpack-plugin": "^3.2.0",
     "http-server": "^0.11.0",
+    "increase-memory-limit": "^1.0.6",
     "jquery": "^3.2.1",
     "karma": "^4.0.0",
     "karma-base64-to-js-preprocessor": "^0.0.1",

+ 2 - 3
src/MusicalScore/VoiceData/SourceMeasure.ts

@@ -11,13 +11,13 @@ import {MultiTempoExpression} from "./Expressions/MultiTempoExpression";
 import {KeyInstruction} from "./Instructions/KeyInstruction";
 import {AbstractNotationInstruction} from "./Instructions/AbstractNotationInstruction";
 import {Repetition} from "../MusicSource/Repetition";
-import {BaseIdClass} from "../../Util/BaseIdClass";
+//import {BaseIdClass} from "../../Util/BaseIdClass"; // SourceMeasure originally extended BaseIdClass, but ids weren't used.
 
 /**
  * The Source Measure represents the source data of a unique measure, including all instruments with their staves.
  * There exists one source measure per XML measure or per paper sheet measure (e.g. the source measures are not doubled in repetitions)
  */
-export class SourceMeasure extends BaseIdClass {
+export class SourceMeasure {
 
     /**
      * The data entries and data lists will be filled with null values according to the total number of staves,
@@ -25,7 +25,6 @@ export class SourceMeasure extends BaseIdClass {
      * @param completeNumberOfStaves
      */
     constructor(completeNumberOfStaves: number) {
-        super();
         this.completeNumberOfStaves = completeNumberOfStaves;
         this.implicitMeasure = false;
         this.breakSystemAfter = false;

+ 1 - 3
src/MusicalScore/VoiceData/Tie.ts

@@ -1,15 +1,13 @@
 import {Note} from "./Note";
-import {BaseIdClass} from "../../Util/BaseIdClass";
 import { Fraction } from "../../Common/DataObjects/Fraction";
 import { Pitch } from "../../Common/DataObjects/Pitch";
 
 /**
  * A [[Tie]] connects two notes of the same pitch and name, indicating that they have to be played as a single note.
  */
-export class Tie extends BaseIdClass {
+export class Tie {
 
     constructor(note: Note) {
-        super();
         this.AddNote(note);
     }
 

+ 2 - 2
src/Util/BaseIdClass.ts

@@ -1,4 +1,4 @@
-import * as shortid from "shortid";
+//import * as shortid from "shortid";
 
 /**
  * Support for the unique id generator.
@@ -8,7 +8,7 @@ export abstract class BaseIdClass {
     protected instanceId: string;
 
     constructor() {
-        this.instanceId = shortid.generate();
+        //this.instanceId = shortid.generate();
     }
 
     public toString(): string {

+ 1 - 1
src/Util/index.ts

@@ -1,5 +1,5 @@
 // created from 'create-ts-index'
 
-export * from "./BaseIdClass";
+//export * from "./BaseIdClass";
 export * from "./CollectionUtil";
 export * from "./PSMath";