Ejemplo n.º 1
0
        /// <nodoc/>
        public static JavaScriptProject FromDeserializedProject(string scriptCommandName, string scriptCommand, DeserializedJavaScriptProject deserializedJavaScriptProject)
        {
            // Filter the output directories and source files that apply to this particular script command name
            var outputDirectories = ExtractRelevantPaths(scriptCommandName, deserializedJavaScriptProject.OutputDirectories);
            var sourceFiles       = ExtractRelevantPaths(scriptCommandName, deserializedJavaScriptProject.SourceFiles);

            return(new JavaScriptProject(
                       deserializedJavaScriptProject.Name,
                       deserializedJavaScriptProject.ProjectFolder,
                       scriptCommandName,
                       scriptCommand,
                       deserializedJavaScriptProject.TempFolder,
                       outputDirectories,
                       sourceFiles));
        }
Ejemplo n.º 2
0
        /// <nodoc/>
        public static JavaScriptProject FromDeserializedProject(string scriptCommandName, string scriptCommand, DeserializedJavaScriptProject deserializedJavaScriptProject)
        {
            // Filter the output directories and source files that apply to this particular script command name
            var outputDirectories = ExtractRelevantPaths(scriptCommandName, deserializedJavaScriptProject.OutputDirectories);
            var inputFiles        = ExtractRelevantPaths(scriptCommandName, deserializedJavaScriptProject.SourceFiles).Select(path => FileArtifact.CreateSourceFile(path)).ToList();

            return(new JavaScriptProject(
                       deserializedJavaScriptProject.Name,
                       deserializedJavaScriptProject.ProjectFolder,
                       scriptCommandName,
                       scriptCommand,
                       deserializedJavaScriptProject.TempFolder,
                       outputDirectories,
                       inputFiles,
                       inputDirectories: CollectionUtilities.EmptyArray <DirectoryArtifact>()));
        }