- Created static file structure: * static/css/components/ - reusable CSS components * static/css/pages/ - page-specific styles * static/js/utils/ - utility functions * static/js/components/ - interactive components - Created infrastructure files: * static/css/variables.css - CSS custom properties * static/css/components/index.css - CSS entry point * static/js/utils/index.js - JS utilities entry point * static/js/components/index.js - JS components entry point - Added comprehensive tests: * tests/test_static_files.py - 12 tests for structure, syntax, encoding - Updated .gitignore: * Added staticfiles/ to ignore list * Clarified that static/ sources are tracked - Added REFACTORING_PLAN.md: * New strategy: extract CSS/JS before HTML decomposition * Documented lessons learned from previous attempts * Defined phases 0-6 for systematic refactoring
27 lines
1.0 KiB
JavaScript
27 lines
1.0 KiB
JavaScript
/**
|
||
* JavaScript Utilities Index
|
||
*
|
||
* Этот файл служит единой точкой входа для всех JS утилит.
|
||
* Экспортирует все утилиты для удобного импорта.
|
||
*
|
||
* Использование в шаблонах:
|
||
* <script type="module">
|
||
* import { esc, norm, debounce } from '{% static "js/utils/index.js" %}';
|
||
* </script>
|
||
*
|
||
* Или импорт конкретной утилиты:
|
||
* import { esc } from '{% static "js/utils/stringUtils.js" %}';
|
||
*/
|
||
|
||
// Утилиты работы со строками (будут созданы в Фазе 2)
|
||
// export { esc, norm } from './stringUtils.js';
|
||
|
||
// Утилиты для работы со временем (будут созданы в Фазе 2)
|
||
// export { debounce, throttle } from './timing.js';
|
||
|
||
// Утилиты прокрутки (будут созданы в Фазе 2)
|
||
// export { smoothScrollTo } from './scroll.js';
|
||
|
||
// Placeholder export для валидности модуля
|
||
export const UTILS_VERSION = '1.0.0';
|