swico 3.0.0-beta.1 → 3.0.0-beta.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swico",
3
- "version": "3.0.0-beta.1",
3
+ "version": "3.0.0-beta.3",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -25,7 +25,7 @@
25
25
  "react",
26
26
  "vue",
27
27
  "swico",
28
- "rspack"
28
+ "rsbuild"
29
29
  ],
30
30
  "bin": {
31
31
  "swico": "./src/bin.js"
@@ -45,18 +45,20 @@
45
45
  "license": "ISC",
46
46
  "dependencies": {
47
47
  "@rsbuild/plugin-basic-ssl": "^1.2.2",
48
+ "@rsbuild/plugin-eslint": "^1.3.0",
49
+ "@rsbuild/plugin-less": "^1.6.2",
48
50
  "@rsbuild/plugin-react": "^1.4.6",
51
+ "@rsbuild/plugin-sass": "^1.5.1",
52
+ "@rsbuild/plugin-type-check": "^1.3.4",
49
53
  "@rsbuild/plugin-vue": "^1.2.7",
50
54
  "chalk": "4.1.2",
51
55
  "chokidar": "3.6.0",
52
56
  "commander": "12.0.0",
53
57
  "cross-spawn": "7.0.5",
54
- "eslint-rspack-plugin": "4.4.1",
55
58
  "fs-extra": "11.3.0",
56
59
  "ora": "5.4.1",
57
60
  "qs": "6.13.0",
58
61
  "react-router": "7.5.0",
59
- "ts-checker-rspack-plugin": "1.1.1",
60
62
  "ts-node": "10.9.1",
61
63
  "vue-router": "4.5.0"
62
64
  },
@@ -16,6 +16,8 @@ exports.default = default_1;
16
16
  const path_1 = __importDefault(require("path"));
17
17
  const main_config_1 = require("../main-config");
18
18
  const plugin_react_1 = require("@rsbuild/plugin-react");
19
+ const plugin_less_1 = require("@rsbuild/plugin-less");
20
+ const plugin_sass_1 = require("@rsbuild/plugin-sass");
19
21
  function default_1(_a) {
20
22
  return __awaiter(this, arguments, void 0, function* ({ projectPath, entryPath, env, customConfig }) {
21
23
  var _b, _c, _d, _e, _f;
@@ -93,7 +95,12 @@ function default_1(_a) {
93
95
  template: path_1.default.join(projectPath, '/src/index.ejs'),
94
96
  templateParameters: initialDefineVarsConfig
95
97
  },
96
- plugins: [(0, plugin_react_1.pluginReact)(), ...((_f = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.plugins) !== null && _f !== void 0 ? _f : main_config_1.initConfig.plugins)]
98
+ plugins: [
99
+ (0, plugin_react_1.pluginReact)(),
100
+ (0, plugin_sass_1.pluginSass)(),
101
+ (0, plugin_less_1.pluginLess)(),
102
+ ...((_f = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.plugins) !== null && _f !== void 0 ? _f : main_config_1.initConfig.plugins)
103
+ ]
97
104
  };
98
105
  });
99
106
  }
@@ -16,6 +16,8 @@ exports.default = default_1;
16
16
  const path_1 = __importDefault(require("path"));
17
17
  const main_config_1 = require("../main-config");
18
18
  const plugin_vue_1 = require("@rsbuild/plugin-vue");
19
+ const plugin_sass_1 = require("@rsbuild/plugin-sass");
20
+ const plugin_less_1 = require("@rsbuild/plugin-less");
19
21
  function default_1(_a) {
20
22
  return __awaiter(this, arguments, void 0, function* ({ projectPath, entryPath, env, customConfig }) {
21
23
  var _b, _c, _d, _e, _f;
@@ -93,7 +95,12 @@ function default_1(_a) {
93
95
  template: path_1.default.join(projectPath, '/src/index.ejs'),
94
96
  templateParameters: initialDefineVarsConfig
95
97
  },
96
- plugins: [(0, plugin_vue_1.pluginVue)(), ...((_f = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.plugins) !== null && _f !== void 0 ? _f : main_config_1.initConfig.plugins)]
98
+ plugins: [
99
+ (0, plugin_vue_1.pluginVue)(),
100
+ (0, plugin_sass_1.pluginSass)(),
101
+ (0, plugin_less_1.pluginLess)(),
102
+ ...((_f = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.plugins) !== null && _f !== void 0 ? _f : main_config_1.initConfig.plugins)
103
+ ]
97
104
  };
98
105
  });
99
106
  }
@@ -48,8 +48,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
48
48
  exports.default = default_1;
49
49
  const main_config_1 = require("../main-config");
50
50
  const path_1 = __importDefault(require("path"));
51
- const eslint_rspack_plugin_1 = __importDefault(require("eslint-rspack-plugin"));
52
- const ts_checker_rspack_plugin_1 = require("ts-checker-rspack-plugin");
51
+ const plugin_eslint_1 = require("@rsbuild/plugin-eslint");
52
+ const plugin_type_check_1 = require("@rsbuild/plugin-type-check");
53
53
  const utils_1 = require("../utils");
54
54
  const core_1 = require("@rsbuild/core");
55
55
  const plugin_basic_ssl_1 = require("@rsbuild/plugin-basic-ssl");
@@ -94,29 +94,28 @@ function default_1(options) {
94
94
  },
95
95
  plugins: [
96
96
  ...(customConfig.dev.https === true ? [(0, plugin_basic_ssl_1.pluginBasicSsl)()] : []),
97
- new ts_checker_rspack_plugin_1.TsCheckerRspackPlugin({
98
- logger: {
99
- log: () => { },
100
- error: (message) => {
101
- utils_1.toast.error(message, { title: 'TypeScript errors' });
102
- }
103
- },
104
- typescript: {
105
- memoryLimit: 15000,
106
- diagnosticOptions: {
107
- semantic: true,
108
- syntactic: true
97
+ (0, plugin_type_check_1.pluginTypeCheck)({
98
+ tsCheckerOptions: {
99
+ logger: {
100
+ log: () => { },
101
+ error: (message) => {
102
+ utils_1.toast.error(message, { title: 'TypeScript errors' });
103
+ }
109
104
  }
110
105
  }
111
106
  }),
112
- new eslint_rspack_plugin_1.default({
113
- configType: 'flat',
114
- context: path_1.default.join(projectPath, '/src'),
115
- failOnError: false,
116
- failOnWarning: true,
117
- extensions: templateType === 'vue' ? ['vue', 'ts', 'js'] : ['tsx', 'ts', 'js'],
118
- emitWarning: false,
119
- cache: true
107
+ (0, plugin_eslint_1.pluginEslint)({
108
+ eslintPluginOptions: {
109
+ configType: 'flat',
110
+ context: path_1.default.join(projectPath, '/src'),
111
+ failOnError: false,
112
+ failOnWarning: true,
113
+ extensions: templateType === 'vue'
114
+ ? ['vue', 'ts', 'js', 'tsx', 'jsx', 'mjs', 'mts']
115
+ : ['tsx', 'ts', 'js', 'mjs', 'mts', 'jsx'],
116
+ emitWarning: false,
117
+ cache: true
118
+ }
120
119
  }),
121
120
  ...((_j = (_h = customConfig.dev) === null || _h === void 0 ? void 0 : _h.plugins) !== null && _j !== void 0 ? _j : [])
122
121
  ]