【发布时间】:2019-02-16 13:44:10
【问题描述】:
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\reactify-ui\build\static\js\*中的内容替换\reactify\src\staticfiles\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.
为什么复制文件不起作用?
【问题讨论】: