Django 2.0、Node.js 8.11.4
我有一个格式为 djanog 的项目:
reactify/
└── src/
├── reactify-ui/
| ├── build/
| | └── static/
| | └── js/
| | └── main.3425.js
| └── package.json
└── staticfiles/
└── js/
└── reactify-django-us.js
我想用里面的内容\reactify\src\staticfiles\js
替换\reactify\src\reactify-ui\build\static\js\*
我的packages.json
长相是这样的
"scripts": {
...
"copy-build-js": "copyfiles -f 'build/static/js/*.js' '../staticfiles/js/'",,
...
}
当我运行时,npm copy-build-js
我得到以下输出:
> reactify-ui@0.1.0 copy-build-js C:\Users\Owner\dev\reactifydjango\src\reactify-ui
> copyfiles -f 'build/static/js/*.js' '../staticfiles/js/'
看起来它可以工作,但是当我检查目标位置中的文件时../staticfiles/js/
,它并没有改变。我通过以下方式验证它
changing the file before I run the command,
do an `ls -lrth` to get the timetamp,
wait a minute so the timestamp changes,
run the command `npm copy-build-js`,
and then doing an `ls -lrth` on the target location and seeing that the timestamp isn't post hasn't changed.
I also look at the file and it is the same.
为什么复制文件不起作用?