2.4.9 • Published 5 years ago

gatsby-cli-daqi v2.4.9

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

gatsby-cli-daqi

说明:此软件包由gatsby-cli基础上汉化,并非原创

Gatsby命令行工具.

使用Gatsby starters来创建网站.

安装

npm install --global gatsby-cli-daqi

使用方法

在命令行输入 gatsby2 --help 查看完整的帮助信息

New

gatsby2 new 站名名字

详细查阅 Gatsby官方 starters 文档

Develop

在Gatsby网站的根目录运行 gatsby develop启动Gatsby开发服务器.

Options

选项描述
-H, --host设置host. 默认值为localhost
-p, --port设置port. 默认值是8000
-o, --open在默认的浏览器自动打开站点
-S, --https使用HTTPS

参考Local HTTPS guide 使用Gatsby在本地设置HTTPS开发服务器.

Build

在Gatsby网站的根目录运行gatsby build生成一个站点的成品代码.

Options

选项描述
--prefix-pathsBuild site with link paths prefixed (set pathPrefix in your config)
--no-uglifyBuild site without uglifying JS bundles (for debugging)
--open-tracing-config-fileTracer configuration file (open tracing compatible). See https://www.gatsbyjs.org/docs/performance-tracing/

Serve

At the root of a Gatsby site run gatsby serve to serve the production build of the site for testing.

Options

OptionDescription
-H, --hostSet host. Defaults to localhost
-p, --portSet port. Defaults to 8000
-o, --openOpen the site in your (default) browser for you
--prefix-pathsServe site with link paths prefixed (if built with pathPrefix in your gatsby-config.js).

Info

At the root of a Gatsby site run gatsby info to get helpful environment information which will be required when reporting a bug.

Options

OptionDescription
-C, --clipboardAutomagically copy environment information to clipboard

Repl

Get a node repl with context of Gatsby environment