@modern-js/plugin-tailwindcss 1.3.1 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @modern-js/plugin-tailwindcss
2
2
 
3
+ ## 1.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - b82869d: change package.json exports
8
+ - Updated dependencies [b82869d]
9
+ - @modern-js/utils@1.7.10
10
+ - @modern-js/plugin-design-token@1.0.11
11
+
12
+ ## 1.4.0
13
+
14
+ ### Minor Changes
15
+
16
+ - 3050acc: support twin.macro
17
+
18
+ ### Patch Changes
19
+
20
+ - 546266c: support windows
21
+ - Updated dependencies [a90bc96]
22
+ - @modern-js/utils@1.7.9
23
+ - @modern-js/plugin-design-token@1.0.11
24
+
3
25
  ## 1.3.0
4
26
 
5
27
  ### Minor Changes
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getRandomTwConfigFileName = exports.default = void 0;
7
7
 
8
+ var _path = _interopRequireDefault(require("path"));
9
+
8
10
  var _utils = require("@modern-js/utils");
9
11
 
10
12
  var _cli = _interopRequireDefault(require("@modern-js/plugin-design-token/cli"));
@@ -24,7 +26,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
24
26
  const supportCssInJsLibrary = 'styled-components';
25
27
 
26
28
  const getRandomTwConfigFileName = internalDirectory => {
27
- return `${internalDirectory}/tailwind.config.${Date.now()}.${(0, _utils.nanoid)()}.js`;
29
+ return (0, _utils.slash)(_path.default.join(internalDirectory, `tailwind.config.${Date.now()}.${(0, _utils.nanoid)()}.js`));
28
30
  };
29
31
 
30
32
  exports.getRandomTwConfigFileName = getRandomTwConfigFileName;
@@ -48,8 +50,9 @@ var _default = () => ({
48
50
  }
49
51
 
50
52
  internalTwConfigPath = getRandomTwConfigFileName(internalDirectory);
53
+ const globPattern = (0, _utils.slash)(_path.default.join(appDirectory, _utils.CONFIG_CACHE_DIR, '*.cjs'));
51
54
 
52
- const files = _utils.globby.sync(`${appDirectory}/${_utils.CONFIG_CACHE_DIR}/*.cjs`, {
55
+ const files = _utils.globby.sync(globPattern, {
53
56
  absolute: true
54
57
  });
55
58
 
@@ -101,7 +104,8 @@ var _default = () => ({
101
104
  const pluginTarget = plugin[0];
102
105
  let pluginOptions = plugin[1];
103
106
 
104
- if (typeof pluginTarget === 'string' && pluginTarget.includes('compiled/babel-plugin-macros')) {
107
+ if (typeof pluginTarget === 'string' && // TODO: use babel chain
108
+ (0, _utils.slash)(pluginTarget).includes('compiled/babel-plugin-macros')) {
105
109
  if (pluginOptions) {
106
110
  pluginOptions = _objectSpread(_objectSpread({}, pluginOptions), twinConfig);
107
111
  } else {
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.3.1",
14
+ "version": "1.4.1",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -21,10 +21,9 @@
21
21
  ".": {
22
22
  "node": {
23
23
  "jsnext:source": "./src/index.ts",
24
- "import": "./dist/js/modern/index.js",
25
24
  "require": "./dist/js/node/index.js"
26
25
  },
27
- "default": "./dist/js/treeshaking/index.js"
26
+ "default": "./dist/js/node/index.js"
28
27
  },
29
28
  "./cli": {
30
29
  "jsnext:source": "./src/cli.ts",
@@ -33,11 +32,11 @@
33
32
  },
34
33
  "dependencies": {
35
34
  "@babel/runtime": "^7.18.0",
36
- "@modern-js/utils": "^1.7.8",
35
+ "@modern-js/utils": "^1.7.10",
37
36
  "@modern-js/plugin-design-token": "^1.0.11"
38
37
  },
39
38
  "devDependencies": {
40
- "@modern-js/core": "1.12.1",
39
+ "@modern-js/core": "1.12.3",
41
40
  "@scripts/build": "0.0.0",
42
41
  "@types/jest": "^27",
43
42
  "@types/node": "^14",