@modern-js/plugin-tailwindcss 2.0.0-beta.1 → 2.0.0-beta.2

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,76 @@
1
1
  # @modern-js/plugin-tailwindcss
2
2
 
3
+ ## 2.0.0-beta.2
4
+
5
+ ### Major Changes
6
+
7
+ - dda38c9c3e: chore: v2
8
+
9
+ ### Minor Changes
10
+
11
+ - 92f0ead: feat:
12
+
13
+ 1. add style config and add new hook
14
+ 2. add dts alias logic
15
+ 3. add copy logic
16
+ 4. add log logic
17
+ 5. add skipDeps config
18
+
19
+ feat:
20
+
21
+ 1. 添加样式配置以及新的 hook
22
+ 2. 添加 dts 别名处理
23
+ 3. 添加 copy 逻辑
24
+ 4. 添加日志逻辑
25
+ 5. 添加 skipDeps 配置
26
+
27
+ - 92f0ead: feat:
28
+
29
+ 1. core: 增加 test 函数
30
+ 2. module plugins: 增加 `babel`, `mainField`, `target` 插件
31
+ 3. storybook: 修改部分逻辑并且增加 tspath webpack 插件
32
+ 4. 增加 designSystem 配置
33
+
34
+ feat:
35
+
36
+ 1. core: add test method
37
+ 2. module plugins: add `babel`, `mainField`, `target` plugin
38
+ 3. storybook: change some logic and add tspath webpack plugin
39
+ 4. add `designSystem` config
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies [2344eb2]
44
+ - Updated dependencies [a11fcf8]
45
+ - Updated dependencies [b18fa8f3ed]
46
+ - Updated dependencies [c9e800d39a]
47
+ - Updated dependencies [3e57f2b]
48
+ - Updated dependencies [fbf5eed]
49
+ - Updated dependencies [a2509bfbdb]
50
+ - Updated dependencies [e4357f1]
51
+ - Updated dependencies [4369648ae2]
52
+ - Updated dependencies [92f0ead]
53
+ - Updated dependencies [92c0994]
54
+ - Updated dependencies [edd1cfb1af]
55
+ - Updated dependencies [cc971eabfc]
56
+ - Updated dependencies [5b9049f2e9]
57
+ - Updated dependencies [6bda14ed71]
58
+ - Updated dependencies [92004d1]
59
+ - Updated dependencies [b8bbe036c7]
60
+ - Updated dependencies [40ed587]
61
+ - Updated dependencies [60d5378632]
62
+ - Updated dependencies [d5a31df781]
63
+ - Updated dependencies [dda38c9c3e]
64
+ - Updated dependencies [8b8e1bb571]
65
+ - Updated dependencies [3bbea92b2a]
66
+ - Updated dependencies [18aaf42]
67
+ - Updated dependencies [fcace5b5b9]
68
+ - Updated dependencies [abf3421a75]
69
+ - Updated dependencies [543be9558e]
70
+ - Updated dependencies [14b712da84]
71
+ - @modern-js/runtime@2.0.0-beta.2
72
+ - @modern-js/utils@2.0.0-beta.2
73
+
3
74
  ## 2.0.0-beta.1
4
75
 
5
76
  ### Major Changes
@@ -12,7 +12,7 @@ const getPureDesignSystemConfig = designSystemConfig => {
12
12
  return pureDesignSystemConfig;
13
13
  };
