Пример #1
0
        /// <summary>
        /// Runs "test" script: see <see cref="RunScript(string, bool)"/>.
        /// </summary>
        /// <param name="globalInfo">The global information object.</param>
        /// <param name="scriptMustExist">
        /// False to only emit a warning and return false if the script doesn't exist instead of
        /// throwing an exception.
        /// </param>
        /// <returns>False if the script doesn't exist (<paramref name="scriptMustExist"/> is false), otherwise true.</returns>
        public void RunTest()
        {
            var key = DirectoryPath.AppendPart("test");

            if (!GlobalInfo.CheckCommitMemoryKey(key))
            {
                RunScript("test", false, true);
                GlobalInfo.WriteCommitMemoryKey(key);
            }
        }
Пример #2
0
 protected NPMProject(
     StandardGlobalInfo globalInfo,
     NPMSolution npmSolution,
     SimplePackageJsonFile json,
     NormalizedPath outputPath)
 {
     DirectoryPath = json.JsonFilePath.RemoveLastPart();
     PackageJson   = json;
     OutputPath    = outputPath;
     NPMRCPath     = DirectoryPath.AppendPart(".npmrc");
     GlobalInfo    = globalInfo;
     NpmSolution   = npmSolution;
 }