-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #777 from CirclesUBI/style-update
Update the app style to the new Circles branding
- Loading branch information
Showing
33 changed files
with
3,740 additions
and
468 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
# Directory to search | ||
search_dir="$1" | ||
|
||
# Temporary file for results | ||
temp_file="imports_found.txt" | ||
|
||
# Clear previous results | ||
> "$temp_file" | ||
|
||
# Find all .js files and extract relevant imports from ~/components | ||
find "$search_dir" -name '*.js' | while read -r file; do | ||
# Grep for import statements that pull from ~/components | ||
grep -o "import .* from '~/components/.*'" "$file" | while read -r import_line; do | ||
echo "$file: $import_line" >> "$temp_file" | ||
done | ||
done | ||
|
||
# Output the results | ||
cat "$temp_file" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import re | ||
from collections import defaultdict | ||
|
||
# Path to the temporary file generated by the bash script | ||
temp_file = 'imports_found.txt' | ||
report_file = 'mui_usage.txt' | ||
|
||
# Dictionary to hold the mapping of component to file paths | ||
imports_dict = defaultdict(set) | ||
|
||
# Regular expression to extract components from new import style | ||
component_regex = re.compile(r"import\s+([^\s]+)\s+from\s+'~/components/") | ||
|
||
# Read the temporary file and populate the dictionary | ||
with open(temp_file, 'r') as file: | ||
for line in file: | ||
filepath, import_statement = line.split(':') | ||
component_match = component_regex.search(import_statement) | ||
if component_match: | ||
component = component_match.group(1) | ||
imports_dict[component].add(filepath.strip()) | ||
|
||
# Writing to the report file, sorted alphabetically | ||
with open(report_file, 'w') as file: | ||
for component in sorted(imports_dict): | ||
file.write(f"{component}\n") | ||
for filepath in sorted(imports_dict[component]): | ||
file.write(f" - {filepath}\n") | ||
file.write("\n") |
Oops, something went wrong.