Refactor directories and filenames

This commit is contained in:
Rachid Mrad 2024-11-20 21:13:19 -05:00
parent 1445e1bf61
commit 9a5ada645c
No known key found for this signature in database
58 changed files with 17 additions and 17 deletions

2
.gitignore vendored
View file

@ -2,7 +2,7 @@
docs/research/data/**
**/assets/*
!**/assets/sass/
!**/assets/src/
!**/assets/modules-common/
!**/assets/modules/
!**/assets/modules-admin/

View file

@ -8,8 +8,8 @@ const TerserPlugin = require('terser-webpack-plugin');
const ASSETS_DIR = './registrar/assets/';
const JS_BUNDLE_DEST = ASSETS_DIR + 'js';
const JS_SOURCES = [
{ src: ASSETS_DIR + 'modules/*.js', output: 'get-gov.js' },
{ src: ASSETS_DIR + 'modules-admin/*.js', output: 'get-gov-admin.js' },
{ src: ASSETS_DIR + 'src/js/getgov/*.js', output: 'getgov.min.js' },
{ src: ASSETS_DIR + 'src/js/getgov-admin/*.js', output: 'getgov-admin.min.js' },
];
/**
@ -24,7 +24,7 @@ uswds.settings.version = 3;
*/
uswds.paths.dist.css = ASSETS_DIR + 'css';
uswds.paths.dist.sass = ASSETS_DIR + 'sass';
uswds.paths.dist.theme = ASSETS_DIR + 'sass/_theme';
uswds.paths.dist.theme = ASSETS_DIR + 'src/sass/_theme';
uswds.paths.dist.fonts = ASSETS_DIR + 'fonts';
uswds.paths.dist.js = ASSETS_DIR + 'js';
uswds.paths.dist.img = ASSETS_DIR + 'img';

View file

@ -1,7 +1,7 @@
/**
* Initialize USWDS tooltips by calling initialization method. Requires that uswds-edited.js
* be loaded before get-gov.js. uswds-edited.js adds the tooltip module to the window to be
* accessible directly in get-gov.js
* be loaded before getgov.min.js. uswds-edited.js adds the tooltip module to the window to be
* accessible directly in getgov.min.js
*
*/
export function initializeTooltips() {
@ -19,8 +19,8 @@ export function initializeTooltips() {
/**
* Initialize USWDS modals by calling on method. Requires that uswds-edited.js be loaded
* before get-gov.js. uswds-edited.js adds the modal module to the window to be accessible
* directly in get-gov.js.
* before getgov.min.js. uswds-edited.js adds the modal module to the window to be accessible
* directly in getgov.min.js.
* uswdsInitializeModals adds modal-related DOM elements, based on other DOM elements existing in
* the page. It needs to be called only once for any particular DOM element; otherwise, it
* will initialize improperly. Therefore, if DOM elements change dynamically and include
@ -33,8 +33,8 @@ export function uswdsInitializeModals() {
/**
* Unload existing USWDS modals by calling off method. Requires that uswds-edited.js be
* loaded before get-gov.js. uswds-edited.js adds the modal module to the window to be
* accessible directly in get-gov.js.
* loaded before getgov.min.js. uswds-edited.js adds the modal module to the window to be
* accessible directly in getgov.min.js.
* See note above with regards to calling this method relative to uswdsInitializeModals.
*
*/

View file

@ -35,7 +35,7 @@ class RequestingEntityForm(RegistrarForm):
# If this selection is made on the form (tracked by js), then it will toggle the form value of this.
# In other words, this essentially tracks if the suborganization field == "Other".
# "Other" is just an imaginary value that is otherwise invalid.
# Note the logic in `def clean` and `handleRequestingEntityFieldset` in get-gov.js
# Note the logic in `def clean` and `handleRequestingEntityFieldset` in getgov.min.js
is_requesting_new_suborganization = forms.BooleanField(required=False, widget=forms.HiddenInput())
sub_organization = forms.ModelChoiceField(

View file

@ -21,7 +21,7 @@
<script src="{% static 'js/uswds-init.min.js' %}" defer></script>
<script src="{% static 'js/uswds.min.js' %}" defer></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script type="application/javascript" src="{% static 'js/get-gov-admin.js' %}" defer></script>
<script type="application/javascript" src="{% static 'js/getgov-admin.min.js' %}" defer></script>
<script type="application/javascript" src="{% static 'js/get-gov-reports.js' %}" defer></script>
<script type="application/javascript" src="{% static 'js/dja-collapse.js' %}" defer></script>
{% endblock %}

View file

@ -47,7 +47,7 @@
<script src="{% static 'js/uswds-init.min.js' %}" defer></script>
<!-- We override with our own copy to make some classes accessible in our JS -->
<script src="{% static 'js/uswds-edited.js' %}" defer></script>
<script src="{% static 'js/get-gov.js' %}" defer></script>
<script src="{% static 'js/getgov.min.js' %}" defer></script>
{% endblock %}
{% block canonical %}

View file

@ -49,7 +49,7 @@
<p id="domain_instructions" class="margin-top-05">After you enter your domain, well make sure its available and that it meets some of our naming requirements. If your domain passes these initial checks, well verify that it meets all our requirements after you complete the rest of this form.</p>
{% with attr_aria_describedby="domain_instructions domain_instructions2" %}
{# attr_validate / validate="domain" invokes code in get-gov.js #}
{# attr_validate / validate="domain" invokes code in getgov.min.js #}
{% with append_gov=True attr_validate="domain" add_label_class="usa-sr-only" %}
{% input_with_errors forms.0.requested_domain %}
{% endwith %}

View file

@ -44,5 +44,5 @@
</fieldset>
{% endblock %}
<script src="{% static 'js/get-gov.js' %}" defer></script>
<script src="{% static 'js/getgov.min.js' %}" defer></script>

View file

@ -29,8 +29,8 @@
10027 OUTOFSCOPE http://app:8080/public/js/uswds.min.js
# UNCLEAR WHY THIS ONE IS FAILING. Giving 404 error.
10027 OUTOFSCOPE http://app:8080/public/js/uswds-init.min.js
# get-gov.js contains suspicious word "from" as in `Array.from()`
10027 OUTOFSCOPE http://app:8080/public/js/get-gov.js
# getgov.min.js contains suspicious word "from" as in `Array.from()`
10027 OUTOFSCOPE http://app:8080/public/js/getgov.min.js
# Ignores suspicious word "TODO"
10027 OUTOFSCOPE http://app:8080.*$
10028 FAIL (Open Redirect - Passive/beta)