gulp

Generate sourcemap for each partial

一个人想着一个人 提交于 2020-01-07 07:42:10
问题 I'm using the gulp-sass and would like for each partials he manages a sourcemap , I can do this using the less but did not see a way to do this with sass. _partial.scss ( within it have to have a mapfile ). _partial2.scss ( this also ). 回答1: According the specification from sass-lang files starting with a _ are not compilled. See also: https://github.com/sass/node-sass/issues/215 So rename your partials with gulp-rename: var sourcemaps = require('gulp-sourcemaps'); var gulp = require('gulp');

React-router Uncaught TypeError: type.toUpperCase is not a function

99封情书 提交于 2020-01-07 06:55:17
问题 I'm using the latest version of react, react-router, gulp and browserify I got this in beowser console: Uncaught TypeError: type.toUpperCase is not a function my code in app.js: "use strict"; var React = require('react'); var Router = require('react-router'); var Header = require('./components/Header'); var Index = require('./components/Index'); var About = require('./components/About') var Route = Router.Route; var IndexRoute = Router.IndexRoute ; var App = React.createClass({ render:

Electron App Error: EACCES: permission denied, open

帅比萌擦擦* 提交于 2020-01-07 05:28:12
问题 [20:25:45] Using gulpfile ~/Desktop/GitHub/electra/gulpfile.js [20:25:45] Starting 'build-client-bundles'... [20:25:45] Starting 'build-client-scss'... [20:25:45] Starting 'build-client-html'... [20:25:45] Starting 'build-client-assets'... [20:25:45] Starting 'build-server'... [20:25:45] Starting 'watch-client'... [20:25:45] Finished 'watch-client' after 16 ms [20:25:45] Starting 'watch-server'... [20:25:45] Finished 'watch-server' after 1.58 ms [20:25:45] Starting 'watch'... [20:25:45]

Running Gulp tasks in sequence does not seem to work

喜你入骨 提交于 2020-01-07 03:46:10
问题 I am pretty new to Gulp and I kind of love it but also kind of don't really understand it at all so I might be going about this the wrong way entirely. I have a file structure like this: main |-build |-big_file1.txt |-big_file2.txt |-small_file3.txt |-med_file4.txt I want to copy the contents of build to a new dir and then delete some files so I set up two tasks like this: var gulp = require("gulp"); var foreach = require("gulp-foreach"); var del =require("del"); gulp.task("taskA", function

jsde与gulp使用说明

送分小仙女□ 提交于 2020-01-07 03:15:37
jade是一款基于haml的html模板引擎,已改为pug 1.全局安装 npm install jade -g 新建一个jade文件夹,再建一个后缀名为.jade的文件 编辑.jade文件 jade -P -w index.jade 在文件夹jade下监听文件变化,即生成html index.jade文件 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 doctype htmlhtml head meta(charset='utf-8') title 我的网站 body div |hehe a: img(src='#') div(style={width:"100px",height:"100px"}) 测试 div div(class='test') 我是类名位test的div .test 我是类名位test的div #myid 我是id名为myid的div .myclass#myids 我是有id也有class的div -var name='张三' div 名字是#{name} // 我是注释 // 我是注释一 我是注释二 //- 我是jade注释 /

gulp postcss-simple-vars throws error at // comments

半世苍凉 提交于 2020-01-06 23:49:37
问题 I'm attempting to migrate from Sass to postCSS and testing out postcss-simple-vars gulp plugin. I'm using Webstorm IDE, which automatically uses javascript style comments (//) in .scss files, so my non-block comments are all // comments, not /* */. postcss-simple-vars throws errors at all // comments, even with the silent option set to true. Here's my gulp task: gulp.task('postcss', function () { return gulp .src('./styles/sass2/*.scss') .pipe($.postcss( [ vars({ silent: true, variables:

babelify pipe results in: The code generator has deoptimised the styling of “/…/jquery.js” as it exceeds the max of “100KB”

白昼怎懂夜的黑 提交于 2020-01-06 23:49:32
问题 I'm trying to create a single js file containing jquery, bootstrap and reactjs components using a gulp task: app.jsx: var React = require('react'); var ReactDOM = require('react-dom'); var HelloWorld = require('./Application.jsx'); var $, jQuery = require('../../libraries/jquery/dist/jquery'); var bootstrap = require('../../libraries/bootstrap-sass/assets/javascripts/bootstrap'); ReactDOM.render( <Application />, document.getElementById('example') ); gulp task: gulp.task('js', function () {

gulp postcss-simple-vars throws error at // comments

和自甴很熟 提交于 2020-01-06 23:47:49
问题 I'm attempting to migrate from Sass to postCSS and testing out postcss-simple-vars gulp plugin. I'm using Webstorm IDE, which automatically uses javascript style comments (//) in .scss files, so my non-block comments are all // comments, not /* */. postcss-simple-vars throws errors at all // comments, even with the silent option set to true. Here's my gulp task: gulp.task('postcss', function () { return gulp .src('./styles/sass2/*.scss') .pipe($.postcss( [ vars({ silent: true, variables:

compiling all scss files in all subfolders using gulp

痞子三分冷 提交于 2020-01-06 19:28:31
问题 I have this angular2 project structure (showing the part where i have the problem ) : |templates |index -index.scss -index.template.html |About -about.scss -about.template.html I want to compile all scss files in index and about folders using gulp, and put the compiled files in the same directory as the scss files. Example : index.scss must be compiled and placed in index (folder) as index.css so that the result will be |templates |index -index.scss -index.css -index.template.html how could I

How is gulp-bower used and what is it for?

和自甴很熟 提交于 2020-01-06 18:10:50
问题 I am trying to solve this problem; Apparently when I use my gulp file I can't link to my bower_components folder. While trying to come up with a solution, I heard of gulp-bower But the docs seem a little vague. So what is gulp-bower used for? Could this help me? Anyone run into my problem? Is my gulp file too verbose... Just as a FYI I set up a components folder which houses index, scss, images and js and I use gulp to stream to a DEV or PROD depending on the situation. But alas I think that