我正在运行 VS Code,目前正在尝试在我的打字稿项目上设置一些别名。
我的开发设置依赖于 nodemon 和 ts-node,代码被编译到一个 dist 文件夹。
到目前为止,我成功地让 Typescript Hero 使用别名来管理导入:
到目前为止,我的文件夹结构是:
.
??? 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) 我一直在开发一个私人存储库,该项目最初是使用一些敏感数据创建的。现在我已经有了足够的项目内容,我想在 Github 上公开它。
这项工作仍在进行中,我想避免维护两个不同的存储库。
一切都commit 29将保持同步(私人和公共)。
根据 Git 的工作方式,这似乎是不可能的(参见基于这个答案)
是否可以从我的私人存储库中摆弄 git hooks 来推送到 github ?
管理具有不同历史记录的私有和公共远程
将现有源代码导入 GitHub
将远程重置为某个提交
使用具有两个不同云的 git 分支同时维护私有和
公共存储库 GitHub:如何将公共存储库的分支设为私有?