Coder Social home page Coder Social logo

hey-cli's Introduction

HeyUI

npm (tag) npm bundle size npm NPM

An UI components library.

Components

Documentation

visit heyui.top.

Install

npm install heyui@next --save

Start

Basic

<script src="https://cdn.jsdelivr.net/npm/vue@next"></script>
<script src="https://cdn.jsdelivr.net/npm/heyui@next"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/heyui@next/themes/index.css"></link>

Advanced

import { createApp } from 'vue';
import heyui from 'heyui';
require('heyui/themes/index.less');

app.use(heyui);
app.mount('#app');

Development

npm install

# build
npm run build

Admin Template

HeyUI Admin Template

Browser Support

Modern browsers and Internet Explorer 11+.

LICENSE

MIT

Copyright (c) 2017-present, Lan

hey-cli's People

Contributors

kongyajie avatar kuange avatar laoqi avatar vvpvvp avatar xieshangxu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hey-cli's Issues

what`s wrong?SyntaxError: Unexpected end of JSON input while parsing near '...ame":"loose-envify","'

  • npm -v 6.14.5
  • node -v 12.5.0&8.11.4
$ npm i -g hey-cli
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! Unexpected end of JSON input while parsing near '...ame":"loose-envify","'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\xxx\AppData\Roaming\npm-cache\_logs\2020-05-10T09_20_07_302Z-debug.log

###.log

580 silly fetchPackageMetaData error for loose-envify@^1.0.0 Unexpected end of JSON input while parsing near '...ame":"loose-envify","'
581 timing stage:rollbackFailedOptional Completed in 2ms
582 timing stage:runTopLevelLifecycles Completed in 15224ms
583 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...ame":"loose-envify","'
583 verbose stack     at JSON.parse (<anonymous>)
585 verbose Windows_NT 10.0.18362
587 verbose node v8.11.4
588 verbose npm  v6.14.5
589 error Unexpected end of JSON input while parsing near '...ame":"loose-envify","'
590 verbose exit [ 1, true ]

webpack的plugins如何配置?

文档中描述:

可以在hey.conf.js中webpack配置项中扩张(扩展?)配置以下属性:
plugins
module

尝试:

npm i --save-dev terser-webpack-plugin
const TerserPlugin = require('terser-webpack-plugin')
webpack:{
...
//代码混淆
plugins: [new TerserPlugin()],
....

}
报错:
 HEY CLI v2.7.1 
[HEY] Can't find  hey.config.js or package.json 'hey' param. 

请问:以terser-webpack-plugin插件为例,请问应该如何配置?

hey dev 确认后弹出了 sublime,是让我改 hey.js 吗

安装都正常,文件也没动。

然后 cmd 里输入 hey dev 回车,
结果打开了我的 sublime text,并打开了 hey.js 文件。
然后就没有然后了。

这是怎么回事呀,是要我卸载 sublime 或者修改 hey.js 吗?

初始化之后启动 dev server 报错

➜ node -v
v7.10.0
➜ npm -v
4.2.0
➜ hey -v
0.0.26

➜ hey init vue xman_ui
➜ hey dev

/usr/local/lib/node_modules/hey-cli/src/generatorWebpackConfig.js:114
      new webpack.LoaderOptionsPlugin({
      ^

TypeError: webpack.LoaderOptionsPlugin is not a constructor
    at initDefaultWebpackConf (/usr/local/lib/node_modules/hey-cli/src/generatorWebpackConfig.js:114:7)
    at module.exports (/usr/local/lib/node_modules/hey-cli/src/generatorWebpackConfig.js:300:20)
    at module.exports (/usr/local/lib/node_modules/hey-cli/src/config.js:62:21)
    at Object.dev (/usr/local/lib/node_modules/hey-cli/src/task.js:16:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/hey-cli/bin/hey-dev.js:30:6)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:427:7)
    at startup (bootstrap_node.js:151:9)
    at bootstrap_node.js:542:3

react template 无法创建,

➜  hey-cli hey init react-test
 HEY CLI v1.2.1
? Which template would you like to choose? React
[HEY] Use Template React
[HEY] Failed to download repo heyui/hey-cli-template: tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:8118
[HEY] { Error: ENOENT: no such file or directory, scandir '/Users/wingsico/.hey-cli-template/react'
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: '/Users/wingsico/.hey-cli-template/react' }
[HEY] Project react-test generation success.
====================================
  cd react-test
  npm install
  hey dev
====================================

什么问题

如何使用vue jsx

如何使用vue jsx?
好像babel的配置是写死的,不能配置。

webpack输出日志格式化

就调整了一下
https://github.com/heyui/hey-cli/blob/master/src/task.js#L153

index 2d27d69..48dc415 100644
--- a/src/task.js
+++ b/src/task.js
@@ -152,10 +152,12 @@ module.exports = {
       }
       var jsonStats = stats.toJson();
       if (jsonStats.errors.length > 0) {
-        logger.error(jsonStats.errors);
+        //logger.error(jsonStats.errors);
+        jsonStats.errors.forEach((item) => logger.error(item));
       }
       if (jsonStats.warnings.length > 0) {
-        logger.warn(jsonStats.warnings);
+        //logger.warn(jsonStats.warnings);
+        jsonStats.warnings.forEach((item) => logger.warn(item));
       }
       if(config.stat) {
         fss.writeFile(webpackConfig.output.path + '/stat.json', JSON.stringify(jsonStats),  function(err) {

本来提交了个PR,但是提交的用户错了,所以自己关掉了。

vue 模板报错

使用的是 HEY CLI v1.2.4,
然后 hey init 选择的 vue,
之后 hey dev 报错了。

报错信息如下:
报错信息

关于在hey.config.js中添加webpack的rules的问题

如果在hey.config.js中添加module:{rules:[]},在generatorWebpackConfig.js中初始化好的rules会被覆盖掉。
if(webpackConfig.module) { for(var m in webpackConfig.module) { genWebpackConfig.module[m] = webpackConfig.module[m]; } }
但是我有需要手工添加rules,所以只能去修改generatorWebpackConfig.js的源码

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.