Comments (6)
I only need every file in srcDir to be copied into outDir and not any folder within
Sample source dir:
/dir/file1
/dir/dir/file2
/file3
Sample out dir:
/file1
/file2
/file3
Without knowing too much about your application, I'm assuming you want this^ type of file structure. The thing is that other people might have different use cases where they do need nested folders.
I actually don't understand the importance of using the .nw folder
https://nwjs.readthedocs.io/en/latest/For%20Users/Package%20and%20Distribute/#package-your-app
from nw-builder.
You are correct in what I need. Understood, but I think the production code still has an issue in line 47, since splice(2)
is assuming that srcDir
lives in the home directory, which is usually two levels down from root dir. If I understand correctly, the expected behavior here is to preserve the folder structure in srcDir
and copy recursively to package.nw
in outDir
. I should be able to find a way to do that.
Thanks for the pointer regarding the .nw folder! The only file that I need to copy into the NW.js binaries folder is package.json so I never paid much attention to that section of the doc.
from nw-builder.
Understood, but I think the production code still has an issue in line 47, since splice(2) is assuming that srcDir lives in the home directory, which is usually two levels down from root dir.
I think you are right. I made a small change (available in v4.1.1) but I think that is also incorrect.
from nw-builder.
@williamwang96 the linked PR should fix the issue. The changelog would be the best place to see what has changed.
from nw-builder.
Thanks for the work. However, I think the issue still exists.
Lines 39 to 52 in 7336912
This works for srcDir
that's located in root dir, but not other cases. Since files
in line 40 are from srcDir
, it would copy each file with its absolute path to outDir
.
For example, if
srcDir
is/home/users/williamwang96/project/desktop/installer
ourDir
is/home/users/williamwang96/project/desktop/installer/build-output
Then the package.json
in srcDir
will be copied to /home/users/williamwang96/project/desktop/installer/build-output/home/users/williamwang96/project/desktop/installer/package.json
.
I believe what we need in line 49 is the relative path of file
to srcDir
.
from nw-builder.
I believe what we need in line 49 is the relative path of file to srcDir.
Open to PR
from nw-builder.
Related Issues (20)
- The files in package.nw folder with the latest version is incorrect. HOT 4
- Confusing debug message shown if `srcDir/package.json` doesn't include `nwbuild` property
- Cache never expires HOT 3
- Not handling missing version in `manifest.json` HOT 1
- Copying of files does not work HOT 4
- Windows builds fail with "resolve is not defined" HOT 1
- Error: package.json not found in srcDir file glob patterns. HOT 5
- File globbing is broken HOT 1
- Add Typescript support HOT 19
- FFMPEG: Connection Refused HOT 2
- Managed manifest
- Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/my-path/nw-app/node_modules/nw-builder/get/decompress.js' HOT 3
- Specify log level
- Glob Issue: cp EINVAL src and dest is same HOT 10
- Bug: building win64 produces undefined.exe. HOT 3
- Bug: osx64 build can't be signed - nwjs bundle format unrecognized HOT 4
- Win64 build icon not showing up HOT 25
- NSIS Installer HOT 1
- AppImage Installer HOT 1
- Compress `outDir` to `zip`, `tar`, `tgz` formats
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nw-builder.