-
Notifications
You must be signed in to change notification settings - Fork 248
feat(template_cache_generator): support external css rewriters #1052
Conversation
@pavelgj Could you review this code? |
@rkj Please remove cssjanus from the tests and write a simple/short rewriter just enough to demonstrate that it works. @tfortes Ted, would you mind taking a look at this? A couple of general thoughts on this: it seems like a job for transformer, however we don't have template_cache_generator transformer, yet, so maybe this approach is OK for cmd tool. |
Done. |
@pavelgj - I think you meant for @tedsanders to take a look :) - I'm Tommy by the way. ...but I agree that transformers would be nice. Even better if we could also process the html files to generate i18n-enabled versions of the html. ...But that's perhaps another discussion. |
@@ -0,0 +1,3 @@ | |||
#!/bin/bash | |||
|
|||
sed 's/left/right/g' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little concerned that this test will only work on certain environments. Or your environment would need to be setup correctly. Needs a comment somewhere to tell people earlier that they need to have sed available from the command line. Or even better, but I don't think it is possible would be to check for it's presence in the test and not fail if it isn't available.
Just one comment generally looks good. @pavelg just a note my username is @TedSander for Github. Writing a transformer is on my list for cache, but lower priority until my project can use them. I'll make sure this functionality get's in as well. |
LGTM just saw the SED check. |
Sorry @tfortes and @TedSander for confusion -- copy-pasting error. |
…ator. The provided rewriter will be used to transform every css read by the TemplateCache, the original css is provided on stdin, and result is read from the stdout of provided binary.
It use simple sed script to showcase integration is working. Test runs only if sed is present on the running system. The test uses css with simple rules that are getting traslated for RTL locales.
It use simple sed script to showcase integration is working. Test runs only if sed is present on the running system. The test uses css with simple rules that are getting traslated for RTL locales. Closes #1052
It use simple sed script to showcase integration is working. Test runs only if sed is present on the running system. The test uses css with simple rules that are getting traslated for RTL locales. Closes dart-archive#1052
…ator. The provided rewriter will be used to transform every css read by the TemplateCache, the original css is provided on stdin, and result is read from the stdout of provided binary. TESTING: The test uses a simple sed script to exercise the integration. The test runs only if sed is present on the running system. The test uses CSS with simple rules that are being translated for RTL locales. Closes #1052
…ator. The provided rewriter will be used to transform every css read by the TemplateCache, the original css is provided on stdin, and result is read from the stdout of provided binary. TESTING: The test uses a simple sed script to exercise the integration. The test runs only if sed is present on the running system. The test uses CSS with simple rules that are being translated for RTL locales. Closes #1052
I want to use cssjanus to create RTL version of css automatically.