Skip to content

Commit e2118b2

Browse files
committed
rename inputFilePath to inputBasePath
Because it's the base path computed from the actual `inputPath`. E.g.: `./src/styles/input.css` will result in `./src/styles`
1 parent 5648e1a commit e2118b2

File tree

1 file changed

+4
-4
lines changed
  • packages/@tailwindcss-cli/src/commands/build

1 file changed

+4
-4
lines changed

packages/@tailwindcss-cli/src/commands/build/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,13 @@ export async function handle(args: Result<ReturnType<typeof options>>) {
126126
}
127127

128128
let inputFile = args['--input'] && args['--input'] !== '-' ? args['--input'] : process.cwd()
129-
let inputFilePath = path.dirname(path.resolve(inputFile))
129+
let inputBasePath = path.dirname(path.resolve(inputFile))
130130

131131
function compile(css: string) {
132132
return tailwindcss.compile(css, {
133133
loadPlugin: (pluginPath) => {
134134
if (pluginPath[0] === '.') {
135-
return require(path.resolve(inputFilePath, pluginPath))
135+
return require(path.resolve(inputBasePath, pluginPath))
136136
}
137137

138138
return require(pluginPath)
@@ -145,7 +145,7 @@ export async function handle(args: Result<ReturnType<typeof options>>) {
145145
let scanDirResult = scanDir({
146146
base, // Root directory, mainly used for auto content detection
147147
contentPaths: compiler.globs.map((glob) => ({
148-
base: inputFilePath, // Globs are relative to the input.css file
148+
base: inputBasePath, // Globs are relative to the input.css file
149149
glob,
150150
})),
151151
})
@@ -210,7 +210,7 @@ export async function handle(args: Result<ReturnType<typeof options>>) {
210210
scanDirResult = scanDir({
211211
base, // Root directory, mainly used for auto content detection
212212
contentPaths: compiler.globs.map((glob) => ({
213-
base: inputFilePath, // Globs are relative to the input.css file
213+
base: inputBasePath, // Globs are relative to the input.css file
214214
glob,
215215
})),
216216
})

0 commit comments

Comments
 (0)