mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-11 16:51:54 +00:00
Merge pull request #5039 from overleaf/jpa-web-metrics-module-pages
[web] modernize metrics module GitOrigin-RevId: 24e9abd4b8aacacc4ed183c230a283d3d7afa281
This commit is contained in:
parent
42f9920a9e
commit
7923ceda6d
1 changed files with 13 additions and 0 deletions
|
@ -33,6 +33,19 @@ if (fs.existsSync(MODULES_PATH)) {
|
||||||
}, entryPoints)
|
}, entryPoints)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add entrypoints for each "page"
|
||||||
|
glob
|
||||||
|
.sync(path.join(__dirname, 'modules/*/frontend/js/pages/**/*.js'))
|
||||||
|
.forEach(page => {
|
||||||
|
// in: /workspace/services/web/modules/foo/frontend/js/pages/bar.js
|
||||||
|
// out: modules/foo/pages/bar
|
||||||
|
const name = path
|
||||||
|
.relative(__dirname, page)
|
||||||
|
.replace(/frontend[/]js[/]/, '')
|
||||||
|
.replace(/.js$/, '')
|
||||||
|
entryPoints[name] = './' + path.relative(__dirname, page)
|
||||||
|
})
|
||||||
|
|
||||||
glob.sync(path.join(__dirname, 'frontend/js/pages/**/*.js')).forEach(page => {
|
glob.sync(path.join(__dirname, 'frontend/js/pages/**/*.js')).forEach(page => {
|
||||||
// in: /workspace/services/web/frontend/js/pages/marketing/homepage.js
|
// in: /workspace/services/web/frontend/js/pages/marketing/homepage.js
|
||||||
// out: pages/marketing/homepage
|
// out: pages/marketing/homepage
|
||||||
|
|
Loading…
Reference in a new issue