Tailwind css added
This commit is contained in:
29
node_modules/postcss-less/lib/nodes/import.js
generated
vendored
Normal file
29
node_modules/postcss-less/lib/nodes/import.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/* eslint no-param-reassign: off */
|
||||
|
||||
const tokenize = require('postcss/lib/tokenize');
|
||||
|
||||
const urlPattern = /^url\((.+)\)/;
|
||||
|
||||
module.exports = (node) => {
|
||||
const { name, params = '' } = node;
|
||||
|
||||
if (name === 'import' && params.length) {
|
||||
node.import = true;
|
||||
|
||||
const tokenizer = tokenize({ css: params });
|
||||
|
||||
node.filename = params.replace(urlPattern, '$1');
|
||||
|
||||
while (!tokenizer.endOfFile()) {
|
||||
const [type, content] = tokenizer.nextToken();
|
||||
|
||||
if (type === 'word' && content === 'url') {
|
||||
return;
|
||||
} else if (type === 'brackets') {
|
||||
node.options = content;
|
||||
node.filename = params.replace(content, '').trim();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user