feat(infrastructure): Create script for that rewrites .scss imports#831
feat(infrastructure): Create script for that rewrites .scss imports#831lynnmercier merged 4 commits intomasterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #831 +/- ##
=========================================
Coverage ? 99.93%
=========================================
Files ? 68
Lines ? 3144
Branches ? 387
=========================================
Hits ? 3142
Misses ? 2
Partials ? 0Continue to review full report at Codecov.
|
traviskaufman
left a comment
There was a problem hiding this comment.
Excellent work!! query-ast looks so awesome!
scripts/sass-closure-rewriter.sh
Outdated
| echo -e "\033[36m[closure-rewriter]\033[0m" "$@" | ||
| } | ||
|
|
||
| function join_by { local IFS="$1"; shift; echo "$*"; } |
There was a problem hiding this comment.
Doesn't look like this is used anywhere?
scripts/sass-closure-rewriter.sh
Outdated
| rm -fr $CLOSURE_PKGDIR/**/{node_modules,dist} | ||
|
|
||
| log "Rewriting all import statements to be closure compatible" | ||
| node scripts/rewrite-sass-import-statements-for-closure.js $CLOSURE_PKGDIR No newline at end of file |
| @@ -0,0 +1,44 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
General comment here is that some people may not understand why we need to rewrite our sass for closure. Should we maybe mention that this is to help make it closure-stylesheets compatible for internal infrastructure?
|
Can you explain how to use this script? Looks like the files are written to the CLOSURE_TMP folder. Do you import your files from there? |
|
Sorry for the long delay in a reply. sass-closure-rewriter.sh rewrites files to CLOSURE_TMP folder. From there you can copy them wherever you like. I wrote it to help us migrate our Sass files into Google's internal build system, which is based off directory structure and does not use node. So, the script might not be suited for any other use case. But, you can always use the script as an example, and write your own script to suit your needs. |
No description provided.