Package com.voltvoodoo.brew

Examples of com.voltvoodoo.brew.FileSetChangeMonitor


    }

    private void checkForChangesEvery( long ms ) throws FileNotFoundException,
            CoffeeScriptCompileException, IOException
    {
        FileSetChangeMonitor hamlFiles = new FileSetChangeMonitor(
                hamlSourceDir, HAML_PATTERN );
        FileSetChangeMonitor coffeeFiles = new FileSetChangeMonitor(
                coffeeSourceDir, COFFEE_PATTERN );
        FileSetChangeMonitor resourceFiles = new FileSetChangeMonitor(
                resourceSourceDir, ANY_PATTERN );

        try
        {
            while ( true )
            {
                Thread.sleep( ms );

                for ( String file : hamlFiles.getModifiedFilesSinceLastTimeIAsked() )
                {
                    try {
                        compileHamlFile( file);
                        System.out.println("[" + file + "]: Compiled");
                    } catch(Exception e) {
                        getLog().error( "[" + file + "]: " + e.getMessage() );
                    }
                }

                for ( String file : coffeeFiles.getModifiedFilesSinceLastTimeIAsked() )
                {
                    try
                    {
                        compileCoffeescriptFile( file );
                        System.out.println("[" + file + "]: Compiled");
                    }
                    catch ( Exception e )
                    {
                        getLog().error( "[" + file + "]: " + e.getMessage() );
                    }
                }

                for ( String file : resourceFiles.getModifiedFilesSinceLastTimeIAsked() )
                {
                    try
                    {
                        File source = new File(resourceSourceDir, file);
                        File target = new File(resourceOutputDir, file);
View Full Code Here

TOP

Related Classes of com.voltvoodoo.brew.FileSetChangeMonitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.