module.exports = (api, options) => {
  api.render('./template', { foo: 'foo', bar: 'bar' });

  // 这里补充 pkg.json 文件，使项目完整

  api.extendPackage({
    scripts: {
      dev: 'cross-env MY_ENV=test vue-cli-service serve',
      'dev:test': 'cross-env MY_ENV=test vue-cli-service serve',
      'dev:prod': 'cross-env MY_ENV=prod vue-cli-service serve',
      build: 'cross-env MY_ENV=test vue-cli-service build --no-module',
      'build:test': 'cross-env MY_ENV=test vue-cli-service build --no-module',
      'build:prod': 'cross-env MY_ENV=prod vue-cli-service build --no-module',
      prettier:
        "prettier --check './src/**/*.{ts,tsx,js,jsx,vue,json,md,css,less,scss}' --ignore-unknown --no-error-on-unmatched-pattern",
      'prettier:fix':
        "prettier --write './src/**/*.{ts,tsx,js,jsx,vue,json,md,css,less,scss}' --ignore-unknown --no-error-on-unmatched-pattern",
      lint: "eslint './src/**/*.{ts,tsx,js,jsx,vue}'",
      'lint:fix': "eslint --fix './src/**/*.{ts,tsx,js,jsx,vue}'"
    },
    dependencies: {
      '@kt/request': '^1.1.0',
      '@kt/unity-antd-empty': '^1.12.3',
      '@kt/unity-antd-form': '^1.12.3',
      '@kt/unity-antd-modal': '^1.12.3',
      '@kt/unity-antd-table': '^1.12.3',
      '@kt/unity-antd-theme': '^1.12.3',
      '@kt/unity-antd-twice': '^1.12.3',
      '@kt/unity-components': '^1.12.3',
      '@kt/unity-hooks': '^1.12.3',
      '@kt/unity-micro-app-resource': '^1.12.3',
      '@kt/unity-table-layout': '^1.12.3',
      '@kt/unity-utils': '^1.12.3',
      '@micro-zoe/micro-app': '^0.8.4',
      'ant-design-vue': '^3.2.9',
      'core-js': '^3.8.3',
      dayjs: '^1.11.6',
      pinia: '^2.0.14',
      vue: '^3.2.13',
      'vue-i18n': '^9.1.10',
      'vue-router': '^4.0.3'
    },
    devDependencies: {
      '@kt/unity-tailwind-plugin': '^1.12.3',
      '@kt/unity-tailwind-preset': '^1.12.3',
      '@typescript-eslint/eslint-plugin': '^5.4.0',
      '@typescript-eslint/parser': '^5.4.0',
      '@vue/cli-plugin-babel': '~5.0.0',
      '@vue/cli-plugin-eslint': '~5.0.0',
      '@vue/cli-plugin-router': '~5.0.0',
      '@vue/cli-plugin-typescript': '~5.0.0',
      '@vue/cli-service': '~5.0.0',
      '@vue/eslint-config-typescript': '^9.1.0',
      'babel-plugin-import': '^1.13.5',
      'cross-env': '^7.0.3',
      eslint: '^7.32.0',
      'eslint-config-prettier': '^8.3.0',
      'eslint-plugin-prettier': '^4.0.0',
      'eslint-plugin-vue': '^8.0.3',
      less: '^4.0.0',
      'less-loader': '^8.0.0',
      prettier: '^2.4.1',
      tailwindcss: '^3.1.4',
      typescript: '~4.5.5'
    }
  });

  // api.extendPackage({
  //   scripts: {
  //     serve: 'vue-cli-service serve',
  //     build: 'vue-cli-service build'
  //   },
  //   browserslist: ['> 1%', 'last 2 versions', 'not dead', 'not ie 11']
  // });
};
