@omni-door/tpl-component-library-react
Version:
The React component-library-react project template
9 lines (8 loc) • 4.35 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var utils_1 = require("@omni-door/utils");
var tpl = "`${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 dev: {\n port: 6200, // \u5F00\u53D1\u670D\u52A1\u7AEF\u53E3\u53F7 (dev-server port)\n // host: 'dev.domain.com', // \u5F00\u53D1\u670D\u52A1\u7AEFhost (dev-server host)\n serverType: '${devServer}' // \u5F00\u53D1\u670D\u52A1\u7C7B\u578B (dev-server type)\n },\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 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}, // \u6784\u5EFA\u65F6\u662F\u5426\u5904\u7406ts\u6216tsx\u6587\u4EF6 (whether or not process the ts or tsx files)\n test: ${!!test}, // \u6784\u5EFA\u65F6\u662F\u5426\u8FDB\u884C\u5355\u5143\u6D4B\u8BD5 (whether or not process unit-test)\n eslint: ${!!eslint}, // \u6784\u5EFA\u65F6\u662F\u5426\u8FDB\u884Ceslint\u68C0\u6D4B (whether or not process eslint fix and check)\n prettier: ${!!prettier}, // \u6784\u5EFA\u65F6\u662F\u5426\u8FDB\u884Cprettier\u68C0\u6D4B (whether or not process prettier checking)\n stylelint: ${!!stylelint}, // \u6784\u5EFA\u65F6\u662F\u5426\u8FDB\u884Cstylelint\u68C0\u6D4B (whether or not process style lint check)\n }\n },\n\n release: {\n git: '${git}', // \u53D1\u5E03\u7684git\u4ED3\u5E93\u5730\u5740 (project git repo url)\n npm: '${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 prettier: ${!!prettier}, // \u53D1\u5E03\u524D\u662F\u5426\u8FDB\u884Cprettier\u68C0\u6D4B (whether or not process prettier checking)\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\u884Ccommitlint\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\n // \u662F\u5426\u521B\u5EFAts\u6587\u4EF6 (whether or not generate typescript)\n typescript: ${!!ts},\n\n // \u662F\u5426\u521B\u5EFA\u5355\u5143\u6D4B\u8BD5\u6587\u4EF6 (whether or not generate unit test frame)\n test: ${!!test},\n\n // \u6837\u5F0F\u6587\u4EF6\u7C7B\u578B (stylesheet type)\n stylesheet: '${style === 'all' ? 'scss' : style}',\n\n // [\u662F\u5426\u751F\u6210ReadMe\u6587\u4EF6, \u521B\u5EFAmd \u6216 mdx\u6587\u4EF6] ([whether or not README.md, generate mdx or md file])\n readme: [true, ${devServer === 'docz' ? \"'mdx'\" : \"'md'\"}]\n },\n\n plugins: []\n};\n`";
exports.tpl_omni = {
tpl: tpl
};
exports.default = utils_1.tpl_engine_init(exports.tpl_omni, 'tpl');