{"_id":"@cratosw/gatsby-antd","_rev":"1-53faa94f211305339e927e1211a74be4","name":"@cratosw/gatsby-antd","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@cratosw/gatsby-antd","description":"基于antv 的改造","version":"0.0.1","author":{"name":"cratosw"},"keywords":[],"homepage":"http://.","repository":{"type":"git","url":"git+https://github.com/Cratosw/gatsby-antd.git"},"dependencies":{"@ant-design/icons":"^4.0.2","@babel/plugin-transform-modules-umd":"^7.2.0","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/standalone":"^7.6.4","@hot-loader/react-dom":"^16.9.0+4.12.11","@stackblitz/sdk":"^1.3.0","@types/classnames":"^2.2.9","@types/codemirror":"^0.0.87","@types/git-url-parse":"^9.0.0","@types/lodash-es":"^4.17.3","@types/parse-github-url":"^1.0.0","@types/react":"^16.9.2","@types/react-dom":"^16.9.0","@types/react-github-button":"^0.1.0","@types/react-helmet":"^5.0.10","@types/shallowequal":"^1.1.1","antd":"^4.0.0","babel-preset-gatsby":"^0.2.13","classnames":"^2.2.6","codemirror":"^5.49.2","codesandbox":"^2.1.10","docsearch.js":"^2.6.3","gatsby":"^2.19.43","gatsby-image":"^2.2.19","gatsby-plugin-antd":"^2.0.2","gatsby-plugin-catch-links":"^2.1.12","gatsby-plugin-cname":"^1.0.0","gatsby-plugin-copy-files":"^1.0.3","gatsby-plugin-google-analytics":"^2.1.16","gatsby-plugin-i18n":"^1.0.1","gatsby-plugin-layout":"^1.1.11","gatsby-plugin-less":"^3.0.6","gatsby-plugin-manifest":"^2.2.16","gatsby-plugin-meta-redirect":"^1.1.1","gatsby-plugin-nprogress":"^2.1.12","gatsby-plugin-offline":"^3.0.22","gatsby-plugin-page-creator":"^2.1.25","gatsby-plugin-react-helmet":"^3.1.7","gatsby-plugin-react-svg":"^3.0.0","gatsby-plugin-remove-serviceworker":"^1.0.0","gatsby-plugin-remove-trailing-slashes":"^2.1.9","gatsby-plugin-sharp":"^2.2.22","gatsby-plugin-sitemap":"^2.2.21","gatsby-plugin-typescript":"^2.1.8","gatsby-redirect-from":"^0.2.1","gatsby-remark-autolink-headers":"^2.1.13","gatsby-remark-external-links":"^0.0.4","gatsby-remark-prettier":"^1.0.0","gatsby-remark-prismjs":"^3.3.29","gatsby-remark-reading-time":"^1.0.1","gatsby-source-filesystem":"^2.1.22","gatsby-source-github":"^0.0.2","gatsby-transformer-remark":"^2.6.24","gatsby-transformer-sharp":"^2.2.14","git-url-parse":"^11.1.2","i18next":"^19.0.0","import-local":"^3.0.2","indent-string":"^4.0.0","insert-css":"^2.0.0","less":"^3.10.3","lodash":"^4.17.15","lodash-es":"^4.17.15","matchmedia-polyfill":"^0.3.2","mkdirp":"^1.0.3","normalize.css":"^8.0.1","parse-github-url":"^1.0.2","prettier":"^1.18.2","pretty-quick":"^2.0.0","prism-themes":"^1.2.0","prismjs":"^1.17.1","ptz-i18n":"^1.0.0","rc-drawer":"^3.0.2","rc-footer":"^0.6.1","react":"^16.13.0","react-codemirror2":"^7.0.0","react-dom":"^16.13.0","react-github-button":"^0.1.11","react-helmet":"^5.2.1","react-i18next":"^11.0.0","react-slick":"^0.25.2","react-split-pane":"^0.1.87","react-test-renderer":"^16.9.0","react-use":"^13.8.0","release-it":"^13.0.0","shallowequal":"^1.1.0","slash":"^3.0.0","slick-carousel":"^1.8.1","typescript":"^3.7.4","video-react":"^0.14.1"},"license":"MIT","scripts":{"build":"gatsby build","develop":"gatsby develop","start":"npm run develop","serve":"gatsby serve","release":"release-it -n","copy:components":"mkdir -p lib && cp -R .tmp/@cratosw/gatsby-antd/site/components lib && cp site/components/*.less ./lib/components && cp site/common.json ./lib && cp -R site/images ./lib","compile:components":"rm -rf .tmp lib && ../../node_modules/.bin/tsc --outDir .tmp --noEmit false -d && npm run copy:components","test":"jest"},"release-it":{"git":{"commitMessage":":sparkles: Release ${version}"},"github":{"release":true},"hooks":{"before:init":["npm test","npm run compile:components"]}},"publishConfig":{"access":"public"},"devDependencies":{"@testing-library/jest-dom":"^5.1.1","@testing-library/react":"^10.0.1","@types/jest":"^25.1.1","babel-jest":"^25.1.0","identity-obj-proxy":"^3.0.0","jest":"^25.1.0","react-test-renderer":"^16.9.0","ts-jest":"^25.2.0"},"bugs":{"url":"https://github.com/Cratosw/gatsby-antd/issues"},"_id":"@cratosw/gatsby-antd@0.0.1","_nodeVersion":"12.14.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-f9bOpXT6/H8PgA0SeiOlBgxQvB3Bmseycbm27Le7nA5Mp1ZCzcAy2NXkw5mddKUab/N8QnFezXEaZeyC9oGndA==","shasum":"6ece606cb36e4cc7e16bfa571a941c4b1709145b","tarball":"https://registry.npmjs.org/@cratosw/gatsby-antd/-/gatsby-antd-0.0.1.tgz","fileCount":72,"unpackedSize":284847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebzgaCRA9TVsSAnZWagAAhUEP/2IfJ0aXCaMXX9jK2w5m\nE3wLTsDyT368oDkE2fkBL6clNOL++KzJaZleo15adJElTphWbtB1v6GxKW2U\nwJGCsrz8rxmX7NDxGk6YDALV1ioWYlDcHE1OGxiimPMkI2D0trjO8xNVr3lE\naUeF4Sb3xqxwwcdKkD3ZibIpuh+IO2k/iSmKAhqm9B8BUr2YBcU2dya4bXt3\nT9lf7FQUFRr8DWHIxZEvS9sWl22wPm/tt3v2+KN5ROvnmRtFqRjoRz0dSELe\nL0LtjtIMg+WuWX9GXt7V1QGESDPM9Em1F1LMqiqg1K9F9aHg94z2oqktwin4\ngQ48xzTY1X200/h4byy0vGfJNMtRLupDwfSGRYRjTeG2dEudcnvMRIcPhCCw\nO7aimi69cfWuYJH5viWxerUZfaGk0h81d++Q6YPHDFqyxNBnDePW0JhPaxDF\nK63kpUXUy8G34Fzj2Jup3rItpInbpAVdMrjh9BWB23/5AOHQBQ/xOaB4k39y\nDzyQ5IZPpkqIQVwnn6FZVb/OlViCqHdCBeIeqmi31a3uisia8IUzeDxDfVVv\nvst7hLxzRpKPUiIERHywhZCqz6opxfNUCWpga1Wc1j2sS5rHAYicZ/5P2Uzm\nCCoF/um4g6pdu3mtiCge4cMQu/OUbXZ9tXZ59T64afy2ERCYOSWlr2+MXC3Y\nB92O\r\n=9QZX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiOtSrbvDVt0CCxlA0esslCSgCS1HYp10C0nhqAOVAUwIgVVtmvOS3nv5HZBL4ZsZ7a59q/FnNCw3xbUyn1uopsjM="}]},"maintainers":[{"name":"cratosw","email":"wenbo248281051@outlook.com"}],"_npmUser":{"name":"cratosw","email":"wenbo248281051@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-antd_0.0.1_1584347161937_0.5774745760084099"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-16T08:26:01.701Z","0.0.1":"2020-03-16T08:26:02.191Z","modified":"2022-04-05T01:37:30.401Z"},"maintainers":[{"name":"cratosw","email":"wenbo248281051@outlook.com"}],"description":"基于antv 的改造","homepage":"http://.","keywords":[],"repository":{"type":"git","url":"git+https://github.com/Cratosw/gatsby-antd.git"},"author":{"name":"cratosw"},"bugs":{"url":"https://github.com/Cratosw/gatsby-antd/issues"},"license":"MIT","readme":"\n\n✨ Polished Gatsby theme for documentation site.\n\n[![](https://flat.badgen.net/npm/v/@cratosw/gatsby-antd?icon=npm)](https://www.npmjs.com/package/@cratosw/gatsby-antd)\n[![NPM downloads](http://img.shields.io/npm/dm/@cratosw/gatsby-antd.svg?style=flat-square)](http://npmjs.com/@cratosw/gatsby-antd)\n![CI status](https://github.com/antvis/gatsby-theme-antv/workflows/Node%20CI/badge.svg)\n[![Dependency Status](https://david-dm.org/antvis/gatsby-theme-antv.svg?style=flat-square&path=@cratosw/gatsby-antd)](https://david-dm.org/antvis/gatsby-theme-antv?path=@cratosw/gatsby-antd)\n[![devDependencies Status](https://david-dm.org/antvis/gatsby-theme-antv/dev-status.svg?style=flat-square&path=@cratosw/gatsby-antd)](https://david-dm.org/antvis/gatsby-theme-antv?type=dev&path=@cratosw/gatsby-antd)\n![prettier code style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)\n\n</div>\n\n## Usage\n\nCreate a Gatsby site from [gatsby-starter-theme-antv](https://github.com/antvis/gatsby-starter-theme-antv).\n\n```bash\n$ yarn global add gatsby-cli // or npm install gatsby-cli -g\n$ gatsby new mysite https://github.com/antvis/gatsby-starter-theme-antv\n```\n\nStart developing.\n\n```bash\n$ cd mysite\n$ yarn start\n```\n\n> ✨ AntV 站点 [接入方式](https://github.com/antvis/antvis.github.io/issues/18#issuecomment-548754442) 和 [额外功能](https://github.com/antvis/antvis.github.io/issues/18#issuecomment-568692771)\n\n### `gatsby-config.js`\n\n```js\n// gatsby-config.js\nconst { repository } = require('./package.json');\n\nmodule.exports = {\n  plugins: [\n    {\n      resolve: `@cratosw/gatsby-antd`,\n      options: {\n        // pagesPath: './site/pages',\n        GATrackingId: `UA-XXXXXXXXX-X`,\n        pathPrefix: '/g2',\n        // antd 主题：https://github.com/ant-design/ant-design/blob/master/components/style/themes/default.less\n        theme: {\n          'primary-color': '#873bf4',\n        },\n        pwa: true, // 是否开启 gatsby-plugin-offline\n        cname: true, // 是否自动从 siteUrl 中提取 CNAME 文件\n        codeSplit: true, // 是否开启 gatsby 按路由的代码分割，默认为 false\n      },\n    },\n  ],\n  siteMetadata: {\n    title: `AntV`,\n    description: `Ant Visualization solution home page`,\n    githubUrl: repository.url,\n    logoUrl: '', // 自定义 logo\n    navs: [], // 用于定义顶部菜单\n    docs: [], // 用于定义文档页面的二级分类菜单\n    examples: [], // 用于定义演示页面的二级菜单，属性见下方\n    showSearch: true, // 是否展示搜索框\n    showChinaMirror: true, // 是否展示国内镜像链接\n    showLanguageSwitcher: true, // 用于定义是否展示语言切换\n    showAntVProductsCard: true, // 是否展示 AntV 系列产品的卡片链接\n    showGithubCorner: true, // 是否展示角落的 GitHub 图标\n    playground: {\n      container: '<canvas id=\"container\" />', // 定义演示的渲染节点，默认 <div id=\"container\" />\n      playgroundDidMount: 'console.log(\"playgroundDidMount\");',\n      playgroundWillUnmount: 'console.log(\"playgroundWillUnmount\");',\n    },\n    versions: [\n      {\n        '1.x': 'https://1x.ant.design',\n        '2.x': 'https://2x.ant.design',\n        '3.x': 'https://ant.design',\n        '4.x': 'https://next.ant.design',\n      },\n    ],\n    redirects: [\n      {\n        from: /\\/old-url/,\n        to: '/new-url', // 不指定 to 时直接跳转到 https://antv-2018.alipay.com/***\n      },\n    ],\n  },\n};\n```\n\n- `navs`: [props](https://github.com/antvis/gatsby-theme-antv/blob/aa8cdd7e24e965174cbe7173a841fd7d23537e52/%40antv/gatsby-theme-antv/gatsby-node.js#L242-L264)\n- `docs`: [props](https://github.com/antvis/gatsby-theme-antv/blob/aa8cdd7e24e965174cbe7173a841fd7d23537e52/%40antv/gatsby-theme-antv/gatsby-node.js#L242-L264)\n- `examples`: [props](https://github.com/antvis/gatsby-theme-antv/blob/aa8cdd7e24e965174cbe7173a841fd7d23537e52/%40antv/gatsby-theme-antv/gatsby-node.js#L242-L264)\n\n### Components\n\n- [Header Props](https://github.com/antvis/gatsby-theme-antv/blob/master/%40antv/gatsby-theme-antv/site/components/Header.tsx#L13-L39)\n- [Footer Props](https://github.com/antvis/gatsby-theme-antv/blob/046a9c4e32eea50b49347b114714425a9f99b4b7/%40antv/gatsby-theme-antv/site/components/Footer.tsx#L149-L159)\n- [SEO Props](https://github.com/antvis/gatsby-theme-antv/blob/046a9c4e32eea50b49347b114714425a9f99b4b7/%40antv/gatsby-theme-antv/site/components/Seo.tsx#L12-L17)\n- [Banner Props](https://github.com/antvis/gatsby-theme-antv/blob/c6178d1baeebce4ef4e31773a6b533020b662b27/%40antv/gatsby-theme-antv/site/components/Banner.tsx#L8-L31)\n- [Features Props](https://github.com/antvis/gatsby-theme-antv/blob/c6178d1baeebce4ef4e31773a6b533020b662b27/%40antv/gatsby-theme-antv/site/components/Features.tsx#L7-L17)\n- [Cases Props](https://github.com/antvis/gatsby-theme-antv/blob/c6178d1baeebce4ef4e31773a6b533020b662b27/%40antv/gatsby-theme-antv/site/components/Cases.tsx#L14-L25)\n- [Companies Props](https://github.com/antvis/gatsby-theme-antv/blob/c6178d1baeebce4ef4e31773a6b533020b662b27/%40antv/gatsby-theme-antv/site/components/Companies.tsx#L6-L16)\n\n```jsx\nimport SEO from '@cratosw/gatsby-antd/site/components/Seo';\nimport Header from '@cratosw/gatsby-antd/site/components/Header';\nimport Footer from '@cratosw/gatsby-antd/site/components/Footer';\nimport Banner from '@cratosw/gatsby-antd/site/components/Banner';\nimport Features from '@cratosw/gatsby-antd/site/components/Features';\nimport Applications from '@cratosw/gatsby-antd/site/components/Applications';\nimport Companies from '@cratosw/gatsby-antd/site/components/Companies';\n\n// @cratosw/gatsby-antd/components/Header for commonjs version\n\nconst Layout = () => {\n  const features = [\n    {\n      icon:\n        'https://gw.alipayobjects.com/zos/basement_prod/5dbaf094-c064-4a0d-9968-76020b9f1510.svg',\n      title: 'xxxxx',\n      description: 'xxxxxxxxxxxxxxxxxxxxxxxxx',\n    },\n    {\n      icon:\n        'https://gw.alipayobjects.com/zos/basement_prod/0a0371ab-6bed-41ad-a99b-87a5044ba11b.svg',\n      title: 'xxxxx',\n      description: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',\n    },\n    {\n      icon:\n        'https://gw.alipayobjects.com/zos/basement_prod/716d0bc0-e311-4b28-b79f-afdd16e8148e.svg',\n      title: 'xxxxx',\n      description: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',\n    },\n  ];\n  const cases = [\n    {\n      logo:\n        'https://gw.alipayobjects.com/mdn/rms_23b644/afts/img/A*2Ij9T76DyCcAAAAAAAAAAABkARQnAQ',\n      title: '灯塔专业版',\n      description:\n        '深入金融的基金深入金融的基金深入金融的基金深入金融的基金深入金融的基金深入金融的基金深入金融的基金深入金融的基金深入金融的基金深入金融的基金深入金融的基金',\n      link: '#',\n      image:\n        'https://gw.alipayobjects.com/mdn/rms_23b644/afts/img/A*oCd7Sq3N-QEAAAAAAAAAAABkARQnAQ',\n    },\n    // ...\n  ];\n  const companies = [\n    {\n      name: '公司1',\n      image:\n        'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*Z1NnQ6L4xCIAAAAAAAAAAABkARQnAQ',\n    },\n    {\n      name: '公司2',\n      image:\n        'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*6u3hTpsd7h8AAAAAAAAAAABkARQnAQ',\n    },\n    // ...\n  ];\n  const notifications = [\n    {\n      type: '测试',\n      title: 'G6 3.2 全新上线！',\n      date: '2019.12.04',\n      link: '#',\n    },\n  ];\n\n  const downloadButton = {\n    text: '下载使用',\n    link: 'https://antv.alipay.com/zh-cn/index.html',\n  };\n\n  return (\n    <>\n      <SEO title=\"蚂蚁数据可视化\" lang=\"zh\" />\n      <Header\n        subTitle=\"子产品名\"\n        logo={{\n          link: 'https://antv.alipay.com',\n          img: <img src=\"url\" />,\n        }}\n        githubUrl=\"https://github.com/antvis/g2\"\n        // docs={[]}\n        showSearch={false}\n        showGithubCorner={false}\n        showLanguageSwitcher={false}\n        onLanguageChange={language => {\n          console.log(language);\n        }}\n        defaultLanguage=\"zh\"\n      />\n      <Footer\n      // columns={[]}\n      // bottom={<div>powered by antv</div>}\n      />\n\n      <Banner\n        coverImage={<svg></svg>} // 右侧 banner svg 内容\n        title=\"主页标题\"\n        description=\"主页描述内容描述内容描述内容描述内容\"\n        buttonText=\"按钮文字\"\n        buttonHref={'#按钮链接路径'}\n        notifications={notifications} // 可传 1-2 个内容，若不传则显示 2 个默认通知\n        style={{}}\n        className=\"Banner 的 className\"\n        video=\"视频按钮点开后视频的链接，不传则不会出现视频按钮\"\n        githubStarLink=\"Github Star 链接，不传则不会出现 GitHub Start 按钮\"\n        downloadButton={downloadButton} // 不传则不会出现下载按钮\n      />\n      <Features\n        title=\"优势页面名称\" // 可不传\n        features={features} // 必传\n        style={{}}\n        className=\"Features 的 className\"\n      />\n      <Cases cases={cases} style={{}} className=\"Cases 的 className\" />\n      <Companies\n        title=\"公司页面名称\" // 必传\n        companies={companies} // 必传\n        style={{}}\n        className=\"Companies 的 className\"\n      />\n    </>\n  );\n};\n```\n\n## Develop\n\n```bash\nyarn install\nyarn start\n```\n\nVisit https://localhost:8000 to preview.\n\n## Publish to npm\n\n```bash\ncd @cratosw/gatsby-antd\nnpm run release\n```\n\n## Deploy\n\n```bash\nnpm run deploy\n```\n\n> Set envoironment variable `GATSBY_PATH_PREFIX` to `/` in deploy service like netlify to preview pathPrefix site in root domain.\n\n## Add Dependency\n\n```bash\ncd @cratosw/gatsby-antd\nyarn add shallowequal\n```\n\nor\n\n```bash\nyarn workspace @cratosw/gatsby-antd shallowequal\n```\n\n## Related libraries\n\n- [Gatsby](https://www.gatsbyjs.org/docs/)\n- [Ant Design](https://github.com/ant-design/ant-design)\n- [gatsby-transformer-remark](https://www.gatsbyjs.org/packages/gatsby-transformer-remark/)\n- [gatsby-remark-prismjs](https://www.gatsbyjs.org/packages/gatsby-remark-prismjs/?=highlight#line-highlighting)\n- [Jest](https://jestjs.io/)\n- [Testing Library](https://testing-library.com/)\n- [react-i18next](https://react.i18next.com/)\n","readmeFilename":"README.md"}