Skip to content

Commit

Permalink
Update to support latest changes for 7.6 projects
Browse files Browse the repository at this point in the history
  • Loading branch information
chiatt committed Jul 31, 2024
1 parent 5e5ca1e commit 37f0fe0
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 3 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ omit =
*/settings*.py
*/urls.py
*/wsgi.py
*/hosts.py
*/celery.py
*/__init__.py

Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ repos:
name: prettier
entry: npm run prettier:fix
language: system
files: disco/src
files: {{ project_name }}/src
- id: eslint
name: eslint
entry: npm run eslint:fix
language: system
files: disco/src
files: {{ project_name }}/src
- id: typescript
name: typescript
entry: npm run ts:check
Expand Down
7 changes: 7 additions & 0 deletions disco/hosts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import re
from django_hosts import patterns, host

host_patterns = patterns(
"",
host(re.sub(r"_", r"-", r"disco"), "disco.urls", name="disco"),
)
1 change: 1 addition & 0 deletions disco/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
}

INSTALLED_APPS = (
"disco",
"webpack_loader",
"django.contrib.admin",
"django.contrib.auth",
Expand Down
4 changes: 4 additions & 0 deletions webpack/webpack-utils/build-filepath-lookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ function buildFilepathLookup(path, staticUrlPrefix) {
};

return getFileList(path).reduce((lookup, file) => {
// Ignore dotfiles
if (file.match(new RegExp(Path.sep + '\\.')) || file.match(/^\./)) {
return lookup;
}
const extension = file.match(/[^.]+$/).toString();
const extensionReplacementRegex = new RegExp(`\\.${extension}$`);

Expand Down
6 changes: 5 additions & 1 deletion webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,11 @@ module.exports = () => {
...nodeModulesAliases,
...parsedPackageJSONFilepaths,
'@': [Path.resolve(__dirname, APP_ROOT, 'src'), ...archesApplicationsVuePaths, Path.resolve(__dirname, ROOT_DIR, 'app', 'src')],
'node_modules': Path.resolve(__dirname, PROJECT_RELATIVE_NODE_MODULES_PATH)
'node_modules': Path.resolve(__dirname, PROJECT_RELATIVE_NODE_MODULES_PATH),
'arches/arches/app': Path.resolve(__dirname, ROOT_DIR, 'app'), // ensure project-level imports of arches components point to local file
...Object.fromEntries(ARCHES_APPLICATIONS.map(app => [ // ensure project-level imports of arches application components point to local file
Path.join(app, app), Path.resolve(__dirname, ARCHES_APPLICATIONS_PATHS[app])
])),
},
},
module: {
Expand Down

0 comments on commit 37f0fe0

Please sign in to comment.