gulp

gulp: set multiple gulp.src and respective gulp.dest (on gulp-sass example)

老子叫甜甜 提交于 2020-01-25 08:04:32
问题 Project structure: 📁 development  📁 public   📁 pug   📁 1sass   📁 2css  📁 admin   📁 pug   📁 3sass   📁 4css       I add digits to folder names to imitate the situations when gulp can not guess somehow which output folder is respects to input ones. Now, I want to compile .sass files in public/1sass and admin/3sass to .css and put it in public/2css and admin/4css respectively: 📁 public/1sass → 📁 public/2css 📁 admin/3sass → 📁 admin/4css How I need to setup the sass task in gulpfile ? Even if we

How can I invoke ClientJade through Gulp?

*爱你&永不变心* 提交于 2020-01-25 04:26:09
问题 I have been asked to help set up Gulp in a project using ClientJade to support Jade template usage on the client. Currently there are three folders of templates, and ClientJade is run on each to produce three template JavaScript files which are imported and used at run time. The goal of introducing Gulp is to be able to watch the three template source folders and recompile the appropriate JavaScript files in the build folder when a change occurs. Unfortunately there is no gulp ClientJade

cannot get - 404 error when I edit my html files, and the browser gets reloaded

為{幸葍}努か 提交于 2020-01-24 19:44:14
问题 I serve my app with browser-sync in a gulpfile.js. When I edit my html files, when the browser gets reloaded, it says Cannot GET /find or whatever the url is to the page i am viewing. If I serve my app with npm run lite it doesn't have this issue. Why am I getting this issue? gulpfile.js: var gulp = require("gulp"); var sass = require("gulp-sass"); var sourceMaps = require("gulp-sourcemaps"); var del = require("del"); var typescript = require("gulp-typescript"); var tslint = require("gulp

Nodejs. gulp not found after npm install

天大地大妈咪最大 提交于 2020-01-24 09:51:09
问题 I've got this git repo : https://github.com/mschwarzmueller/angular-2-introduction . Watching a series of tutorials and I got to the point where I must run gulp, but it gives me an error. From the beginning I cloned this repo, then I did npm install being in that folder. I inspected the package.json and indeed there are gulp dependencies . So what should I do? If I install gulp globally will it behave normally? Or I must somehow install it locally? P.S. : I tried this and encountered the

CSS Modules and multiple layouts/themes?

[亡魂溺海] 提交于 2020-01-24 05:01:27
问题 In my application, I have multiple theme styles (you can think of them as different, separate CSS styles files). I would like to start using the CSS modules, but I don't know even how to import my first file. Lets assume the following (simple) directory structure: layouts/ themeA/ myComponent.css themeB/ myComponent.css themeC/ myComponent.css components/ myComponent.js Depending on the user settings, I would like to pick a different CSS. That's easy to do in the browser (or on the server).

CSS Modules and multiple layouts/themes?

前提是你 提交于 2020-01-24 05:01:16
问题 In my application, I have multiple theme styles (you can think of them as different, separate CSS styles files). I would like to start using the CSS modules, but I don't know even how to import my first file. Lets assume the following (simple) directory structure: layouts/ themeA/ myComponent.css themeB/ myComponent.css themeC/ myComponent.css components/ myComponent.js Depending on the user settings, I would like to pick a different CSS. That's easy to do in the browser (or on the server).

gulp-imagemin: Couldn't load default plugin xxx

我怕爱的太早我们不能终老 提交于 2020-01-23 19:24:06
问题 the env: windows 7 node 6.9.5 I use the plugin like this npm. but I get an error. from some video, It's correct. It's relative to imagemin's version? // gulpfile.js var gulp = require('gulp'); var imagemin = require('gulp-imagemin'); var app = { srcPath: 'src/', devPath: 'build/', prdPath: 'dist/', //生产部署 } gulp.task('image', function() { gulp.src(app.srcPath + 'image/**/*') .pipe(gulp.dest(app.devPath + 'image')) .pipe(imagemin()) .pipe(gulp.dest(app.prdPath + 'image')) }) when I "gulp image

gulp-imagemin: Couldn't load default plugin xxx

你说的曾经没有我的故事 提交于 2020-01-23 19:23:10
问题 the env: windows 7 node 6.9.5 I use the plugin like this npm. but I get an error. from some video, It's correct. It's relative to imagemin's version? // gulpfile.js var gulp = require('gulp'); var imagemin = require('gulp-imagemin'); var app = { srcPath: 'src/', devPath: 'build/', prdPath: 'dist/', //生产部署 } gulp.task('image', function() { gulp.src(app.srcPath + 'image/**/*') .pipe(gulp.dest(app.devPath + 'image')) .pipe(imagemin()) .pipe(gulp.dest(app.prdPath + 'image')) }) when I "gulp image

Gulp merge json files from different folders while keeping folder structure

℡╲_俬逩灬. 提交于 2020-01-23 18:25:47
问题 I would like to merge multiple .json files from different folders while keeping the general folder structure. Input /lang/module1/file1.json /lang/module1/file2.json /lang/module2/file1.json /lang/module2/subModule1/file1.json /lang_additional/module1/file1.json /lang_additional/module1/file2.json /lang_additional/module2/file1.json /lang_additional/module2/subModule1/file1.json Expected Output /dist/lang/module1/file1.json (both file1.json's merged) /dist/lang/module1/file2.json (both file2

Using ES6 modules with traceur in single build file

人走茶凉 提交于 2020-01-23 10:11:18
问题 I just have a simple question cant get in any place, heve been googling for it all morning. There is no much info about traceur and when there is is not so clear, at least to me. How should be implemented the ES6 modules when im transpiling with traceur a single output file and using it in the browser with traceur-runtime? import and export keeps getting Unexpected token. I am using gulp-traceur and tried already all the modules options //'commonjs' //'amd', 'commonjs', 'instantiate', 'inline