"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = _default;

function _react() {
  const data = _interopRequireDefault(require("react"));

  _react = function _react() {
    return data;
  };

  return data;
}

function _assert() {
  const data = _interopRequireDefault(require("assert"));

  _assert = function _assert() {
    return data;
  };

  return data;
}

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const blacklist = ['src', 'public', 'pages', 'page', 'mock', 'config'];

function _default() {
  return {
    name: 'outputPath',

    validate(val) {
      (0, _assert().default)(typeof val === 'string', `Configure item outputPath should be String, but got ${val}.`); // 可能有 break change，等 umi@3
      // assert(!val.startsWith('/'), `The outputPath config should not start with '/'`);

      (0, _assert().default)(!blacklist.includes(val), `The outputPath config is not allowed to be set to ${val}, ${val} is convention directory`);
    },

    group: 'deploy',
    type: 'string',
    default: './dist',
    title: {
      'zh-CN': '输出路径',
      'en-US': 'Output Path'
    },
    description: {
      'zh-CN': '指定输出路径，默认是 ./dist 。',
      'en-US': 'Specify the output path.'
    }
  };
}