我有以下两个文件
./file
./file.text
./file.yo
Run Code Online (Sandbox Code Playgroud)
现在我想从 git 中排除所有这些,但我不知道如何做。像正则表达式一样思考我会这样做**/file(?:\..*),但我无法将其翻译为 gitignore。我看到有一个可选的 char 根据文档似乎是!. 但文档没有提供示例,我不确定这是否正确。
我该如何编写.gitignore一行来一次排除所有这些文件?
我在coffeescript中有2个州......
stateProvider.state 'test',
...
resolve:
user: (LongRunning)->
LongRunning.authenticate().then ->
console.log("We are authenticated!")
stateProvider.state 'test.child',
...
resolve:
other: (AfterAuth)->
AfterAuth.soSomethingWithAuth().then ->
console.log("We are done!")
Run Code Online (Sandbox Code Playgroud)
当然这不起作用,因为在解析父方法的auth方法之前启动了子解析.这意味着第二个函数将不会被验证并导致整个状态失败.
现在它不一定是状态路径的一部分,但它需要在调用resolve函数时完全完成.
在调用child中的方法之前,如何确保完全解析父函数?
坏(?)解决方案
我能够提出的一个答案是使用手动引导程序.然而,这是乏味的,因为我需要重新连接我的所有服务.无论如何我可以在Angular中做到吗?
所以我向市场发布了一个应用程序,然而,我无法通过手机找到它,我无法通过market.google.com找到它.我尝试使用我的发布帐户中的标题,并尝试使用我的清单中的包不起作用.
需要一段时间吗?
我有以下代码......
export class LoginComponent {
userName: string;
password: string;
rememberMe: boolean = false;
constructor( private auth: AuthenticationService,
private router: Router) {
...
}
...
}
Run Code Online (Sandbox Code Playgroud)
我正在尝试单元测试,但我的第一次尝试失败了....
beforeEach(() => {
router = new Router();
component = new LoginComponent(authService, router);
});
Run Code Online (Sandbox Code Playgroud)
因为它需要Router构造函数的参数.我在这看到 ......
beforeEach(() => addProviders([
APP_ROUTER_PROVIDERS, // must be first
{provide: APP_BASE_HREF, useValue: '/'}, // must be second
{provide: ActivatedRoute, useClass: Mock},
{provide: Router, useClass: Mock}
]));
Run Code Online (Sandbox Code Playgroud)
但我似乎没有APP_ROUTER_PROVIDERS或Mock依赖于任何地方,所以我认为它可能是陈旧的(或者我需要依赖).
我该如何嘲笑这个?它对我正在进行的测试并不重要.
karma-jasmine angular2-routing angular2-testing angular2-router3 angular
TSLint需要这样的导入...
import { RouterModule } from "@angular/router";
但是,我的IDE会像这样导入所有内容...
import {RouterModule} from "@angular/router";
现在,我确定可以配置IDE来更改此设置,但是关闭该规则似乎更容易。但是,我不熟悉掉毛,也不确定在哪里可以找到禁用的正确规则。我仍然想要对空白(属性等)进行一些强制实施,但不是这样。
仅关闭此规则的正确设置是什么?
我有一个运行gradle build这样的脚本......
$HOME_DIR$CODE_DIR/gradlew -p $HOME_DIR$CODE_DIR build
Run Code Online (Sandbox Code Playgroud)
当我定期运行./start.local.sh它时,它工作正常。但是当我尝试像nohup ./start.local.sh &我一样使用 nohup 时......
Exception in thread "DisconnectableInputStream source reader" org.gradle.api.UncheckedIOException: java.io.IOException: Bad file descriptor
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:57)
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:40)
at org.gradle.util.DisconnectableInputStream$1.run(DisconnectableInputStream.java:125)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.io.IOException: Bad file descriptor
Run Code Online (Sandbox Code Playgroud)
我错过了什么?
目前,我在 datasource.properties 文件中有以下内容用于本地连接到数据源...
//datasource.properties
spring.datasource.password=${DB_PASSWORD}
Run Code Online (Sandbox Code Playgroud)
这对于本地来说非常有用,但现在我正在尝试创建一个 docker 映像。为了存储数据,我宁愿使用秘密而不是环境变量(或者甚至可能是秘密然后是未找到的环境变量)。我当前在本地 docker 映像中设置了秘密,但我无法弄清楚如何使用代码而不是属性来设置 spring.datasource.password 。
如何使用 docker 秘密设置“spring.datasource.password”?
我正在使用 Vuetify1.5.18并具有以下代码...
import Vuetify from 'vuetify'
...
// rollup config
import VuePlugin from 'rollup-plugin-vue';
import css from 'rollup-plugin-css-only';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import pkg from './package.json';
// const external = Object.keys(pkg.dependencies);
const plugins = [
resolve({
module: true,
main: true
}),
commonjs(),
VuePlugin(),
css()
];
module.exports = {
plugins,
input: 'src/index.js',
output: {
file: 'dist/index.js',
format: 'esm'
}
};
Run Code Online (Sandbox Code Playgroud)
但是当我运行rollup时,我在输出中得到以下内容...
import vue from 'vue';
Run Code Online (Sandbox Code Playgroud)
当我尝试运行时,出现以下错误...
无法解析模块说明符“vue”。相对引用必须以“/”、“./”或“../”开头。`
我不是在 UI 项目中而是在我的服务器中像这样加载 Vue...
// Footer.pug …Run Code Online (Sandbox Code Playgroud) 我有一个 Web 组件,它的模板如下所示......
<template>
<div class="jrg-app-header">
<slot name="jrg-app-header-1"></slot>
<slot name="jrg-app-header-2"></slot>
<slot name="jrg-app-header-3"></slot>
</div>
</template>
Run Code Online (Sandbox Code Playgroud)
我基本上是想将最后一个插槽的内容设置为flex:1;时尚。有 CSS 查询可以做到这一点吗?我尝试了一些清单
::slotted(*):last-child{
flex:1;
}
Run Code Online (Sandbox Code Playgroud)
但这没有用。如何设置最后一个开槽对象的样式?
我的 package.json 中有以下内容...
"lint:fix": "node --experimental-json-modules ./node_modules/.bin/eslint **/*.mjs --fix"
Run Code Online (Sandbox Code Playgroud)
我的代码中包含以下内容
import pkgjson from "../package.json" assert { type: 'json' };
Run Code Online (Sandbox Code Playgroud)
但是当我运行 lint 命令时,我看到......
1:39 error Parsing error: Unexpected token assert
Run Code Online (Sandbox Code Playgroud)
如何将 json 导入与 eslint 结合使用?
node.js ×2
android ×1
angular ×1
angular-ui ×1
angularjs ×1
coffeescript ×1
css ×1
docker ×1
ecmascript-6 ×1
eslint ×1
git ×1
gradle ×1
javascript ×1
nohup ×1
rollup ×1
spring ×1
spring-boot ×1
tslint ×1
typescript ×1
vue.js ×1