mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
changed replace regexes to be windows compatible
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
const replace = require('replace-in-file');
|
const replace = require('replace-in-file');
|
||||||
|
const path = require('path');
|
||||||
const {
|
const {
|
||||||
projectRoot,
|
projectRoot,
|
||||||
} = require('../webpack/helpers');
|
} = require('../webpack/helpers');
|
||||||
@@ -10,9 +11,9 @@ const {
|
|||||||
|
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
files: projectRoot('build') + '/**/*.scss',
|
files: path.join(projectRoot('build'), '**', '*.scss'),
|
||||||
from: /@import '~\//g,
|
from: /@import '~\/([^']+)/g,
|
||||||
to: `@import '${projectRoot('./')}/`,
|
to: `@import '${path.join(projectRoot('./'), '$1')}`,
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@@ -9,7 +9,6 @@ const projectRoot = (relativePath) => {
|
|||||||
const srcPath = projectRoot('src');
|
const srcPath = projectRoot('src');
|
||||||
|
|
||||||
const buildRoot = (relativePath, env) => {
|
const buildRoot = (relativePath, env) => {
|
||||||
console.log(env.aot);
|
|
||||||
if (env.aot) {
|
if (env.aot) {
|
||||||
return path.resolve(projectRoot('./build'), relativePath);
|
return path.resolve(projectRoot('./build'), relativePath);
|
||||||
} else {
|
} else {
|
||||||
@@ -68,8 +67,8 @@ const themeReplaceOptions =
|
|||||||
{
|
{
|
||||||
multiple: [
|
multiple: [
|
||||||
{
|
{
|
||||||
search: '@import \'~/',
|
search: '@import \'~/([^\']+)',
|
||||||
replace: '@import \'' + projectRoot('./') + '/',
|
replace: '@import \'' + path.join(projectRoot('./'), '$1'),
|
||||||
flags: 'g'
|
flags: 'g'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user