Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Commit 3502786

Browse files
committed
Fix urlRootPath
1 parent 01ea60c commit 3502786

File tree

11 files changed

+5136
-5120
lines changed

11 files changed

+5136
-5120
lines changed

aurelia_project/environments/dev.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export default {
22
debug: true,
3-
testing: true
3+
testing: true,
4+
urlRootPath: '${urlRootPath}'
45
};

aurelia_project/environments/prod.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export default {
22
debug: false,
3-
testing: false
3+
testing: false,
4+
urlRootPath: '${urlRootPath}'
45
};

aurelia_project/environments/stage.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export default {
22
debug: true,
3-
testing: false
3+
testing: false,
4+
urlRootPath: '${urlRootPath}'
45
};

aurelia_project/tasks/replace-task.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {build} from 'aurelia-cli';
66

77
export default function replaceTask() {
88
return gulp.src(`index.html.tpl`)
9-
.pipe(replace('${url_root_path}', process.env.url_root_path))
9+
.pipe(replace('${urlRootPath}', process.env.url_root_path || '/'))
1010
.pipe(rename('index.html'))
1111
.pipe(gulp.dest(project.paths.root + '/../'));
1212
}

aurelia_project/tasks/transpile.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import gulp from 'gulp';
2+
import replace from 'gulp-replace';
23
import changedInPlace from 'gulp-changed-in-place';
34
import plumber from 'gulp-plumber';
45
import babel from 'gulp-babel';
@@ -13,6 +14,7 @@ function configureEnvironment() {
1314

1415
return gulp.src(`aurelia_project/environments/${env}.js`)
1516
.pipe(changedInPlace({firstPass: true}))
17+
.pipe(replace('${urlRootPath}', process.env.url_root_path || '/'))
1618
.pipe(rename('environment.js'))
1719
.pipe(gulp.dest(project.paths.root));
1820
}

index.html.tpl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
<html>
33
<head>
44
<title>Irys - Démonstrateur</title>
5-
<link rel="stylesheet" href="${url_root_path}node_modules/bootstrap/dist/css/bootstrap.css">
5+
<link rel="stylesheet" href="${urlRootPath}node_modules/bootstrap/dist/css/bootstrap.css">
66
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
7-
<link rel="stylesheet" href="${url_root_path}stylesheets/loading.css">
7+
<link rel="stylesheet" href="${urlRootPath}stylesheets/loading.css">
88
</head>
99

1010
<body aurelia-app="main">
1111
<p class="loading-page">
1212
<span class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></span>
1313
Chargement de l'application en cours...
1414
</p>
15-
<script src="${url_root_path}scripts/vendor-bundle.js" data-main="aurelia-bootstrapper"></script>
16-
<script src="${url_root_path}node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
17-
<script src="${url_root_path}scripts/app/stopMonitoringRequest.js"></script>
18-
<script src="${url_root_path}scripts/app/stopMonitoringCard.js"></script>
19-
<script src="${url_root_path}scripts/app/stopDiscoveryResponse.js"></script>
15+
<script src="${urlRootPath}scripts/vendor-bundle.js" data-main="aurelia-bootstrapper"></script>
16+
<script src="${urlRootPath}node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
17+
<script src="${urlRootPath}scripts/app/stopMonitoringRequest.js"></script>
18+
<script src="${urlRootPath}scripts/app/stopMonitoringCard.js"></script>
19+
<script src="${urlRootPath}scripts/app/stopDiscoveryResponse.js"></script>
2020
</body>
2121
</html>

scripts/app-bundle.js

Lines changed: 17 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/app-bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)