@modern-js/plugin-tailwindcss 1.3.1 → 1.4.0-alpha.0

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,19 @@
1
1
  # @modern-js/plugin-tailwindcss
2
2
 
3
+ ## 1.4.0-alpha.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3050accbe: support twin.macro
8
+
9
+ ### Patch Changes
10
+
11
+ - 546266cec: support windows
12
+ - Updated dependencies [9cd364e06]
13
+ - Updated dependencies [a90bc96bd]
14
+ - @modern-js/utils@1.7.9-alpha.0
15
+ - @modern-js/plugin-design-token@1.0.12-alpha.0
16
+
3
17
  ## 1.3.0
4
18
 
5
19
  ### 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 {
File without changes
File without changes
File without changes
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.0-alpha.0",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -33,11 +33,11 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@babel/runtime": "^7.18.0",
36
- "@modern-js/utils": "^1.7.8",
37
- "@modern-js/plugin-design-token": "^1.0.11"
36
+ "@modern-js/utils": "^1.7.9-alpha.0",
37
+ "@modern-js/plugin-design-token": "^1.0.12-alpha.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@modern-js/core": "1.12.1",
40
+ "@modern-js/core": "1.12.2-alpha.0",
41
41
  "@scripts/build": "0.0.0",
42
42
  "@types/jest": "^27",
43
43
  "@types/node": "^14",