UNPKG

@omni-door/tpl-component-library-react

Version:
7 lines (6 loc) 4.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = (function (config) { var project_type = config.project_type, ts = config.ts, test = config.test, eslint = config.eslint, commitlint = config.commitlint, style = config.style, stylelint = config.stylelint, mdx = config.mdx; return "'use strict';\n\nconst path = require('path');\n\nmodule.exports = {\n type: '" + project_type + "', // \u9879\u76EE\u7C7B\u578B\uFF0C\u8BF7\u52FF\u4EFB\u610F\u53D8\u52A8 (project type, please don't modify)\n\n build: {\n // \u6784\u5EFA\u5B8C\u6210\u540E\u662F\u5426\u81EA\u52A8\u53D1\u5E03 (auto release project after build success)\n autoRelease: false,\n\n // \u8F93\u5165\u8DEF\u5F84 (the build source directory)\n // \u52A1\u5FC5\u4F7F\u7528\u7EDD\u5BF9\u8DEF\u5F84 (must be a absolute path)\n srcDir: path.resolve('src/components'),\n\n // \u8F93\u51FA\u8DEF\u5F84 (the directory for compiled project)\n // \u52A1\u5FC5\u4F7F\u7528\u7EDD\u5BF9\u8DEF\u5F84 (must be a absolute path)\n outDir: path.resolve('lib'),\n\n // es6 module\u8F93\u51FA\u8DEF\u5F84 (es6 module compiled directory)\n // \u52A1\u5FC5\u4F7F\u7528\u7EDD\u5BF9\u8DEF\u5F84 (must be a absolute path)\n esmDir: path.resolve('es'),\n\n reserve: {\n style: " + (style ? true : false) + ", // \u6784\u5EFA\u7ED3\u679C\u662F\u5426\u4FDD\u7559\u6837\u5F0F\u6587\u4EF6 (whether or not reserve the stylesheet files)\n assets: [] // \u6784\u5EFA\u7ED3\u679C\u4FDD\u7559\u5176\u4ED6\u8D44\u6E90\u7684\u8DEF\u5F84 (reserve other asset paths)\n },\n\n preflight: {\n typescript: " + !!ts + ", // \u662F\u5426\u5904\u7406ts\u6216tsx\u6587\u4EF6 (whether or not process the ts or tsx files)\n test: " + !!test + ", // \u662F\u5426\u8FDB\u884C\u5355\u5143\u6D4B\u8BD5 (whether or not process unit-test)\n eslint: " + !!eslint + ", // \u662F\u5426\u8FDB\u884Ceslint\u68C0\u6D4B (whether or not process eslint fix and check)\n stylelint: " + !!stylelint + ", // \u662F\u5426\u8FDB\u884Cstylelint\u68C0\u6D4B (whether or not process style lint check)\n }\n },\n\n release: {\n git: '', // \u53D1\u5E03\u7684git\u4ED3\u5E93\u5730\u5740 (project git repo url)\n npm: '', // \u53D1\u5E03\u7684npm\u4ED3\u5E93\u5730\u5740 (npm depository url)\n preflight: {\n test: " + !!test + ", // \u53D1\u5E03\u524D\u662F\u5426\u8FDB\u884C\u5355\u5143\u6D4B\u8BD5 (whether or not process unit-test)\n eslint: " + !!eslint + ", // \u53D1\u5E03\u524D\u662F\u5426\u8FDB\u884Ceslint\u68C0\u6D4B (whether or not process eslint fix and check)\n stylelint: " + !!stylelint + ", // \u53D1\u5E03\u524D\u662F\u5426\u8FDB\u884Cstylelint\u68C0\u6D4B (whether or not process style lint check)\n commitlint: " + !!commitlint + ", // \u53D1\u5E03\u524D\u662F\u5426\u8FDB\u884C\u5355\u5143\u6D4B\u8BD5commitlint\u68C0\u6D4B (whether or not process commit lint check)\n branch: 'master' // \u53D1\u5E03\u524D\u8FDB\u884C\u5206\u652F\u68C0\u6D4B\uFF0C\u8BBE\u7F6E\u4E3A\u7A7A\u5B57\u7B26\u4E32\u5219\u4E0D\u4F1A\u68C0\u6D4B (only can release in this branch, set empty string to ignore this check)\n }\n },\n\n template: {\n // \u751F\u6210\u6A21\u677F\u7684\u6839\u8DEF\u5F84 (the root directory for generate template)\n // \u52A1\u5FC5\u4F7F\u7528\u7EDD\u5BF9\u8DEF\u5F84 (must be a absolute path)\n root: path.resolve('src/components'),\n typescript: " + !!ts + ", // \u662F\u5426\u521B\u5EFAts\u6587\u4EF6 (whether or not generate typescript)\n test: " + !!test + ", // \u662F\u5426\u521B\u5EFA\u5355\u5143\u6D4B\u8BD5\u6587\u4EF6 (whether or not generate unit test frame)\n stylesheet: '" + (style === 'all' ? 'scss' : style) + "', // \u6837\u5F0F\u6587\u4EF6\u7C7B\u578B (stylesheet type)\n readme: [true, " + (mdx ? '\'mdx\'' : '\'md\'') + "] // [\u662F\u5426\u751F\u6210ReadMe\u6587\u4EF6, \u521B\u5EFAmd \u6216 mdx\u6587\u4EF6] ([whether or not README.md, generate mdx or md file])\n },\n\n plugins: []\n};"; });