# Script for CodeKit hook to append processed css from scss file to liquid file # (make sure to use 'Compressed' for scss->css output so everything is on one line) # # To use: # 1. create a `/styles` directory in your Shopify theme for your .scss files # 2. name the .scss file the same name as the liquid file; e.g. sample.scss/sample.liquid # 3. IMPORTANT: add empty `` tags to first line of liquid file; add empty line below # 4. add this script to your project in CodeKit in Hooks # 5. profit ## NOTES: # $CK_OUTPUT_PATH is the processed css file # (provided variable from CodeKit) # $CK_PROJECT_ROOT is the project root folder # (another provided variable from CodeKit) # get contents of css file css=$(<$CK_OUTPUT_PATH) # get filename without extension; save to FILE variable s=$CK_OUTPUT_PATH s=${s##*/} FILE=${s%.css} # set up our ' # concat css with