gulp-css | Using Gulp.js for CSS tasks | Frontend Framework library
kandi X-RAY | gulp-css Summary
kandi X-RAY | gulp-css Summary
Using Gulp.js for CSS tasks
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Compile CSS files .
- Watch files for changes
- Compile images .
- Delete build
- start browser synchronously
gulp-css Key Features
gulp-css Examples and Code Snippets
Community Discussions
Trending Discussions on gulp-css
QUESTION
After changing gulp 3 to 4 I receive the error when I try to run gulp build
:
ANSWER
Answered 2021-Nov-29 at 16:38In copy:css
you have this line:
paths.src.base + '/assets/css/argon.css'
where apparently your error is. The problem is your paths.src.base
is defined as
base: './'
to which you are adding /assets/css/argon.css
so you end up with
.//assets/css/argon.css
note the two leading backslashes.
Get rid of the leading backslash in the /assets/...
and check the rest of your code for the same problem.
Also since you are using gulp4 get rid of runSequence
- look at the documentation for gulp.series
.
QUESTION
I am relatively new to using Gulp for my workflow. Below is my gulpfile.js. I have tried to debug myself and using some hints from another BrowserStack question, but I cant figure it out.
When I save a .php file it reloads the browser, but errors. When I update a scss file, then it completely sass successfully.
...ANSWER
Answered 2021-Feb-22 at 14:26From the stack trace, I could infer that the error is originating from done
that is being passed to your sync
function as an argument. That done
isn't a function but is being called like one and that's probably why you are getting args.cb
is not a function.
QUESTION
Just went back to a very old project and updated to Gulp 4.0.2.
Managed to get it watching and compiling css, but doesn't seem to watch changes to the JavaScript files?
It doesn't throw any errors, just doesn't compile the JS when I make a change.
(I'm a designer and my JS is terrible, so you might have to really spell it out for me 😬)
gulpfile.js
...ANSWER
Answered 2021-Jan-05 at 09:24paths.scripts.src + '/*.js'
and paths.vendor.src + '/*.js'
contained an extra /
Thanks to Thomas Sablik
QUESTION
I'm encountering a problem with the npm install step during my CI/CD build in Azure DevOps.
The specific package that is causing this problem appears to be node-sass. This package has given me a lot of trouble in the past as well but I did get it working and builds have been running fine for a while. Now for some reason they are failing again but I cannot seem to reproduce the problem on my machine and the error doesn't make any sense to me.
Here is the output from the failed build: https://pastebin.com/w4aK4dEh.
The error message is "Error: Cannot find module './version'"
I have tried to modify the step and changed it from a simple npm install to npm install --save-dev --unsafe-perm but it didn't seem to have any effect.
package.json
...ANSWER
Answered 2020-Nov-18 at 23:26I am not entirely sure which of the following was the key to success but here's what I did to resolve this:
Delete the node_modules folder from my project, commit and then modify my .gitignore to exclude it from the repository permanently (yes, I know this one is a bit controversial as some people say the folder should be checked in)
Update the versions of the dependencies in the package.json file
Specify the specific version of NodeJs (and thus npm) to use. I did this by simply adding a step in the Azure build pipeline. Interestingly, the very latest version (15.2.1 at the time of writing this) did not work, however the LTS version 14.15.1 did work.
Some combination of those three changes did resolve the problem for me. I am leaving this information here in case someone else faces this same error message.
QUESTION
So I've upgraded to Visual Studio 16.6.3. When I go to the Task Runner Explorer it doesn't load my gulp file, in the Task Runner Output Window I can see...
...ANSWER
Answered 2020-Jul-06 at 01:11The solution I found was to downgrade to NodeJs v11.15.0 and use gulp 3.9.1.
If anyone out there has a better option I'd be keen to hear it.
QUESTION
Below is my gulpfile. I am trying to generate minified css from scss and then rename it using gulp-rev. Running gulp clean:assets then gulp scss then gulp css works perfectly. But running gulp build does not do the task. The minified css gets stored in ./assets/css but the renamed css is not getting stored in ./public/assets
...ANSWER
Answered 2020-May-09 at 13:44gulp.task('scss', ()=> {
return new Promise((resolve, reject) => {
return gulp.src('./assets/scss/**/*.scss')
.pipe(sass())
.pipe(cssnano())
.pipe(gulp.dest('./assets/css'))
.on('end', resolve)
.on('error', reject);
});
});
QUESTION
Am trying to run gulp commands from package.json. But unable to execute.
This is my package.json.
...ANSWER
Answered 2020-May-06 at 10:12I resolved by modifying srcipt section by adding "locale-sass"
and in lint-staged
npm run gulp locale-sass
instead of gulp locale-sass
QUESTION
How can i fix this problem? Im usin VSCode and trying to install gulp in my project. What`s the problem ot this?
...ANSWER
Answered 2020-Feb-19 at 09:27node --experimental-modules gulpfile.js and after it works and change gulpfile.js to this type
QUESTION
I'm new to Gulp, and it's hard for me to read the gulpfile.js
file.
Here is my devDependencies
in package.json
:
ANSWER
Answered 2020-Jan-27 at 19:18Will the dist folder contain the vulnerabilities of the related vulnerabilities in devDependencies
No, it won't.
The vulnerabilities are in files required by the gulp-cssnano
package, not in its generated output (i.e. the contents of the dist
folder). These vulnerable files reside in the node_modules
folder and in your case, they won't touch the production environment, so you should be good to go.
Hooowever, I noticed that the gulp-cssnano
package has been archived by its owner on GitHub and marked as deprecated, so you should probably look for an alternative.
QUESTION
I am attempting to move a Three.js project to TypeScript. When I tried top compile it I would get an error referenced in this issue on the Three.js repo:
https://github.com/mrdoob/three.js/issues/17698
Following those steps I installed @types/offscreencanvas
as well as edited my tsconfig.json, but now I get this output when trying to run tsc
:
ANSWER
Answered 2020-Jan-16 at 09:02As per my comment to your question
This seems to be a TypeScript version problem, but the version in your package.json
seems to be correct. Have you tried to run this from a script
within your package.json
, in stead of through your terminal?
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gulp-css
Set NODE_ENV to production so Gulp tasks produce final code, i.e. remove unused CSS, minify files, and disable sourcemap generation. (or inline NODE_ENV=production gulp css).
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