/** @return */ protected ProcessorsFactory createProcessorsFactory() { SimpleProcessorsFactory processorsFactory = new SimpleProcessorsFactory(); // run rewriting before import! processorsFactory.addPreProcessor(new CssUrlRewritingProcessor()); processorsFactory.addPreProcessor(new CssImportPreProcessor()); processorsFactory.addPreProcessor(new LessCssImportPreProcessor()); processorsFactory.addPostProcessor(new ExtendedLessCssProcessor()); if (isDevelopment()) { processorsFactory.addPostProcessor(new CssLintProcessor()); } else { processorsFactory.addPostProcessor(new YUICssCompressorProcessor()); } // JS PreProcessors if (!isDevelopment()) { processorsFactory.addPreProcessor(new SemicolonAppenderPreProcessor()); processorsFactory.addPreProcessor( PathPatternProcessorDecorator.exclude(new ConsoleStripperProcessor(), "**/*.min.js") .getDecoratedObject()); processorsFactory.addPreProcessor( PathPatternProcessorDecorator.exclude( new GoogleClosureCompressorProcessor(CompilationLevel.SIMPLE_OPTIMIZATIONS), "**/*.min.js") .getDecoratedObject()); } return processorsFactory; }
/** {@inheritDoc} */ @Override protected ProcessorsFactory newProcessorsFactory() { // preProcessors=bomStripper,cssImport,cssUrlRewriting,semicolonAppender,yuiJsMinAdvanced,yuiCssMin // postProcessors=cssVariables final SimpleProcessorsFactory factory = new SimpleProcessorsFactory(); // factory.addPreProcessor(getPlaceholderProcessor()); factory.addPreProcessor(new CssUrlRewritingProcessor()); factory.addPreProcessor(new CssImportPreProcessor()); factory.addPreProcessor(new SemicolonAppenderPreProcessor()); factory.addPreProcessor(new JawrCssMinifierProcessor()); // factory.addPreProcessor(new JSMinProcessor()); factory.addPreProcessor(new YUICssCompressorProcessor()); factory.addPostProcessor(new CssVariablesProcessor()); factory.addPostProcessor(new RhinoLessCssProcessor()); return factory; }