NuxtJS

直观的 Vue 框架。(The Intuitive Vue Framework)

Github星跟蹤圖

NuxtJS

使用 Nuxt 构建你的下一个 Vue.js 应用,并充满信心:一个让 Web 开发变得简单而强大的框架。

链接

特点

自动移植和捆绑(使用webpack和babel)
热码重装
服务器端渲染OR单页AppOR静态生成,你选火了吗?
静态文件服务。./static/被映射到/
可通过nuxt.config.js文件进行配置。
自定义布局与layouts/目录
中间件
每个页面的代码分割
只加载关键的CSS(页面级)。
了解更多信息,请访问https://nuxtjs.org。

入门

$ npx create-nuxt-app <project-name>

就这么简单!

了解更多信息,请访问 https://nuxtjs.org/guide/installation

例子

请看 https://nuxtjs.org/examples 或直接在https://github.com/nuxt/nuxt.js/tree/dev/examples

生产部署

要部署,与其运行 nuxt,不如提前构建。因此,构建和启动是分开的命令。

nuxt build
nuxt start

了解更多信息,请访问 https://nuxtjs.org/guide/commands#production-deployment

来自 Nuxt 团队的咨询

获取帮助解决那个棘手的 bug,或者确保你的 Nuxt 应用已经准备好部署。每小时 250 美元,就能从 Nuxt 核心团队获得技术支持、建议、代码审查和开发。在 Otechie 上雇佣 Nuxt

TideLift 的专业支持

专业支持的 Nuxt 现在可以使用了!

Tidelift 为软件开发团队提供了一个购买和维护软件的单一来源,由最了解软件的专家提供专业级保证,同时与现有工具无缝集成。

通过 Tidelift 订阅获得支持的Nuxt

支持 Nuxt

Nuxt 是一个 MIT 授权的开源项目,它的持续发展完全是靠这些了不起的支持者的支持。通过 OpenCollective 捐赠的资金将以透明的支出进行管理,并将用于补偿核心团队成员的工作和支出或赞助社区活动。

用每月的捐款来支持我们,帮助我们继续开展活动。「成为支持者」。

许可证

MIT


概覽

名稱與所有者nuxt/nuxt
主編程語言TypeScript
編程語言JavaScript (語言數: 5)
平台Linux, Mac, Windows
許可證MIT License
發布數224
最新版本名稱v3.11.2 (發布於 )
第一版名稱v0.2.0 (發布於 )
創建於2016-10-26 11:18:47
推送於2024-04-21 18:33:10
最后一次提交
星數51.9k
關注者數789
派生數4.8k
提交數5.8k
已啟用問題?
問題數14395
打開的問題數1038
拉請求數4638
打開的拉請求數47
關閉的拉請求數856
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

Vue.js Meta Framework to create complex, fast & universal web applications quickly.

Features

  • Automatic transpilation and bundling (with webpack and babel)
  • Hot code reloading
  • Server-side rendering OR Single Page App OR Static Generated, you choose :fire:
  • Static file serving. ./static/ is mapped to /
  • Configurable with a nuxt.config.js file
  • Custom layouts with the layouts/ directory
  • Middleware
  • Code splitting for every pages/
  • Loading just the critical CSS (page-level)

Learn more at nuxtjs.org.

Consulting from the Nuxt team

Get help with that tough bug or make sure your Nuxt app is ready to deploy. For $250 an hour, get technical support, advice, code reviews, and development from the Nuxt core team: Hire Nuxt on Otechie

Professional support with TideLift

Professionally supported Nuxt.js is now available!

Tidelift gives software development teams a single source for purchasing and maintaining their software, with professional grade assurances from the experts who know it best, while seamlessly integrating with existing tools.

Get supported Nuxt with the Tidelift Subscription.

Partners

Become a partner and get your logo on our README on GitHub and every page of https://nuxtjs.org website with a link to your site. [Become a partner]

Sponsors

Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor]

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Getting started

$ npx create-nuxt-app <project-name>

It's as simple as that!

Templates

:point_right: We recommend to start directly with our cli create-nuxt-app for the latest updates.

Or you can start by using one of our starter templates:

  • starter: Basic Nuxt.js project template
  • express: Nuxt.js + Express
  • koa: Nuxt.js + Koa
  • adonuxt: Nuxt.js + AdonisJS
  • micro: Nuxt.js + Micro
  • nuxtent: Nuxt.js + Nuxtent module for content heavy sites

Using nuxt.js programmatically

const { Nuxt, Builder } = require('nuxt')

// Import and set nuxt.js options
const config = require('./nuxt.config.js')
config.dev = (process.env.NODE_ENV !== 'production')

const nuxt = new Nuxt(config)

// Start build process (only in development)
if (config.dev) {
  new Builder(nuxt).build()
}

// You can use nuxt.render(req, res) or nuxt.renderRoute(route, context)

Learn more: https://nuxtjs.org/api/nuxt

Using nuxt.js as a middleware

You might want to use your own server with your configurations, your API and everything awesome you have created with. That's why you can use nuxt.js as a middleware. It's recommended to use it at the end of your middleware since it will handle the rendering of your web application and won't call next().

app.use(nuxt.render)

Learn more: https://nuxtjs.org/api/nuxt-render

Render a specific route

This is mostly used for nuxt generate and test purposes but you might find another utility!

nuxt.renderRoute('/about', context)
.then(function ({ html, error }) {
  // You can check error to know if your app displayed the error page for this route
  // Useful to set the correct status code if an error appended:
  if (error) {
    return res.status(error.statusCode
去到頂部