小编Cra*_*shi的帖子

运行时未正确解析打字稿路径别名

我正在运行 VS Code,目前正在尝试在我的打字稿项目上设置一些别名。

我的开发设置依赖于 nodemon 和 ts-node,代码被编译到一个 dist 文件夹。

到目前为止,我成功地让 Typescript Hero 使用别名来管理导入:

别名解析 vscode

到目前为止,我的文件夹结构是:

.
??? src
  ???modules
  ?????Category
  ?????Ressource
  ???shared
  ?????debug

Run Code Online (Sandbox Code Playgroud)
// tsconfig.json
{
    "compilerOptions": {
        "module": "commonjs",
        "moduleResolution": "node",
        "pretty": true,
        "sourceMap": true,
        "target": "es6",
        "outDir": "./dist",
        "baseUrl": "./src",
        "paths": {
            "@shared/*": [
                "shared/*"
            ],
            "@modules/*": [
                "modules/*"
            ]
        },
        "resolveJsonModule": true,
        "esModuleInterop": true
    },
    "include": [
        "src/**/*.ts"
    ],
    "exclude": [
        "node_modules",
        "**/*.spec.ts",
        "**/*.test.ts",
    ]
}
Run Code Online (Sandbox Code Playgroud)

这是第一个失败的别名导入。

//Server.ts file
import Print from '@shared/debug/Print.class';
import App from './App';

const …
Run Code Online (Sandbox Code Playgroud)

node.js typescript visual-studio-code tsconfig-paths

5
推荐指数
5
解决办法
8401
查看次数

是否可以在具有不同提交历史记录的两个不同的远程(私有和公共)上维护相同的 git 项目?

我一直在开发一个私人存储库,该项目最初是使用一些敏感数据创建的。现在我已经有了足够的项目内容,我想在 Github 上公开它。

这项工作仍在进行中,我想避免维护两个不同的存储库。

我们的想法是
在此输入图像描述

一切都commit 29将保持同步(私人和公共)。

从我读到的

根据 Git 的工作方式,这似乎是不可能的(参见基于这个答案

是否可以从我的私人存储库中摆弄 git hooks 来推送到 github ?

所以参考文献

管理具有不同历史记录的私有和公共远程
将现有源代码导入 GitHub
将远程重置为某个提交
使用具有两个不同云的 git 分支同时维护私有和
公共存储库 GitHub:如何将公共存储库的分支设为私有?

git github

1
推荐指数
1
解决办法
275
查看次数