gulp-tasks | gulp-tasks-build | Build Tool library
kandi X-RAY | gulp-tasks Summary
kandi X-RAY | gulp-tasks Summary
gulp-tasks-build
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gulp-tasks
gulp-tasks Key Features
gulp-tasks Examples and Code Snippets
Community Discussions
Trending Discussions on gulp-tasks
QUESTION
I'm using Gulp in multiple Git repositories to build NPM packages. I don't want the Gulp tasks duplicated across each repository so I created a separate package to store the common Gulp logic. I'm also using @babel/preset-env
to transpile gulpfile.babel.js
to be able to use ES2015.
npm link
commands excluded for brevity.
ANSWER
Answered 2021-Mar-05 at 13:50Interestingly enough, this seems to only happen when using npm link
. I published the package containing the gulp tasks and the issue went away once I installed the version from the repository. Now I'm guessing this has to do with the @babel/register
ignore
regex I'm using. Nonetheless, I'm satisfied with it only working from the installed package since my primary concern was troubleshooting in a CI environment if a task fails.
QUESTION
I am trying to compile the scss theme with gulp on Ubuntu 18.04 OS and I get this error:
...ANSWER
Answered 2020-Feb-02 at 13:37To solve this problem I had to install libnotify-bin
:
QUESTION
I am having a similar issue as the question posted here but none of the answers given there apply to my situation.
When I run the one and only task defined in my Gulpfile.js file it is getting executed twice.
I am using Gulp version 4.0.2
This is the contents of my Gulpfile.js file:
...ANSWER
Answered 2019-Oct-09 at 07:47Your task isn't running twice, it just seems like it does because you're using gulp.series
.
gulp.series
and gulp.parallel
are normally used to combine and compose tasks into larger operations. If, for example, you'd have a jsTaskFunc
as well, you could create a task build
like so:
QUESTION
Trying to pin down the source of this error when running jest:
...ANSWER
Answered 2018-May-22 at 17:43Updating jest and jest-cli to the following fixed the issue:
QUESTION
Recently I unignored composer.lock along with package-lock.json (likely unrelated), and I changed our gulp deploy script to use composer install instead of composer update. Before pushing new code to prod servers I updated the lock files to the latest using composer update and npm update to make sure there was nothing weird in there from branch merges.
However the gulp deployment script hit various issues, the most problematic of which was: "Requirements could not be resolved to an installable set of packages"
gulp-tasks/deploy.js in its current state:
...ANSWER
Answered 2018-Oct-15 at 09:45You should install and enable php-soap extension.
QUESTION
I've got a gulp task that loops through a folder looking for sub folders and outputs a JavaScript file based upon the contents of each folder. Below is a more visual example.
- src
- assets
- scripts
- critical
- loadCSS.init.js
- legacy
- flexibility.init.js
- picturefill.init.js
- modern
- connectivity.js
- layzr.init.js
- menu_list.js
- scroll-hint.init.js
- slideout.init.js
- swiper.init.js
- service-worker
- service-worker.js
- critical
- scripts
- assets
becomes:
- dev
- assets
- scripts
- critical.js
- legacy.js
- modern.js
- service-worker.js
- scripts
- assets
This is achieved by reading the contents of the src/assets/scripts
directory, then running a loop against each folder (critical
, legacy
, modern
, service-worker
) and sending the contents of each folder to a Gulp tasks which get merged together with merge-stream.
All this works great, except that once the tasks are merged back together, I want to trigger a notification if the compilation succeeded. If I try to pipe anything to the merged streams, it doesn't work. It just returns the merged streams, and never continues on.
If I un-promisify my PROCESS_SCRIPTS
function and don't use merge-stream (i.e. only processing one manually specified folder), it works fine, so I'm at a loss as to what's going on.
Here's my full task:
...ANSWER
Answered 2018-Oct-08 at 20:28There are many problems with the code above. One major issue that makes the code hard to follow and debug is that you use new Promise
where you don't need it. Generally, if you have new Promise
and the logic inside the promise executor will resolve or reject depending on the result of another promise, then you don't need to use new Promise
.
Sometimes people have code like this:
QUESTION
I've created a script that loops through a bunch of folders and processes them each in to webpack bundles. This works great, except that I can't figure out why the Promise
around the loop isn't resolving.
Some things I've tried:
- If I put a
console.log("hello world")
just beforeresolve()
, within the} else { ... }
, it outputs the log. - If I move
resolve()
out of the} else { ... }
, it resolves, but the rest of my gulp task doesn't continue (separate, but related, issue).
I would appreciate some help in figuring this out. Most relevant chunk of code is below, the rest of it's at the link below.
...ANSWER
Answered 2018-Sep-13 at 17:21I think the issue has to do with the way you are making the recursive call.
Try making it
QUESTION
I currently have a build definition in place to build my project and publish my files for release. My project relies on a bit of NPM to do some automation using Gulp.js. I dont need it for anything else once my gulp-tasks have run.
When I get to my publish artifacts
step, it publishes all of the files in the node_modules
directory even though I don't even have them in my repo. I was wondering if there was a way to exclude them from within the contents section or if anyone else has a better idea?
Here is my Publish Artifacts settings:
In the Contents section, I also tried:
...ANSWER
Answered 2017-Aug-21 at 03:45Since Copy and Publish Build Artifacts task is deprecated now, you’d better use Copy Files task and Publish Build Artifacts task instead. And these two tasks can help you exclude node_modules
folder from publishing to server. Detail settings as below:
Source Folder: $(Build.SourcesDirectory)
Contents:
QUESTION
I have a gulp task that downloads a few JSON files from GitHub, then prompts the user for values to replace in those files. For example, I have an .ftpconfig
that gets download, and then the user is asked to enter hostname, username, password, and path.
Because the file first needs to be downloaded before it can be configured, and each file needs to be configured sequentially, I'm using quite a few nested callbacks. I'd like to change this "callback hell" system so that it utilizes async/await and/or promises instead, but I'm having a lot of difficulty understanding exactly why my code isn't working; it seems that promises fire their .then()
functions asynchronously, which doesn't make sense to me.
My goals are as follows:
- Download all config files asynchronously
- Wait for all config files to finish downloading
- Read existing settings from the config files
- Prompt the user for changed settings in each config file synchronously
I've tried a number of approaches, none of which worked. I discarded the code I've used, but here's a rough recreation of the things I've tried:
Attempt #1:
...ANSWER
Answered 2018-Apr-10 at 16:38Thanks to @EricB, I was able to figure out what I was doing wrong. It was mostly a matter of making my functions return promises as well.
QUESTION
I have used the theme-generator to create a fresh theme.
Now I've created a second theme in the same directory and tried to set it's base/parent theme using gulp extend
as explained on these pages:
https://github.com/liferay/liferay-theme-tasks https://dev.liferay.com/de/develop/reference/-/knowledge_base/7-0/theme-gulp-tasks
After running the command and choosing option 1)
to extend the Base Theme , I get the following options:
- Styled
- Unstyled
- Search globally installed npm modules (development purposes only)
- Search npm registry (published modules)
No matter if I choose 3)
or 4)
I cannot find the theme package.
Do I really have to publish the theme to npm to be able to find it?
...ANSWER
Answered 2017-Aug-24 at 09:36Following this explanation I could achieve it using npm link
:
Excerpt:
npm link: symbolic links to the rescue Fortunately npm provides a tool to avoid this tedium. And it's easy to use. But there's a catch.
Here's how it's supposed to work:
cd to src/appy
Run "npm link". This creates a symbolic link from a global folder to the src/appy folder.
cd to src/mysite
Run "npm link appy". This links "node_modules/appy" in this particular project to the global folder, so that "require" calls looking for appy wind up loading it from your development folder, src/appy.
Mission accomplished... almost. If you installed Node in a typical way, using MacPorts or Ubuntu's apt-get, then npm's "global" folders are probably in a location shared system-wide, like /opt/local/npm or /usr/lib/npm. And this is not good, because it means those "npm link" commands are going to fail unless you run them as root.
EDIT: I was wrong to make a npm package out of it when you can also just require it locally. Even relative paths work. Example:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gulp-tasks
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page