kyt

开始一个新的 JS 应用?使用 kyt 构建、测试和运行高级应用程序。「Starting a new JS app? Build, test and run advanced apps with kyt 🔥」

  • 所有者: nytimes/kyt
  • 平台: Linux, Mac, Windows
  • 許可證: Other
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

kyt

Every sizable JavaScript web app needs a common foundation: a setup to build, run, test and lint your code. kyt is a toolkit that encapsulates and manages the configuration for web apps.

Read more about kyt in our blog post.

Build Status Dependency Status npm

Quick Start

  1. Install Node.js (v6.0+ required).
  2. npm install -g kyt-cli
  3. kyt-cli setup - This will set up your project with application and configuration files so that you can get started with kyt. Learn more about setup.
  4. npm run dev
  5. Check out http://localhost:3000

Features

  • Optional universal support with a Node server provided for rendering front-end page requests
  • Client and server hot reloading
  • Custom Babel presets with ES6 support, optional React support and optimizations for polyfilling Node and browser builds.
  • CSS Module and SASS support
  • PostCSS support
  • Static asset support
  • Inline SVG support
  • Style and script linter rulesets
  • A pre-configured test runner with Jest
  • Optional client-only mode for apps that already have a server

How it Works

kyt manages configuration for all aspects of development. It can be installed as an npm dependency into a new or existing project. kyt’s goal is to encapsulate only development tools, giving users the freedom to control their source directory and make important decisions about app architecture. kyt provides a command line interface for running all development tools.

Developers design their own architecture, choosing the tools they need for rendering, styling, and handling data.

For advanced use cases, kyt enables developers to add additional tools and configuration.
See our config override instructions for details, and our recipes for examples.

In an attempt to gather feedback to set future priorities, we're running a brief user survey asking: what are you using modifyWebpackConfig for?

Setting up a kyt project

kyt-cli is a utility for bootstrapping kyt projects. It can be installed globally and run to create a new project or integrate kyt with an existing project.

kyt-cli setup

See the kyt-cli documentation for more details.

Command line

kyt includes a command line program with all the commands needed for development.

Running kyt-cli setup includes these commands as scripts in your package.json:

npm run dev

Or you can run a command using node_modules/.bin/kyt command:

node_modules/.bin/kyt build

Here are the available commands:

  • dev starts a development environment
  • build compiles server and client code for production use
  • proto starts the prototyping app
  • help shows commands and their documentation

See our CLI docs for further details.

Conventions

kyt follows a few simple conventions.

All projects must have the following structure:

  src/
    client/
      index.js
    server/
      index.js

Each index.js file acts as the build entry.

(Note that server/index.js is not required if hasServer is false in config).

If you're setting up a new project see our full list of conventions.

Configuration

kyt allows you to specify options in a kyt.config.js file.
See the kyt config docs for instructions.

kyt uses Webpack to compile src code and run tests.
See our recipes for extending configuration.

To configure Babel, kyt respects .babelrc.js files defined at the root of user projects, and provides presets to provide opinionated configurations. (If no Babel config file is defined in the user project, babel-preset-kyt-core is used.)

starter-kyts

While kyt can be easily integrated into new or existing Node projects, it is even more powerful when used with a starter-kyt. A starter-kyt offers the benefits of boilerplates while minimizing the amount of new tools to learn and maintain. The kyt-cli setup command installs any preconfigured starter-kyt git repository, adding additional dependencies and building a source directory.

See our recommended list of starter-kyts.

How to build a starter-kyt

Community supported starter-kyts can be built to support a variety of projects.
See additional info on how to build a starter-kyt.

How to contribute to kyt

Want to help? See details here

Need Help?

  1. Check our FAQ
  2. Submit an issue
  3. Check out our recipes for extending kyt

Changelog

Changelog

主要指標

概覽
名稱與所有者nytimes/kyt
主編程語言JavaScript
編程語言JavaScript (語言數: 4)
平台Linux, Mac, Windows
許可證Other
所有者活动
創建於2016-06-03 19:16:26
推送於2025-05-15 16:07:22
最后一次提交
發布數1145
最新版本名稱kyt-starter-universal-src@2.0.8 (發布於 2025-05-15 12:07:21)
第一版名稱v0.0.1 (發布於 )
用户参与
星數1.9k
關注者數28
派生數111
提交數863
已啟用問題?
問題數207
打開的問題數37
拉請求數468
打開的拉請求數28
關閉的拉請求數517
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?