source: frontend/node_modules/tailwindcss/lib/util/parseDependency.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[9af201e]1// @ts-check
2/**
3 * @typedef {{type: 'dependency', file: string} | {type: 'dir-dependency', dir: string, glob: string}} Dependency
4 */ /**
5 *
6 * @param {import('../lib/content.js').ContentPath} contentPath
7 * @returns {Dependency[]}
8 */ "use strict";
9Object.defineProperty(exports, "__esModule", {
10 value: true
11});
12Object.defineProperty(exports, "default", {
13 enumerable: true,
14 get: function() {
15 return parseDependency;
16 }
17});
18function parseDependency(contentPath) {
19 if (contentPath.ignore) {
20 return [];
21 }
22 if (!contentPath.glob) {
23 return [
24 {
25 type: "dependency",
26 file: contentPath.base
27 }
28 ];
29 }
30 if (process.env.ROLLUP_WATCH === "true") {
31 // rollup-plugin-postcss does not support dir-dependency messages
32 // but directories can be watched in the same way as files
33 return [
34 {
35 type: "dependency",
36 file: contentPath.base
37 }
38 ];
39 }
40 return [
41 {
42 type: "dir-dependency",
43 dir: contentPath.base,
44 glob: contentPath.glob
45 }
46 ];
47}
Note: See TracBrowser for help on using the repository browser.