Formik-JSON-Schema 项目教程

Formik-JSON-Schema 项目教程

formik-json-schemaEasily create react forms using JSON / Javascript Object项目地址:https://gitcode.com/gh_mirrors/fo/formik-json-schema

1、项目的目录结构及介绍

Formik-JSON-Schema 项目的目录结构如下:

formik-json-schema/
├── demo/
│   └── src/
├── src/
├── tests/
├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── nwb.config.js
├── package-lock.json
├── package.json

目录介绍:

  • demo/: 包含项目的演示代码。
  • src/: 包含项目的主要源代码。
  • tests/: 包含项目的测试代码。
  • .gitignore: Git 忽略文件配置。
  • .travis.yml: Travis CI 配置文件。
  • LICENSE: 项目许可证。
  • README.md: 项目说明文档。
  • nwb.config.js: nwb 配置文件。
  • package-lock.json: npm 依赖锁定文件。
  • package.json: npm 包配置文件。

2、项目的启动文件介绍

项目的启动文件位于 src/ 目录下,主要文件包括:

  • index.js: 项目的入口文件,负责初始化和导出主要模块。

启动文件介绍:

  • index.js:
    import Form from './Form';
    export default Form;
    

3、项目的配置文件介绍

项目的配置文件主要包括:

  • nwb.config.js: nwb 工具的配置文件,用于构建和开发环境配置。
  • package.json: npm 包配置文件,包含项目的依赖、脚本等信息。

配置文件介绍:

  • nwb.config.js:

    module.exports = {
      type: 'react-component',
      npm: {
        esModules: true,
        umd: {
          global: 'FormikJsonSchema',
          externals: {
            react: 'React'
          }
        }
      }
    };
    
  • package.json:

    {
      "name": "formik-json-schema",
      "version": "1.0.0",
      "description": "Easily create react forms using JSON / Javascript Object",
      "main": "lib/index.js",
      "module": "es/index.js",
      "files": [
        "css",
        "es",
        "lib",
        "umd"
      ],
      "scripts": {
        "build": "nwb build-react-component",
        "clean": "nwb clean-module && nwb clean-demo",
        "start": "nwb serve-react-demo",
        "test": "nwb test-react",
        "test:coverage": "nwb test-react --coverage",
        "test:watch": "nwb test-react --server"
      },
      "dependencies": {
        "formik": "^2.2.6",
        "react": "^17.0.2",
        "react-dom": "^17.0.2"
      },
      "peerDependencies": {
        "react": "^16.8.0 || ^17.0.0"
      },
      "devDependencies": {
        "nwb": "0.25.x"
      },
      "author": "Flipbyte",
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "https://github.com/flipbyte/formik-json-schema.git"
      },
      "keywords": [
        "react-component",
        "formik",
        "json",
        "schema"
      ]
    }
    

以上是 Formik-JSON-Schema 项目的目录结构、启动文件和配置文件的详细介绍。希望这份教程能帮助你更好地理解和使用该项目。

formik-json-schemaEasily create react forms using JSON / Javascript Object项目地址:https://gitcode.com/gh_mirrors/fo/formik-json-schema

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

管岗化Denise

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值