mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Fix invalid arg type (#3978)
* default to `tailwind.css` file when no input is given * skip undefined files * update forgotten test fixtures
This commit is contained in:
parent
8bce53b9ca
commit
6ed835cb71
@ -1,4 +1,4 @@
|
||||
/*! tailwindcss v2.0.4 | MIT License | https://tailwindcss.com */
|
||||
/*! tailwindcss v2.1.0 | MIT License | https://tailwindcss.com */
|
||||
|
||||
/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*! tailwindcss v2.0.4 | MIT License | https://tailwindcss.com */
|
||||
/*! tailwindcss v2.1.0 | MIT License | https://tailwindcss.com */
|
||||
|
||||
/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*! tailwindcss v2.0.4 | MIT License | https://tailwindcss.com */
|
||||
/*! tailwindcss v2.1.0 | MIT License | https://tailwindcss.com */
|
||||
|
||||
/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*! tailwindcss v2.0.4 | MIT License | https://tailwindcss.com */
|
||||
/*! tailwindcss v2.1.0 | MIT License | https://tailwindcss.com */
|
||||
|
||||
/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
|
||||
|
||||
|
||||
@ -227,6 +227,8 @@ function trackModified(files) {
|
||||
let changed = false
|
||||
|
||||
for (let file of files) {
|
||||
if (!file) continue
|
||||
|
||||
let pathname = url.parse(file).pathname
|
||||
let newModified = fs.statSync(decodeURIComponent(pathname)).mtimeMs
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import path from 'path'
|
||||
import postcss from 'postcss'
|
||||
|
||||
import * as utils from './utils'
|
||||
@ -29,15 +30,15 @@ export default function compile(options = {}) {
|
||||
const css = config.inputFile
|
||||
? utils.readFile(config.inputFile)
|
||||
: `
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
`
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
`
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
postcss(config.plugins)
|
||||
.process(css, {
|
||||
from: config.inputFile,
|
||||
from: config.inputFile || path.resolve(__dirname, '../../tailwind.css'),
|
||||
to: config.outputFile,
|
||||
})
|
||||
.then(resolve)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user