Exemplo n.º 1
0
        /// <summary>
        /// Executes the task.
        /// </summary>
        /// <returns><c>true</c> on success</returns>
        public override bool Execute()
        {
            MSBuildHost.EnsureInitialized();
            var config = React.AssemblyRegistration.Container.Resolve <IReactSiteConfiguration>();

            config.UseHarmony = UseHarmony;

            _environment = React.AssemblyRegistration.Container.Resolve <IReactEnvironment>();

            Log.LogMessage("Starting TransformJsx");
            var stopwatch = Stopwatch.StartNew();
            var result    = ExecuteInternal();

            Log.LogMessage("TransformJsx completed in {0}", stopwatch.Elapsed);
            return(result);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Executes the task.
        /// </summary>
        /// <returns><c>true</c> on success</returns>
        public override bool Execute()
        {
            MSBuildHost.EnsureInitialized();
            var config = React.AssemblyRegistration.Container.Resolve <IReactSiteConfiguration>();

            config
            .SetReuseJavaScriptEngines(false);

            _environment = React.AssemblyRegistration.Container.Resolve <IReactEnvironment>();

            Log.LogMessage("Starting Babel transform");
            var stopwatch = Stopwatch.StartNew();
            var result    = ExecuteInternal();

            Log.LogMessage("Babel transform completed in {0}", stopwatch.Elapsed);
            return(result);
        }