Mercurial > piecrust2
comparison piecrust/plugins/builtin.py @ 196:154b8df04829
processing: Add Compass and Sass processors.
The Sass processor is similar to the Less processor, i.e. it tries to be
part of the structured pipeline processing by using the mapfile produced by
the Sass compiler in order to provide a list of dependencies.
The Compass processor is completely acting outside of the pipeline, so the
server won't know what's up to date and what's not. It's expected that the
user will run `compass watch` to keep things up to date. However, it will
require to pass the server's cache directory to put things in, so we'll need
to add some easy way to get that path for the user.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 11 Jan 2015 23:08:49 -0800 |
parents | d5b7c2a4ec9d |
children | 57eec8a67095 |
comparison
equal
deleted
inserted
replaced
195:b4724e577a8c | 196:154b8df04829 |
---|---|
2 from piecrust.commands.builtin.baking import ( | 2 from piecrust.commands.builtin.baking import ( |
3 BakeCommand, ShowRecordCommand) | 3 BakeCommand, ShowRecordCommand) |
4 from piecrust.commands.builtin.info import ( | 4 from piecrust.commands.builtin.info import ( |
5 RootCommand, ShowConfigCommand, | 5 RootCommand, ShowConfigCommand, |
6 FindCommand, ShowSourcesCommand, ShowRoutesCommand, ShowPathsCommand) | 6 FindCommand, ShowSourcesCommand, ShowRoutesCommand, ShowPathsCommand) |
7 from piecrust.commands.builtin.plugins import ( | |
8 PluginsCommand) | |
7 from piecrust.commands.builtin.scaffolding import ( | 9 from piecrust.commands.builtin.scaffolding import ( |
8 PrepareCommand, | 10 PrepareCommand, |
9 DefaultPrepareTemplatesCommandExtension, | 11 DefaultPrepareTemplatesCommandExtension, |
10 UserDefinedPrepareTemplatesCommandExtension, | 12 UserDefinedPrepareTemplatesCommandExtension, |
11 DefaultPrepareTemplatesHelpTopic) | 13 DefaultPrepareTemplatesHelpTopic) |
18 from piecrust.formatting.smartypantsformatter import SmartyPantsFormatter | 20 from piecrust.formatting.smartypantsformatter import SmartyPantsFormatter |
19 from piecrust.importing.jekyll import JekyllImporter | 21 from piecrust.importing.jekyll import JekyllImporter |
20 from piecrust.importing.piecrust import PieCrust1Importer | 22 from piecrust.importing.piecrust import PieCrust1Importer |
21 from piecrust.plugins.base import PieCrustPlugin | 23 from piecrust.plugins.base import PieCrustPlugin |
22 from piecrust.processing.base import CopyFileProcessor | 24 from piecrust.processing.base import CopyFileProcessor |
25 from piecrust.processing.compass import CompassProcessor | |
23 from piecrust.processing.less import LessProcessor | 26 from piecrust.processing.less import LessProcessor |
24 from piecrust.processing.requirejs import RequireJSProcessor | 27 from piecrust.processing.requirejs import RequireJSProcessor |
28 from piecrust.processing.sass import SassProcessor | |
25 from piecrust.processing.sitemap import SitemapProcessor | 29 from piecrust.processing.sitemap import SitemapProcessor |
26 from piecrust.sources.base import DefaultPageSource | 30 from piecrust.sources.base import DefaultPageSource |
27 from piecrust.sources.posts import ( | 31 from piecrust.sources.posts import ( |
28 FlatPostsSource, ShallowPostsSource, HierarchyPostsSource) | 32 FlatPostsSource, ShallowPostsSource, HierarchyPostsSource) |
29 from piecrust.sources.autoconfig import AutoConfigSource | 33 from piecrust.sources.autoconfig import AutoConfigSource |
50 ShowSourcesCommand(), | 54 ShowSourcesCommand(), |
51 ShowRoutesCommand(), | 55 ShowRoutesCommand(), |
52 ShowPathsCommand(), | 56 ShowPathsCommand(), |
53 BakeCommand(), | 57 BakeCommand(), |
54 ShowRecordCommand(), | 58 ShowRecordCommand(), |
55 ServeCommand()] | 59 ServeCommand(), |
60 PluginsCommand()] | |
56 | 61 |
57 def getCommandExtensions(self): | 62 def getCommandExtensions(self): |
58 return [ | 63 return [ |
59 DefaultPrepareTemplatesCommandExtension(), | 64 DefaultPrepareTemplatesCommandExtension(), |
60 UserDefinedPrepareTemplatesCommandExtension(), | 65 UserDefinedPrepareTemplatesCommandExtension(), |
86 TextileFormatter()] | 91 TextileFormatter()] |
87 | 92 |
88 def getProcessors(self): | 93 def getProcessors(self): |
89 return [ | 94 return [ |
90 CopyFileProcessor(), | 95 CopyFileProcessor(), |
96 CompassProcessor(), | |
91 LessProcessor(), | 97 LessProcessor(), |
98 SassProcessor(), | |
92 RequireJSProcessor(), | 99 RequireJSProcessor(), |
93 SitemapProcessor()] | 100 SitemapProcessor()] |
94 | 101 |
95 def getImporters(self): | 102 def getImporters(self): |
96 return [ | 103 return [ |