Coder Social home page Coder Social logo

codexu / x-build Goto Github PK

View Code? Open in Web Editor NEW
761.0 761.0 122.0 18.18 MB

A front-end scaffolding built on Vite2 + Vue3 + TypeScript.

Home Page: https://code-device.github.io/x-build/

License: MIT License

JavaScript 7.29% HTML 2.75% TypeScript 89.47% Shell 0.34% CSS 0.15%
pinia typescript vite vue3

x-build's People

Contributors

arctichotpot avatar baboon-king avatar codexu avatar dependabot[bot] avatar lousanpang avatar p-mz avatar songxueyan67 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  avatar  avatar  avatar

x-build's Issues

Issues / PR 编写建议 (必读)

issue

  • 提供你的系统信息(发行版名字,版本号,浏览器等)。
  • 提供你所使用的版本。可以对比 github 上的版本列表页, 看看是否为最新版, 也许你的问题在新版本中已经修复了。
  • 尽量详细描述你的问题,以及这个问题是如何出现的,最好能把 操作步骤大概说一下,以便我能重现这个问题。可以通过截图,录屏,浏览器Console报错等方式提交更多的信息。
  • 请使用提供的 Issue 模板格式发布。
  • 提问前请确认已经查找过 Vue、Vue-Cli、Element-plus、Webpack 文档完全配置例示。

pull request

  • 请不要修改项目的换行规格(重要)。

  • 提交代码的基本格式请遵守 .editorconfig 和 eslint (提交前请用 yarn run lint --no-fix检查是否有 rules 未通过)如果未遵守,将直接关闭 pr。

  • 配置 git config --global core.autocrlf input。

  • 提交的 pull request 请描述清楚做了什么改动。

  • 尽量遵循本项目 commit message 如下:

    • 修复 bug : fix: bug title (如果有 issue,请在结尾带 #issue 号)
    • 修复包管理信息: fix(package): move polyfills dependencie to dev
    • 新增功能: feat: add multi-tabs
    • 更新文档: docs: xxxx
    • 其他操作: chore: rename loadding -> loading
    • 重构代码: refactor: multi-tabs
    • 不合并:自有业务逻辑、无意义代码、格式化代码

参与流程

诚邀参加 X-BUILD FOR VUE3.0 脚手架的开发,大家互相学习,共同进步!

  • 添加微信 xu461229187,并进微信开发群。
  • 向管理员提供 Github 账号拉入组织,更改群备注与 Github 账号一至。
  • 熟悉项目 -> 认领任务 -> 功能开发 -> 提交 PR -> 代码审核。
  • 请在不影响正常的工作和生活贡献代码!

[yarn serve] js css执行顺序问题

项目运行后css js 执行顺序问题

  1. 需要获取DOM元素的 offsetTop属性。
  2. 必须设置DOM元素的宽高。
  3. js 优于 css 导致DOM元素offsetTop属性为固定值。

示例截图

image

期望

  • 项目运行后css 优于 js代码包执行
    image

版本信息:

  • OS: [iOS10.14.5]
  • Version [5.1.3]

奖励

  • 🌹

npm install时报错

npm WARN deprecated [email protected]: ???? Thanks for using Babel: we
recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated [email protected]: Package no longer supported. Contact support@n
pmjs.com for more info.
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for comp
atibility with current and future versions of Node.js
npm WARN tarball tarball data for caniuse-lite@^1.0.30000839 (sha1-3nyEzeBYIUPPT
1q98bmOWgU5rUo=) seems to be corrupted. Trying one more time.
npm WARN [email protected] No repository field.

npm ERR! path E:\x-build\node_modules.staging\caniuse-lite-f36f1fca\data\featur
es\css-rebeccapurple.js
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'E:\x-build\node_modules
.staging\caniuse-lite-f36f1fca\data\features\css-rebeccapurple.js'
npm ERR! { Error: EPERM: operation not permitted, unlink 'E:\x-build\node_modul
es.staging\caniuse-lite-f36f1fca\data\features\css-rebeccapurple.js'
npm ERR! cause:
npm ERR! { Error: EPERM: operation not permitted, unlink 'E:\x-build\node_mod
ules.staging\caniuse-lite-f36f1fca\data\features\css-rebeccapurple.js'
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'E:\x-build\node_modules\.staging\caniuse-lite-f36f1fca
\data\features\css-rebeccapurple.js' },
npm ERR! stack: 'Error: EPERM: operation not permitted, unlink 'E:\x-build\
node_modules\.staging\caniuse-lite-f36f1fca\data\features\css-rebeccapurple
.js'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'E:\x-build\node_modules\.staging\caniuse-lite-f36f1fca\da
ta\features\css-rebeccapurple.js',
npm ERR! parent: 'x-build' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or ant
ivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!

pug模板支持动态渲染吗?

就是,我从后台http请求后获得数据想把数据渲染在pug模板里面应该怎么样操作,我是想用pug.compile()方法渲染,再把获取的html字符串返给要给的节点上,但奈何在src/script/index.js 里引用pug包报错.....

image
请教正确的姿势!

运行时报错

rimraf dist && x-service-serve

(node:16340) UnhandledPromiseRejectionWarning: Error: spawn ./node_modules/.bin/webpack-dev-server ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
at onErrorNT (internal/child_process.js:407:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:11)
at startup (internal/bootstrap/node.js:285:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
(node:16340) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:16340) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

node v10.13.0
x-build v4.6.2
win10

8080端口被占用会启动失败

大佬你好,使用过程中发现如果8080端口被其他项目先占用了,yarn serve 会直接失败,能不能做成像vue-cli一样,如果8080占用了自动启动到8081端口上,以此类推,现实开发中这样同时启动几个项目的场景还是挺常见的

npm run dev 报错 properties 问题

通过npm install 安装后,然后npm run dev运行项目,遇到报错如下

TypeError: Cannot read property 'properties' of undefined
at module.exports (D:\cli\x-build\node_modules\webpack-cli\bin\config-yargs.js:89:48)
at Object. (D:\cli\x-build\node_modules\webpack-dev-server\bin\webpack-dev-server.js:84:40)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: rimraf dist & cross-env NODE_ENV=development webpack-dev-server --mode=development --config webpack.config.js --open
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\haigui\AppData\Roaming\npm-cache_logs\2018-09-25T08_46_22_894Z-debug.log

通过github直接下载项目安装和通过x-build-cli安装,都会遇到这个问题

请问构建报错是什么原因?

(macOS,已用sudo权限全局安装x-build)报错信息如下:

                    • x-build 6.1.0-beta.15 - - - - - - - - - - - -

X-BUILD v6.1.0-beta.15

? 选择 UI 框架 Element Plus
? 选择 CSS 预处理器 Sass/Scss
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^

[Error: ENOENT: no such file or directory, open '/Users/hl/Development/Workspace/VscProjects/vite-naive-admin/src/styles/global.ejs'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/Users/hl/Development/Workspace/VscProjects/vite-naive-admin/src/styles/global.ejs'
}

rem功能开启有问题

image
loader配置有问题,以前是在package.json里面配置rem:true,现在已经改到config,json里面开启,下一版本请更新此问题

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.