编译选项
This commit is contained in:
parent
9ac7d8e180
commit
3cca1d842f
|
|
@ -1,10 +1,8 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const tslib_1 = require("tslib");
|
||||
const tip_style_1 = require("./tip-style");
|
||||
const cross_spawn_1 = __importDefault(require("cross-spawn"));
|
||||
const cross_spawn_1 = tslib_1.__importDefault(require("cross-spawn"));
|
||||
async function build(cmd) {
|
||||
if (!cmd.target) {
|
||||
(0, tip_style_1.Error)(`${(0, tip_style_1.error)(`Please add --target web or --target mp or --target wechatMp to he command`)}`);
|
||||
|
|
|
|||
|
|
@ -1,18 +1,16 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.update = exports.create = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
const file_handle_1 = require("./file-handle");
|
||||
const enum_1 = require("./enum");
|
||||
const config_1 = require("./config");
|
||||
const template_1 = require("./template");
|
||||
const path_1 = require("path");
|
||||
const inquirer_1 = __importDefault(require("inquirer"));
|
||||
const axios_1 = __importDefault(require("axios"));
|
||||
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
||||
const axios_1 = tslib_1.__importDefault(require("axios"));
|
||||
const tip_style_1 = require("./tip-style");
|
||||
const shelljs_1 = __importDefault(require("shelljs"));
|
||||
const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
|
||||
const prompt = [
|
||||
{
|
||||
type: 'input',
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import { PathLike } from 'fs';
|
||||
import { checkFileExistsAndCreateType } from './enum';
|
||||
/**
|
||||
|
|
|
|||
12
lib/index.js
12
lib/index.js
|
|
@ -1,14 +1,12 @@
|
|||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const commander_1 = __importDefault(require("commander"));
|
||||
const tslib_1 = require("tslib");
|
||||
const commander_1 = tslib_1.__importDefault(require("commander"));
|
||||
const create_1 = require("./create");
|
||||
const build_1 = __importDefault(require("./build"));
|
||||
const make_1 = __importDefault(require("./make"));
|
||||
const run_1 = __importDefault(require("./run"));
|
||||
const build_1 = tslib_1.__importDefault(require("./build"));
|
||||
const make_1 = tslib_1.__importDefault(require("./make"));
|
||||
const run_1 = tslib_1.__importDefault(require("./run"));
|
||||
const config_1 = require("./config");
|
||||
const tip_style_1 = require("./tip-style");
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const tslib_1 = require("tslib");
|
||||
const tip_style_1 = require("./tip-style");
|
||||
const cross_spawn_1 = __importDefault(require("cross-spawn"));
|
||||
const cross_spawn_1 = tslib_1.__importDefault(require("cross-spawn"));
|
||||
async function make() {
|
||||
(0, tip_style_1.Success)(`${(0, tip_style_1.success)(`build oak-app-domain`)}`);
|
||||
// ts-node scripts/build-app-domain & npm link ./app-domain
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const tslib_1 = require("tslib");
|
||||
const tip_style_1 = require("./tip-style");
|
||||
const cross_spawn_1 = __importDefault(require("cross-spawn"));
|
||||
const cross_spawn_1 = tslib_1.__importDefault(require("cross-spawn"));
|
||||
async function run(options) {
|
||||
if (options.initialize) {
|
||||
(0, tip_style_1.Success)(`${(0, tip_style_1.success)('初始化数据库中……')}`);
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.startup = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
/// <reference path="../typings/polyfill.d.ts" />
|
||||
require("./polyfill");
|
||||
const koa_1 = __importDefault(require("koa"));
|
||||
const koa_router_1 = __importDefault(require("koa-router"));
|
||||
const koa_body_1 = __importDefault(require("koa-body"));
|
||||
const koa_1 = tslib_1.__importDefault(require("koa"));
|
||||
const koa_router_1 = tslib_1.__importDefault(require("koa-router"));
|
||||
const koa_body_1 = tslib_1.__importDefault(require("koa-body"));
|
||||
const oak_backend_base_1 = require("oak-backend-base");
|
||||
const types_1 = require("oak-domain/lib/types");
|
||||
async function startup(path, contextBuilder, dbConfig, connector) {
|
||||
|
|
|
|||
|
|
@ -188,6 +188,7 @@ function tsConfigJsonContent() {
|
|||
"target": "es5",
|
||||
"allowJs": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"importHelpers": true,
|
||||
"esModuleInterop": true,
|
||||
"experimentalDecorators": true,
|
||||
"skipLibCheck": true,
|
||||
|
|
@ -240,6 +241,7 @@ function tsConfigMpJsonContent() {
|
|||
"target": "es5",
|
||||
"allowJs": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"importHelpers": true,
|
||||
"esModuleInterop": true,
|
||||
"experimentalDecorators": true,
|
||||
"strict": true,
|
||||
|
|
@ -277,6 +279,7 @@ function tsConfigWebJsonContent() {
|
|||
"target": "es5",
|
||||
"allowJs": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"importHelpers": true,
|
||||
"esModuleInterop": true,
|
||||
"experimentalDecorators": true,
|
||||
"strict": true,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.warn = exports.primary = exports.error = exports.success = exports.Warn = exports.Start = exports.Error = exports.Success = void 0;
|
||||
const chalk_1 = __importDefault(require("chalk"));
|
||||
const consola_1 = __importDefault(require("consola"));
|
||||
const tslib_1 = require("tslib");
|
||||
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
||||
const consola_1 = tslib_1.__importDefault(require("consola"));
|
||||
// tip type
|
||||
const Success = (content) => consola_1.default.success(content);
|
||||
exports.Success = Success;
|
||||
|
|
|
|||
|
|
@ -194,6 +194,7 @@ export function tsConfigJsonContent() {
|
|||
"target": "es5",
|
||||
"allowJs": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"importHelpers": true,
|
||||
"esModuleInterop": true,
|
||||
"experimentalDecorators": true,
|
||||
"skipLibCheck": true,
|
||||
|
|
@ -246,6 +247,7 @@ export function tsConfigMpJsonContent() {
|
|||
"target": "es5",
|
||||
"allowJs": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"importHelpers": true,
|
||||
"esModuleInterop": true,
|
||||
"experimentalDecorators": true,
|
||||
"strict": true,
|
||||
|
|
@ -283,6 +285,7 @@ export function tsConfigWebJsonContent() {
|
|||
"target": "es5",
|
||||
"allowJs": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"importHelpers": true,
|
||||
"esModuleInterop": true,
|
||||
"experimentalDecorators": true,
|
||||
"strict": true,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
// "checkJs": true, /* Report errors in .js files. */
|
||||
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
||||
"declaration": true, /* Generates corresponding '.d.ts' file. */
|
||||
"importHelpers": true,
|
||||
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
||||
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
||||
// "outFile": "./", /* Concatenate and emit output to single file. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue