liferay-npm-bundler-loader-css-loader
Advanced tools
Comparing version 2.13.0 to 2.14.0-alpha.17da64bb
@@ -27,3 +27,3 @@ 'use strict'; | ||
var savedProjectDir = _project2.default.dir; | ||
var savedProjectPath = _project2.default.dir.asNative; | ||
@@ -36,3 +36,3 @@ describe('standard projects', function () { | ||
afterEach(function () { | ||
_project2.default.loadFrom(savedProjectDir); | ||
_project2.default.loadFrom(savedProjectPath); | ||
}); | ||
@@ -114,3 +114,3 @@ | ||
afterEach(function () { | ||
_project2.default.loadFrom(savedProjectDir); | ||
_project2.default.loadFrom(savedProjectPath); | ||
}); | ||
@@ -117,0 +117,0 @@ |
@@ -29,2 +29,6 @@ 'use strict'; | ||
var _filePath = require('liferay-npm-build-tools-common/lib/file-path'); | ||
var _filePath2 = _interopRequireDefault(_filePath); | ||
var _project = require('liferay-npm-build-tools-common/lib/project'); | ||
@@ -40,8 +44,2 @@ | ||
/** | ||
* © 2017 Liferay, Inc. <https://liferay.com> | ||
* | ||
* SPDX-License-Identifier: LGPL-3.0-or-later | ||
*/ | ||
function getHref(filePath, extension, pathModule) { | ||
@@ -53,3 +51,3 @@ var webContextPath = void 0; | ||
} else { | ||
var bnd = _fs2.default.readFileSync(_path2.default.join(_project2.default.dir, 'bnd.bnd')).toString(); | ||
var bnd = _fs2.default.readFileSync(_project2.default.dir.join('bnd.bnd').asNative).toString(); | ||
@@ -65,5 +63,5 @@ var lines = bnd.split('\n'); | ||
_project2.default.sources.asPlatform.forEach(function (source) { | ||
if (filePath.startsWith(source)) { | ||
filePath = filePath.substring(source.length + 1); | ||
_project2.default.sources.asNative.forEach(function (sourcePath) { | ||
if (filePath.startsWith(sourcePath)) { | ||
filePath = filePath.substring(sourcePath.length + 1); | ||
} | ||
@@ -82,5 +80,3 @@ }); | ||
if (_path2.default.sep !== '/') { | ||
filePath = filePath.replace(new RegExp(_path2.default.sep, 'g'), '/'); | ||
} | ||
filePath = new _filePath2.default(filePath).asPosix; | ||
@@ -93,2 +89,7 @@ return '' + pathModule + webContextPath + '/' + filePath; | ||
*/ | ||
/** | ||
* © 2017 Liferay, Inc. <https://liferay.com> | ||
* | ||
* SPDX-License-Identifier: LGPL-3.0-or-later | ||
*/ | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "liferay-npm-bundler-loader-css-loader", | ||
"version": "2.13.0", | ||
"version": "2.14.0-alpha.17da64bb", | ||
"description": "A liferay-npm-bundler loader that turns CSS files into JavaScript modules that inject a <link> into the HTML when they are required.", | ||
@@ -15,4 +15,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"liferay-npm-build-tools-common": "2.13.0" | ||
"liferay-npm-build-tools-common": "2.14.0-alpha.17da64bb" | ||
} | ||
} |
@@ -13,3 +13,3 @@ /** | ||
const savedProjectDir = project.dir; | ||
const savedProjectPath = project.dir.asNative; | ||
@@ -22,3 +22,3 @@ describe('standard projects', () => { | ||
afterEach(() => { | ||
project.loadFrom(savedProjectDir); | ||
project.loadFrom(savedProjectPath); | ||
}); | ||
@@ -117,3 +117,3 @@ | ||
afterEach(() => { | ||
project.loadFrom(savedProjectDir); | ||
project.loadFrom(savedProjectPath); | ||
}); | ||
@@ -120,0 +120,0 @@ |
@@ -8,2 +8,3 @@ /** | ||
import fs from 'fs'; | ||
import FilePath from 'liferay-npm-build-tools-common/lib/file-path'; | ||
import project from 'liferay-npm-build-tools-common/lib/project'; | ||
@@ -56,3 +57,3 @@ import path from 'path'; | ||
const bnd = fs | ||
.readFileSync(path.join(project.dir, 'bnd.bnd')) | ||
.readFileSync(project.dir.join('bnd.bnd').asNative) | ||
.toString(); | ||
@@ -69,5 +70,5 @@ | ||
project.sources.asPlatform.forEach(source => { | ||
if (filePath.startsWith(source)) { | ||
filePath = filePath.substring(source.length + 1); | ||
project.sources.asNative.forEach(sourcePath => { | ||
if (filePath.startsWith(sourcePath)) { | ||
filePath = filePath.substring(sourcePath.length + 1); | ||
} | ||
@@ -89,7 +90,5 @@ }); | ||
if (path.sep !== '/') { | ||
filePath = filePath.replace(new RegExp(path.sep, 'g'), '/'); | ||
} | ||
filePath = new FilePath(filePath).asPosix; | ||
return `${pathModule}${webContextPath}/${filePath}`; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
28102
19
344
2
+ Addedbabel-plugin-add-module-metadata@2.14.0-alpha.17da64bb(transitive)
+ Addedbabel-plugin-name-amd-modules@2.14.0-alpha.17da64bb(transitive)
+ Addedbabel-plugin-namespace-amd-define@2.14.0-alpha.17da64bb(transitive)
+ Addedbabel-plugin-namespace-modules@2.14.0-alpha.17da64bb(transitive)
+ Addedbabel-plugin-normalize-requires@2.14.0-alpha.17da64bb(transitive)
+ Addedbabel-plugin-wrap-modules-amd@2.14.0-alpha.17da64bb(transitive)
+ Addedbabel-preset-liferay-standard@2.14.0-alpha.17da64bb(transitive)
+ Addedliferay-npm-build-tools-common@2.14.0-alpha.17da64bb(transitive)
+ Addedliferay-npm-bundler-plugin-exclude-imports@2.14.0-alpha.17da64bb(transitive)
+ Addedliferay-npm-bundler-plugin-inject-imports-dependencies@2.14.0-alpha.17da64bb(transitive)
+ Addedliferay-npm-bundler-plugin-inject-peer-dependencies@2.14.0-alpha.17da64bb(transitive)
+ Addedliferay-npm-bundler-plugin-namespace-packages@2.14.0-alpha.17da64bb(transitive)
+ Addedliferay-npm-bundler-plugin-replace-browser-modules@2.14.0-alpha.17da64bb(transitive)
+ Addedliferay-npm-bundler-plugin-resolve-linked-dependencies@2.14.0-alpha.17da64bb(transitive)
+ Addedliferay-npm-bundler-preset-standard@2.14.0-alpha.17da64bb(transitive)
- Removedbabel-plugin-add-module-metadata@2.13.0(transitive)
- Removedbabel-plugin-name-amd-modules@2.13.0(transitive)
- Removedbabel-plugin-namespace-amd-define@2.13.0(transitive)
- Removedbabel-plugin-namespace-modules@2.13.0(transitive)
- Removedbabel-plugin-normalize-requires@2.13.0(transitive)
- Removedbabel-plugin-wrap-modules-amd@2.13.0(transitive)
- Removedbabel-preset-liferay-standard@2.13.0(transitive)
- Removedliferay-npm-build-tools-common@2.13.0(transitive)
- Removedliferay-npm-bundler-plugin-exclude-imports@2.13.0(transitive)
- Removedliferay-npm-bundler-plugin-inject-imports-dependencies@2.13.0(transitive)
- Removedliferay-npm-bundler-plugin-inject-peer-dependencies@2.13.0(transitive)
- Removedliferay-npm-bundler-plugin-namespace-packages@2.13.0(transitive)
- Removedliferay-npm-bundler-plugin-replace-browser-modules@2.13.0(transitive)
- Removedliferay-npm-bundler-plugin-resolve-linked-dependencies@2.13.0(transitive)
- Removedliferay-npm-bundler-preset-standard@2.13.0(transitive)