Comments (11)
Ok I'm already in the process of adding in the ignore option for the watch functionality. I'll PR when I got it working. Running into issues with the underlying watch library chokidar.
from dw-utils.
I would definitely be interested in accepting pull requests. I would start by updating clean
to work with multiple directories, since that would be easiest. watch will take slightly more work.
from dw-utils.
I will look into it, although it will probably have to be implemented separately for each component, so it may take a while.
from dw-utils.
I agree this feature would be a great addition here. Maybe we could contribute with a PR to help here.
from dw-utils.
plus one to this feature
from dw-utils.
This feature will be nice to have.
from dw-utils.
I have been using Demandware/SFCC's own dwupload
tool. You simply specify an array of cartridges in your dw.json
file. Does dw-util
not support this? I just started messing with it so I'm not clear on that limitation or not.
from dw-utils.
@Jakobud It does, but in a different way.
dw-utils
requires you to specify a folder where your cartridges are and it will watch for changes and upload all cartridges in that folder.
dwupload
requires you to list each cartridge you want uploaded from current folder where dw.json file is.
This issue is about dw-utils
supporting to watch/upload cartridges from multiple sources (for cases when you keep some cartridges in one GIT repo, other in other GIT repo, and so on. Feature that dwupload also does not have.
from dw-utils.
Okay that makes sense now. So if the option supported multiple relative/absolute paths to cartridges, how would that work with the clean and bulk upload functionality? Would it loop through all the cartridge paths and zip them together for a bulk upload or what?
from dw-utils.
Would it loop through all the cartridge paths and zip them together for a bulk upload or what?
Yes, that's what I would expect. So if the config.cartridges is an array (we also support it as as string as it's now so we have backwards compatibility - if having backwards compatibility is important):
- For watch, we watch all cartridges inside the sources provided in the array and just push to remote instance as we do now. Ideally with the option to ignore some paths using the glob syntax ( https://github.com/isaacs/node-glob ).
- For clean we do the same, we iterate over all sources and add cartridges we find there. Ideally we would push each cartridge as an individual zip instead of zipping all cartridges in a single huge zip as we have cases when the resulted zip is larger than 100MB and it can't be pushed to DW (due to this archaic 100MB limitation). So if cartridges are zipped and pushed individually this could be a workaround to bypass this DW limitation.
And we can also add some checks before watch and clean like to see if same cartridge exists in two places and give an error to the user. This covers cases when you keep your code in multiple GIT repos and somehow you have a cartridge with same name in two places. If we just upload it we will get unexpected side effects. So just a simple error like "Error! Cartridge app_x already exists in path/to/source1".
All the uses cases I covered above (code version bigger than 100MB, or same cartridge in multiple places) might seem strange but I encountered these issues in the past so they happen. Having support for this edge cases would make the tool work nicely for every possible use case.
from dw-utils.
Okay I got a branch done here with ignore implementation. I could use any feedback.
https://github.com/Jakobud/dw-utils/tree/feature/watch-ignore-patterns
This accepts either a --ignore
pattern or patterns listed in a standalone file: --ignore-from
option. I might pull out the ignore pattern file option though, since you can essentially do the same thing by specifying an array of patterns in the dw.json
anyways.
Let me know what you guys think.
from dw-utils.
Related Issues (20)
- Update any out of date dependencies that can be updated.
- enhancement: New upload sequence. HOT 1
- Log watcher should only show today's logs
- COMPATIBILITY 17.4: remove dependency on `PROPFIND` HOT 1
- Command activate failed HOT 6
- Add timestamp to clean 'console' output HOT 2
- Action required: Greenkeeper could not be activated 🚨
- Error when running init on node v8.7.0 HOT 4
- Error when running dw-utils clean on a folder that is not a git repo HOT 4
- Blank/empty lines are printed on the log instead of the file paths when bulk uploading HOT 6
- Does the upload work on Staging instances? HOT 1
- Add ability to specify specific cartridges HOT 12
- init does not create dw.json
- dw-utils wrongly uploading files as if they were changed while in fact was just a folder search / file selection HOT 2
- watch: Catch http error codes properly.
- Add feature to only upload only subpath
- New feature: Set active version.
- logging should default to 80 character wide terminal if no width is available.
- Resolve password entry on windows in git bash. HOT 1
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 dw-utils.