Skip to content

Commit 41c8cf6

Browse files
author
Michael Vurchio
committed
Rename getLocalIdentName to getLocalIdent
1 parent 35c641f commit 41c8cf6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { interpolateName } = require('loader-utils');
55
const pluginOptions = {
66
includePaths: [],
77
localIdentName: '[local]-[hash:base64:6]',
8-
getLocalIdentName: getLocalIdentName,
8+
getLocalIdent: getLocalIdent,
99
};
1010

1111
const regex = {
@@ -19,7 +19,7 @@ const regex = {
1919

2020
let moduleClasses = {};
2121

22-
function getLocalIdentName(context, localIdentName, localName, options) {
22+
function getLocalIdent(context, localIdentName, localName, options) {
2323
return localIdentName.interpolatedName;
2424
}
2525

@@ -82,7 +82,7 @@ const markup = async ({ content, filename }) => {
8282
className
8383
);
8484

85-
const customInterpolatedName = pluginOptions.getLocalIdentName(
85+
const customInterpolatedName = pluginOptions.getLocalIdent(
8686
{
8787
context: path.dirname(filename),
8888
resourcePath :filename,

test/getlocalidentname.test.js renamed to test/getlocalident.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ const compiler = require('./compiler.js');
22

33
const source = '<style>.red { color: red; }</style>\n<span class="$style.red">Red</span>';
44

5-
test('Customize generated classname from getLocalIdentName', async () => {
5+
test('Customize generated classname from getLocalIdent', async () => {
66
const output = await compiler({
77
source,
88
}, {
99
localIdentName: '[local]-123456MC',
10-
getLocalIdentName: (context, { interpolatedName }) => {
10+
getLocalIdent: (context, { interpolatedName }) => {
1111
return interpolatedName.toLowerCase();
1212
}
1313
});

0 commit comments

Comments
 (0)