Skip to content

Commit

Permalink
begin work on auto-style-commit script
Browse files Browse the repository at this point in the history
  • Loading branch information
beebls committed Oct 12, 2024
1 parent 8d4c62c commit 58b49ef
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions commit-styles-macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# TODO: NOT FINISHED

# This uses macos' sed, which is different from the one in linux

css_file_path="$(dirname "$0")/src/styles/styles.css"
css_as_string_path="$(dirname "$0")/src/styles/styles-as-string.ts"

# Read the content of the CSS file, ignoring lines that start with '/*'
css_content=$(sed '/^\s*\/\*/d' "$css_file_path")

export_header_line_number=$(grep -n "export const styles" $css_as_string_path | cut -d: -f1)
echo export_header_line_number: $export_header_line_number

0 comments on commit 58b49ef

Please sign in to comment.