Browse Source

upd: cli 0.1.4 test

richard1015 5 years ago
parent
commit
4966928e0f

+ 1 - 1
babel.config.js

@@ -3,7 +3,7 @@ const presets = [
 		'@babel/preset-env',
 		{
 			loose: false,
-			modules: 'commonjs',
+			modules: false,
 			targets: {
 				browsers: ['Android >= 4', 'iOS >= 8']
 			}

+ 2 - 2
lib/plugin/cli/README.md

@@ -1,6 +1,6 @@
-# NutUI ClI
+# NutUI CLI
 
-NutUI ClI 致力于将 Vue 生态中的工具基础标准化。它确保了各种构建工具能够基于智能的默认配置即可平稳衔接,这样你可以专注在撰写组件上,而不必花好几天去纠结配置的问题。
+NutUI CLI 致力于将 Vue 生态中的工具基础标准化。它确保了各种构建工具能够基于智能的默认配置即可平稳衔接,这样你可以专注在撰写组件上,而不必花好几天去纠结配置的问题。
 
 
 ## 命令

+ 2 - 2
lib/plugin/cli/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@nutui/cli",
-  "version": "0.1.3",
+  "version": "0.1.4",
   "description": "nutui cli",
   "main": "./dist_cli/bin/index.js",
   "files": [
@@ -29,7 +29,7 @@
     "@babel/preset-env": "^7.8.7",
     "@commitlint/cli": "^8.0.0",
     "@commitlint/config-conventional": "^8.0.0",
-    "@nutui/markdown-to-vue": "0.0.1",
+    "@nutui/markdown-to-vue": "0.0.3",
     "@types/node": "^13.1.1",
     "@vue/test-utils": "1.0.0-beta.25",
     "autoprefixer": "^9.7.3",

+ 9 - 9
lib/plugin/cli/site/doc/info.vue

@@ -35,7 +35,7 @@
 					<ul class="l-2" v-if="cur.indexOf(nameObj.name) > -1">
 						<template v-for="cpt in nameObj.ary">
 							<li v-on:click.stop="listCheck(cpt)" :class="curName == cpt.name ? 'curs' : ''" :key="cpt.name" v-if="cpt.showDemo">
-								<router-link :to="{ name: cpt.name }">
+								<router-link :to="{ name: cpt.name.toLowerCase() }">
 									{{ cpt.name }}
 									<span>{{ cpt.chnName }}</span>
 								</router-link>
@@ -59,7 +59,7 @@ export default {
 			sortedPackages: [],
 			cur: [],
 			curName: '',
-			version: version,
+			version: version
 		};
 	},
 
@@ -81,7 +81,7 @@ export default {
 			let temp = {};
 			let sorts = this.sorts;
 			let sortArys = [...this.packages];
-			sortArys.map((item) => {
+			sortArys.map(item => {
 				let name = sorts[item.sort];
 				if (!temp[name]) {
 					temp[name] = [];
@@ -91,14 +91,14 @@ export default {
 			for (let key in temp) {
 				tempAry.push({
 					name: key,
-					ary: temp[key],
+					ary: temp[key]
 				});
 			}
 			let routeName = this.$route.name;
 			this.sortedPackages = tempAry;
-			tempAry.map((list) => {
+			tempAry.map(list => {
 				let showParentNode = false;
-				list.ary.map((ary) => {
+				list.ary.map(ary => {
 					if (ary.name == routeName) {
 						showParentNode = true;
 					}
@@ -108,7 +108,7 @@ export default {
 				}
 			});
 		},
-		$route: 'fetchData',
+		$route: 'fetchData'
 	},
 	methods: {
 		fetchData(obj) {
@@ -130,7 +130,7 @@ export default {
 				nowCur.push(val);
 			}
 			this.cur = nowCur;
-		},
+		}
 	},
 	created() {
 		let nameRt = this.$route.name;
@@ -140,7 +140,7 @@ export default {
 		this.curName = nameRt;
 		this.packages = packgs;
 		this.sorts = sorts;
-	},
+	}
 };
 </script>
 <style lang="scss" scoped>

+ 1 - 1
lib/plugin/cli/src/compiler/webpack.ts

@@ -23,7 +23,7 @@ function devServer(config: Webpack.Configuration) {
 	};
 	const server = new WebpackDevServer(compiler, devServerOptions);
 
-	server.listen(8080, '0.0.0.0', (err: Error) => {
+	server.listen(8000, '0.0.0.0', (err: Error) => {
 		if (err) logger.error(err);
 	});
 }

+ 1 - 1
lib/plugin/cli/src/webpack/base.config.ts

@@ -83,7 +83,7 @@ Released under the MIT License.`
 		}),
 		new VueLoaderPlugin(),
 		new WebpackBar({
-			name: 'NutUI ClI',
+			name: 'NutUI CLI',
 			color: '#5396ff'
 		})
 	]

+ 1 - 1
package.json

@@ -56,7 +56,7 @@
     "@babel/plugin-transform-runtime": "^7.9.6",
     "@commitlint/cli": "^8.0.0",
     "@commitlint/config-conventional": "^8.0.0",
-    "@nutui/cli": "^0.1.3",
+    "@nutui/cli": "^0.1.4",
     "@vue/composition-api": "^0.5.0",
     "babel-plugin-istanbul": "^6.0.0",
     "gsap": "^3.2.6",