Skip to content

Commit

Permalink
will squash before merge:
Browse files Browse the repository at this point in the history
  • Loading branch information
bryceosterhaus committed Mar 21, 2024
1 parent 7fcc0ce commit 08c97de
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ module.exports = function (_content, _map, _meta) {

const webContextPath = getBndWebContextPath(projectDir);

let urlPath = path.relative(buildConfig.input, resourcePath);
let urlPath = path.posix.relative(
buildConfig.input,
resourcePath.split(path.sep).join(path.posix.sep)
);

urlPath = urlPath.replace(/scss$/, 'css');

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
* SPDX-License-Identifier: BSD-3-Clause
*/

const os = require('os');

describe.only('windows test', () => {

Check failure on line 8 in projects/npm-tools/packages/npm-scripts/test/utils/webpackScssLoader.js

View workflow job for this annotation

GitHub Actions / check (16.x)

describe.only not permitted
it('returns relative path', () => {
const basePath = 'src/main/resources/META-INF/resources';

const resourcePath = path.join(

Check failure on line 12 in projects/npm-tools/packages/npm-scripts/test/utils/webpackScssLoader.js

View workflow job for this annotation

GitHub Actions / check (16.x)

'path' is not defined
os.tmpdir(),
'src',
'main',
'resources',
'META-INF',
'resources',
'js',
'pages',
'RuleList.scss'
);

console.log('RESOURCE: ', resourcePath);

Check failure on line 24 in projects/npm-tools/packages/npm-scripts/test/utils/webpackScssLoader.js

View workflow job for this annotation

GitHub Actions / check (16.x)

Unexpected console statement

let oldPath = path.relative(basePath, resourcePath);

Check failure on line 26 in projects/npm-tools/packages/npm-scripts/test/utils/webpackScssLoader.js

View workflow job for this annotation

GitHub Actions / check (16.x)

'oldPath' is never reassigned. Use 'const' instead

Check failure on line 26 in projects/npm-tools/packages/npm-scripts/test/utils/webpackScssLoader.js

View workflow job for this annotation

GitHub Actions / check (16.x)

'path' is not defined

console.log('OLD: ', oldPath);

Check failure on line 28 in projects/npm-tools/packages/npm-scripts/test/utils/webpackScssLoader.js

View workflow job for this annotation

GitHub Actions / check (16.x)

Unexpected console statement

let newPath = path.posix.relative(

Check failure on line 30 in projects/npm-tools/packages/npm-scripts/test/utils/webpackScssLoader.js

View workflow job for this annotation

GitHub Actions / check (16.x)

'newPath' is never reassigned. Use 'const' instead

Check failure on line 30 in projects/npm-tools/packages/npm-scripts/test/utils/webpackScssLoader.js

View workflow job for this annotation

GitHub Actions / check (16.x)

'path' is not defined
basePath,
resourcePath.split(path.sep).join(path.posix.sep)

Check failure on line 32 in projects/npm-tools/packages/npm-scripts/test/utils/webpackScssLoader.js

View workflow job for this annotation

GitHub Actions / check (16.x)

'path' is not defined

Check failure on line 32 in projects/npm-tools/packages/npm-scripts/test/utils/webpackScssLoader.js

View workflow job for this annotation

GitHub Actions / check (16.x)

'path' is not defined
);

console.log('NEW: ', newPath);

expect(oldPath).toBe(newPath);
});
});

0 comments on commit 08c97de

Please sign in to comment.