14
14
  const getTailwindConfig = (config, option = {}) => {
15
- var _ref, _designSystem;
15
+ var _config$tools, _ref, _designSystem;
16
16
  const purgeConfig = merge({
17
17
  // TODO: how the operating environment is determined
18
18
  enabled: process.env.NODE_ENV === 'production',
@@ -23,7 +23,7 @@ const getTailwindConfig = (config, option = {}) => {
23
23
  const defaultTailwindConfig = {
24
24
  purge: purgeConfig
25
25
  };
26
- const tailwindConfig = applyOptionsChain(defaultTailwindConfig, config.tools.tailwindcss || {});
26
+ const tailwindConfig = applyOptionsChain(defaultTailwindConfig, ((_config$tools = config.tools) === null || _config$tools === void 0 ? void 0 : _config$tools.tailwindcss) || {});
27
27
  const designSystem = getPureDesignSystemConfig((_ref = (_designSystem = config.designSystem) !== null && _designSystem !== void 0 ? _designSystem : config.source.designSystem) !== null && _ref !== void 0 ? _ref : {});
28
28
  const [exist, key] = checkIfExistNotAllowKeys(tailwindConfig);
29
29
  if (exist) {
@@ -18,7 +18,7 @@ const getPureDesignSystemConfig = designSystemConfig => {
18
18
  return pureDesignSystemConfig;
19
19
  };
20
20
  const getTailwindConfig = (config, option = {}) => {
21
- var _ref, _designSystem;
21
+ var _config$tools, _ref, _designSystem;
22
22
  const purgeConfig = (0, _lodash.merge)({
23
23
  // TODO: how the operating environment is determined
24
24
  enabled: process.env.NODE_ENV === 'production',
@@ -29,7 +29,7 @@ const getTailwindConfig = (config, option = {}) => {
29
29
  const defaultTailwindConfig = {
30
30
  purge: purgeConfig
31
31
  };
32
- const tailwindConfig = (0, _utils.applyOptionsChain)(defaultTailwindConfig, config.tools.tailwindcss || {});
32
+ const tailwindConfig = (0, _utils.applyOptionsChain)(defaultTailwindConfig, ((_config$tools = config.tools) === null || _config$tools === void 0 ? void 0 : _config$tools.tailwindcss) || {});
33
33
  const designSystem = getPureDesignSystemConfig((_ref = (_designSystem = config.designSystem) !== null && _designSystem !== void 0 ? _designSystem : config.source.designSystem) !== null && _ref !== void 0 ? _ref : {});
34
34
  const [exist, key] = checkIfExistNotAllowKeys(tailwindConfig);
35
35
  if (exist) {
@@ -15,7 +15,7 @@ var getPureDesignSystemConfig = function getPureDesignSystemConfig(designSystemC
15
15
  return pureDesignSystemConfig;
16
16
  };
17
17
  var getTailwindConfig = function getTailwindConfig(config) {
18
- var _ref, _designSystem;
18
+ var _config$tools, _ref, _designSystem;
19
19
  var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
20
20
  var purgeConfig = merge({
21
21
  // TODO: how the operating environment is determined
@@ -27,7 +27,7 @@ var getTailwindConfig = function getTailwindConfig(config) {
27
27
  var defaultTailwindConfig = {
28
28
  purge: purgeConfig
29
29
  };
30
- var tailwindConfig = applyOptionsChain(defaultTailwindConfig, config.tools.tailwindcss || {});
30
+ var tailwindConfig = applyOptionsChain(defaultTailwindConfig, ((_config$tools = config.tools) === null || _config$tools === void 0 ? void 0 : _config$tools.tailwindcss) || {});
31
31
  var designSystem = getPureDesignSystemConfig((_ref = (_designSystem = config.designSystem) !== null && _designSystem !== void 0 ? _designSystem : config.source.designSystem) !== null && _ref !== void 0 ? _ref : {});
32
32
  var _checkIfExistNotAllow = checkIfExistNotAllowKeys(tailwindConfig),
33
33
  _checkIfExistNotAllow2 = _slicedToArray(_checkIfExistNotAllow, 2),
@@ -1,8 +1,8 @@
1
- import type { CliPlugin } from '@modern-js/core';
1
+ import type { LegacyAppTools, CliPlugin } from '@modern-js/app-tools';
2
2
  export declare const getRandomTwConfigFileName: (internalDirectory: string) => string;
3
3
  declare const _default: ({
4
4
  pluginName
5
5
  }?: {
6
6
  pluginName: string;
7
- }) => CliPlugin;
7
+ }) => CliPlugin<LegacyAppTools>;
8
8
  export default _default;
@@ -1,7 +1,7 @@
1
- import type { CliPlugin } from '@modern-js/core';
1
+ import type { CliPlugin, LegacyAppTools } from '@modern-js/app-tools';
2
2
  declare const _default: ({
3
3
  pluginName
4
4
  }?: {
5
5
  pluginName: string;
6
- }) => CliPlugin;
6
+ }) => CliPlugin<LegacyAppTools>;
7
7
  export default _default;
@@ -1,5 +1,5 @@
1
- import type { NormalizedConfig } from '@modern-js/core';
2
- declare const getTailwindConfig: (config: NormalizedConfig, option?: {
1
+ import type { AppLegacyNormalizedConfig } from '@modern-js/app-tools';
2
+ declare const getTailwindConfig: (config: AppLegacyNormalizedConfig, option?: {
3
3
  pureConfig?: Record<string, any>;
4
4
  }) => any;
5
5
  export { getTailwindConfig };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.0.0-beta.1",
14
+ "version": "2.0.0-beta.2",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@babel/runtime": "^7.18.0",
47
47
  "hoist-non-react-statics": "^3.3.2",
48
- "@modern-js/utils": "2.0.0-beta.1"
48
+ "@modern-js/utils": "2.0.0-beta.2"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/jest": "^27",
@@ -56,15 +56,16 @@
56
56
  "jest": "^27",
57
57
  "react": "^18",
58
58
  "postcss": "^8.4.14",
59
- "@modern-js/core": "2.0.0-beta.1",
60
- "@modern-js/runtime": "2.0.0-beta.1",
61
- "@modern-js/types": "2.0.0-beta.1",
62
- "@scripts/build": "2.0.0-beta.1",
63
- "@scripts/jest-config": "2.0.0-beta.1"
59
+ "@modern-js/core": "2.0.0-beta.2",
60
+ "@modern-js/runtime": "2.0.0-beta.2",
61
+ "@modern-js/types": "2.0.0-beta.2",
62
+ "@scripts/build": "2.0.0-beta.2",
63
+ "@modern-js/app-tools": "2.0.0-beta.2",
64
+ "@scripts/jest-config": "2.0.0-beta.2"
64
65
  },
65
66
  "peerDependencies": {
66
67
  "tailwindcss": "^2.0.4",
67
- "@modern-js/runtime": "^2.0.0-beta.1"
68
+ "@modern-js/runtime": "^2.0.0-beta.2"
68
69
  },
69
70
  "peerDependenciesMeta": {
70
71
  "@modern-js/runtime": {
@@ -77,9 +78,9 @@
77
78
  "access": "public"
78
79
  },
79
80
  "scripts": {
80
- "new": "modern new",
81
- "dev": "modern build --watch",
82
- "build": "modern build",
81
+ "new": "modern-lib new",
82
+ "dev": "modern-lib build --watch",
83
+ "build": "modern-lib build",
83
84
  "test": "jest --passWithNoTests"
84
85
  }
85
86
  }