Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  update-webvtt.js   Sprache: JAVA

 
#!/usr/bin/env node

/* eslint-env node */

var gift = require("gift"),
  fs = require("fs"),
  argv = require("optimist")
    .usage(
      "Update vtt.sys.mjs with the latest from a vtt.js directory.\nUsage:" +
        " $0 -d [dir]"
    )
    .demand("d")
    .options("d", {
      alias: "dir",
      describe: "Path to WebVTT directory.",
    })
    .options("r", {
      alias: "rev",
      describe: "Revision to update to.",
      default"master",
    })
    .options("w", {
      alias: "write",
      describe: "Path to file to write to.",
      default"./vtt.sys.mjs",
    }).argv;

var repo = gift(argv.d);
repo.status(function (err, status) {
  if (!status.clean) {
    console.log("The repository's working directory is not clean. Aborting.");
    process.exit(1);
  }
  repo.checkout(argv.r, function () {
    repo.commits(argv.r, 1, function (err, commits) {
      var vttjs = fs.readFileSync(argv.d + "/lib/vtt.js""utf8");

      // Remove settings for VIM and Emacs.
      vttjs = vttjs.replace(/\/\* -\*-.*-\*- \*\/\n/, "");
      vttjs = vttjs.replace(/\/\* vim:.* \*\/\n/, "");

      // Concatenate header and vttjs code.
      vttjs =
        "/* This Source Code Form is subject to the terms of the Mozilla Public\n" +
        " * License, v. 2.0. If a copy of the MPL was not distributed with this\n" +
        " * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n\n" +
        "export var WebVTT;" +
        "/**\n" +
        " * Code below is vtt.js the JS WebVTT implementation.\n" +
        " * Current source code can be found at http://github.com/mozilla/vtt.js\n" +
        " *\n" +
        " * Code taken from commit " +
        commits[0].id +
        "\n" +
        " */\n" +
        vttjs;

      fs.writeFileSync(argv.w, vttjs);
    });
  });
});

Messung V0.5
C=91 H=100 G=95

¤ Dauer der Verarbeitung: 0.16 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge