test-temp-npm-demo 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +6 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  import shell from 'shelljs'
2
2
 
3
- setTimeout(() => {
4
- console.log(shell.ls('-l').stdout)
3
+ setTimeout(() => {// 指定文件名和内容
4
+ const fileName = 'example.txt';
5
+ const fileContent = 'Hello, this is some content for the file.';
6
+
7
+ // 使用 shell.echo 写入内容并重定向到文件
8
+ shell.echo(fileContent).to(fileName);
5
9
  }, 1);
6
10
 
7
11
  const test = true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-temp-npm-demo",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "publish npm test",
5
5
  "main": "index.js",
6
6
  "type": "module",