예제 #1
0
        public bool Execute()
        {
            NodeJS.Install((msg, _, __) => { BuildEngine.Info(msg); });

            string projectFolder  = Path.GetDirectoryName(BuildEngine.ProjectFileOfTaskNode);
            string configFilePath = (ConfigurationFile?.GetMetadata("FullPath") ?? Compiler.FindConfigurationFile(projectFolder));

            var options = new Configuration.CompilerOptions(
                configFilePath,
                Minify,
                GenerateSourceMaps);

            CompilerResult result = Compiler.Run(options, projectFolder);

            foreach (CompilerError err in result.Errors)
            {
                Log(err);
            }
            Log(result);

            return(result.HasErrors == false);
        }