如何更新json文件中的值并通过node.js保存?我有文件内容:
var file_content = fs.readFileSync(filename);
var content = JSON.parse(file_content);
var val1 = content.val1;
Run Code Online (Sandbox Code Playgroud)
现在我想更改值val1
并将其保存到文件中.
我正在使用maven-surefire-report-plugin来生成单元测试报告.这工作正常,但报告包含未显示图像的链接.如何让maven复制报告所需的图标?我应该用皮肤吗?我尝试了没有成功.这是maven-surefire-report-plugin定义:
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.16</version>
<configuration>
<showSuccess>true</showSuccess>
</configuration>
</plugin>
</plugins>
</reporting>
Run Code Online (Sandbox Code Playgroud)
我试图添加皮肤插件,但它不会影响报告:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.maven.skins</groupId>
<artifactId>maven-application-skin</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</plugin>
Run Code Online (Sandbox Code Playgroud)
用图像呈现报告缺少什么?