swico 0.8.0-beta4 → 0.8.1-beta1
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/README.md +21 -0
- package/package.json +1 -1
- package/src/config/webpack.dev.js +1 -0
- package/src/index.d.ts +2 -2
- package/src/index.js +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# SWICO介绍
|
|
2
|
+
|
|
3
|
+
Swico,发音类似于“斯威扣”。
|
|
4
|
+
|
|
5
|
+
为个人独立开发的一款实用的前端框架,它基于前端工程化最新技术栈实现了前端开发从创建项目,获取模板,本地开发,Git提交校验到打包构建的完整过程。
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## 主要特性
|
|
9
|
+
|
|
10
|
+
- 构建工具基于[Webpack5],并配合[esbuild-loader]和[swc-loader]提升编译构建速率。
|
|
11
|
+
|
|
12
|
+
- 提供[Vue3]和[React18]两种开发模板选择,默认集成[TypeScript5]。同时最大化统一这两种模板的开发API。
|
|
13
|
+
|
|
14
|
+
- 提供可配置化路由方案,基于[React-Router6]和[Vue-Router4]进行二次封装,支持路由嵌套,懒加载,动态参数,装饰校验等功能。
|
|
15
|
+
|
|
16
|
+
- 内置[ESLint] + [Prettier] + [Husky]三大前端编码风格以及代码提交规范约束插件,保证代码风格统一以及 Git 提交规范。
|
|
17
|
+
|
|
18
|
+
- 提供配置文件可对部分项目配置进行修改扩展,例如Alias映射,本地请求代理等。
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
详见:[SWICO 官方文档](http://fanlaboy.gitee.io/swico-docs)
|
package/package.json
CHANGED
|
@@ -108,6 +108,7 @@ function default_1(options) {
|
|
|
108
108
|
? customDevtool !== null && customDevtool !== void 0 ? customDevtool : 'cheap-module-source-map'
|
|
109
109
|
: customDevtool !== null && customDevtool !== void 0 ? customDevtool : 'eval-cheap-module-source-map',
|
|
110
110
|
devServer: {
|
|
111
|
+
logLevel: 'silent',
|
|
111
112
|
historyApiFallback: {
|
|
112
113
|
index: "".concat(baseConfig.output.publicPath, "index.html")
|
|
113
114
|
},
|
package/src/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { GlobalData, GlobalSwicoConfigType } from './utils/config';
|
|
|
2
2
|
export type CustomConfigType = GlobalData['customConfig'];
|
|
3
3
|
export type { GlobalSwicoConfigType };
|
|
4
4
|
export { history } from './mock-history';
|
|
5
|
-
declare let Outlet: any, Link: any, useLocation: any;
|
|
6
|
-
export { Outlet, Link, useLocation };
|
|
5
|
+
declare let Outlet: any, Link: any, useLocation: any, useNav: any;
|
|
6
|
+
export { Outlet, Link, useLocation, useNav };
|
|
7
7
|
export interface DefineSwicoConfigType {
|
|
8
8
|
(env: 'base', config: CustomConfigType['base']): CustomConfigType['base'];
|
|
9
9
|
(env: 'dev', config: CustomConfigType['dev']): CustomConfigType['dev'];
|
package/src/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defineGlobal = exports.defineConfig = exports.useLocation = exports.Link = exports.Outlet = exports.history = void 0;
|
|
3
|
+
exports.defineGlobal = exports.defineConfig = exports.useNav = exports.useLocation = exports.Link = exports.Outlet = exports.history = void 0;
|
|
4
4
|
var mock_history_1 = require("./mock-history");
|
|
5
5
|
Object.defineProperty(exports, "history", { enumerable: true, get: function () { return mock_history_1.history; } });
|
|
6
|
-
var Outlet, Link, useLocation;
|
|
6
|
+
var Outlet, Link, useLocation, useNav;
|
|
7
7
|
var defineConfig = function (env, config) { return config; };
|
|
8
8
|
exports.defineConfig = defineConfig;
|
|
9
9
|
var defineGlobal = function (config) {
|