gulp

Custom Deployment to Azure Websites

会有一股神秘感。 提交于 2019-12-07 04:00:55
问题 I recently started using Gulp.js to package all my CSS and JavaScript into single files, which I then include in my web app. My web app is written in Python (using Flask ). I obviously don't want to track the Gulp output CSS and JS files using git (since they're build output files). I deploy my website to Azure Websites using push to deploy. That is, I simply run git push azure master and Azure automatically figures out that I'm using Python, sets up virtualenv , installs pip dependencies and

Mean.io application is throwing error with forever

≡放荡痞女 提交于 2019-12-07 03:40:02
问题 I am working on a mean.io application. I am trying to run this application on Ubuntu shell with forever module of node but it is throwing an error "util.js:756 throw new TypeError('The super constructor to `inherits` must not ' + ^: The super constructor to `inherits` must not be null or undefined. at Object.exports.inherits (util.js:756:11) at Object.<anonymous> (/usr/lib/node_modules/forever/node_modules/forever-monitor/lib/forever-monitor/monitor.js:142:7) at Module._compile (module.js:435

gulp autoprefixer doesn't add moz prefix

两盒软妹~` 提交于 2019-12-07 03:14:43
问题 I am using gulp with autoprefixer in my project, and I have to use backgrounds gradient like this: background: linear-gradient(#e98a00, #f5aa2f); but output is: background:-webkit-linear-gradient(#e98a00,#f5aa2f); background:linear-gradient(#e98a00,#f5aa2f); What wrong with me? Part of Gulpfile.js gulp.task('styles', function() { return gulp.src(['css/less/mainPage.less']) .pipe(plumber()) // .pipe(concat('base.scss')) .pipe(less()) .pipe(prefix([{ browsers: ['IE 8', 'IE 9', 'last 5 versions'

How to create _custom.scss to override variable in Bootstrap 4 alpha 6

 ̄綄美尐妖づ 提交于 2019-12-07 03:11:45
问题 I am trying to customize a Bootstrap 4 alpha 6 theme. I want to copy settings from _variable.scss file to _custom.scss to override. But I didn't find _custom.scss file in source code. How do I add this _custom.scss file in my project? 回答1: I noted your issue here, here and here: ☐ Consider implementing a _custom.scss for easier, built-in variable overrides? So because your Bootstrap 4 didn't ship with a _custom.scss file, you only need to re-create bootstrap/scss/_custom.scss . Then edit

gulp-ruby-sass not a recognized command in Windows

末鹿安然 提交于 2019-12-07 02:28:41
问题 I'm trying out gulp for the first time on a Windows Server 2012 VM. I'm normally a Mac user, so I'm a bit new to Windows & Powershell for dev tools like this. I installed Node.js & npm (and nothing else). I created the following basic Gulpfile to compile my Sass: Gulpfile.js var gulp = require('gulp'), sass = require('gulp-ruby-sass'); gulp.task('styles', function() { return gulp.src('Content/sass_new/application.scss') .pipe(sass({ style: 'expanded', })) .pipe(gulp.dest('Content/css')) });

Angular module().factory() is not a function after concat (gulp)

限于喜欢 提交于 2019-12-07 01:55:24
问题 Trying to concat/uglify my angular app using gulp for the last few hours, i have stripped down whole process to simple concat, and even removed angular file from concat process to a separate <script> request in header - and still, I receive the same error: Uncaught TypeError: angular.module(...).factory(...) is not a function Without concat everything is fine. My gulp task: gulp.task('JS', function() { gulp.src(['!_dependencies/angular.min.js', '_dependencies/jquery.min.js', '_dependencies

how can I use babel polyfill to support all IE11 issues with gulp

不问归期 提交于 2019-12-07 00:38:03
问题 I've been piecing together support for IE11 by adding plugins for transform-object-assign and array-includes and now I'm getting a symbol error for using for of loops. Instead of just tackling them one at a time, is it possible for me to work babel polyfill into my build below and future proof it? I've read several related questions but still am not clear on how I'd fit babel-polyfill into the gulp build below: return gulp.src(input) // Grab the input files .pipe($.babel({ presets: ['es2015']

gulp构建前端工程

放肆的年华 提交于 2019-12-07 00:31:07
什么是gulp? gulp 是新一代的前端项目构建工具,你可以使用 gulp 及其插件对你的项目代码(less,sass)进行编译,还可以压缩你的 js 和 css 代码,甚至压缩你的图片, gulp 仅有少量的 API ,所以非常容易学习。 gulp 使用 stream 方式处理内容。 Node 催生了一批自动化工具,像 Bower,Yeoman,Grunt 等。 gulp和grunt的异同点 易于使用:采用代码优于配置策略,Gulp让简单的事情继续简单,复杂的任务变得可管理。 高效:通过利用Node.js强大的流,不需要往磁盘写中间文件,可以更快地完成构建。 高质量:Gulp严格的插件指导方针,确保插件简单并且按你期望的方式工作。 易于学习:通过把API降到最少,你能在很短的时间内学会Gulp。构建工作就像你设想的一样:是一系列流管道。 因为 gulp 是用 node.js 写的,所以你需要在你的终端上安装好 npm 。 npm 是 node.js 的包管理器,所以先在你的机子上安装好 node.js 吧 gulp 安装命令 sudo npm install -g gulp 在根目录下新建 package.json 文件 npm init . 安装 gulp 包 npm install gulp --save-dev 安装好后再次输入 gulp -v 查看版本号

gulp

放肆的年华 提交于 2019-12-06 22:47:27
平常项目里用到的 简单设置 var gulp = require('gulp'); var commonPathPrefix = 'public/'; //需要编译的公共目录 //var imagemin = require('gulp-imagemin'); //var pngquant = require('imagemin-pngquant'); var uglify = require('gulp-uglify'); //var cleanCSS = require('gulp-clean-css'); //var htmlmin = require('gulp-htmlmin'); //var gulpJade = require('gulp-jade'); //var jade = require('jade'); //var jshint = require('gulp-jshint'); //var csslint = require('gulp-csslint'); //var stylish = require('jshint-stylish'); //项目需要用到的库 var commonFils = [ 'node_modules/jquery/dist/jquery.*.js', 'node_modules/handlebars/dist

gulp 使用初解

喜你入骨 提交于 2019-12-06 22:47:17
gulp gulp是基于Node.js的前端自动化构建工具,主要用于代码打包。目前主流的前端打包工具,grunt,gulp,webpack。grunt现在似乎慢慢被gulp取代,而我使用gulp也是冲着大家说的配置简单去的,至于通道流,运行文件什么的其实还是次要的;webpack现在很火,听说功能强大,没有用过。 npm install gulp -g 注意需要在npm全局中安装gulp,否则命令窗口中找不到gulp快捷命令,记得检查环境变量的配置情况。 gulp 插件 gulp的使用离不开gulp插件的使用,下面是常用的几款。 npm install del gulp gulp-concat gulp-minify-css gulp-usemin gulp-replace gulp-uglify gulp-rev gulp-rev-collector gulp-minify-html --save-dev del 和 gulp-clean del是node.js的插件,两者的效果相似,都是用来清除文件。至于为什么使用 del,而不是 gulp-clean,我是看到网上一篇文章推荐的。 gulp-concat gulp-concat用来做文件合并,可以将多个文件合并成一个文件,减少静态资源数量。 gulp-minify-css gulp-minify-css是css的压缩工具。