gulp

Getting: SyntaxError: missing ) after argument list but can't find out whats wrong with hulpfile.js

别来无恙 提交于 2019-12-02 08:14:49
Hi I'm getting an error starting 'gulp default' with the following gulp file. I cannot figure out whats wrong with the file. var gulp = require('gulp'); var sass = require('gulp-sass'); var sourcemaps = require('gulp-sourcemaps'); var autoprefixer = require('gulp-autoprefixer'); var browserSync = require('browser-sync').create(); var input = './scss/**/*.scss'; var output = './css'; gulp.task('sass', function() { return gulp.src(input) .pipe(sourcemaps.init()) .pipe(sass(errLogToConsole: true, outputStyle: 'compressed')) .pipe(autoprefixer(browsers: ['last 2 versions', '> 5%', 'Firefox ESR']))

How to inject parameters into an inline controller function in $uibModal

孤街醉人 提交于 2019-12-02 07:47:50
I'm having a problem with $uibModal's open function, specifically injecting my parameters properly into an inline controller function. Being the angularjs noob that I am, I've tried several things, none of which I can get to work. I'm using Visual Studio Code to write the angular, and gulp to build it. My first attempt (using an inline function): var modalInstance = $uibModal.open({ animation: false, templateUrl: 'app/workform/LoanActions/LoanActionOverpay.modal.html', controller: function ($scope, $uibModalInstance) { $scope.showOverpay = true; $scope.OverpayAccount = function () { $scope

Gulp css styles are not updated

女生的网名这么多〃 提交于 2019-12-02 07:44:53
I have problem. Yestrday I had to update the Node.js kernel and now that I change something in the LESS file, there will be no css update. Gulpfile is the same as before the update. Could someone advise me what's wrong with my gulpfile script? The HTML file update is OK. //*********** IMPORTS ***************** var gulp = require('gulp'), browserSync = require('browser-sync'); var postcss = require('gulp-postcss'); var less = require('gulp-less'); var watch = require('gulp-watch'); var livereload = require('gulp-livereload'); var autoprefixer = require('gulp-autoprefixer'); var concat = require

JavaScript heap out of memory in angular js gulp sourcemap ngannonate with babel

杀马特。学长 韩版系。学妹 提交于 2019-12-02 07:39:17
I am using es6 syntax in my angular JS project but it throws error when run gulp build , search over github and So but some saying this is error due to gulp uglify while some say this is babel issue and other say ng-annonate issue. ubuntu 14.04 node -v : 8.4.0 npm -v : 5.3.0 babel --version : 6.26.0 (babel-core 6.26.0) package.json { "name": "Project", "version": "0.0.0", "dependencies": { "gulp-open": "^2.0.0" }, "scripts": { "test": "gulp test" }, "devDependencies": { "babel": "^6.23.0", "babel-core": "^6.25.0", "babel-preset-es2015": "^6.24.1", "browser-sync": "~2.9.11", "browser-sync-spa":

node 使用 gulp 创建本地服务

会有一股神秘感。 提交于 2019-12-02 06:47:50
打开终端全局安装 gulp 模块 npm install -g gulp //全局安装 gulp( 轻量级自动化项目构建工具 ) cd 进入到项目文件夹,可以到看到 package.json 配置文件: { "name": "ionic-project", "version": "1.0.0", "description": "An Ionic project", "dependencies": { "gulp": "^3.5.6", "gulp-sass": "^0.7.1", // sass支持 "gulp-concat": "^2.2.0", // 合并文件 "gulp-minify-css": "^0.3.0", // 压缩css "gulp-rename": "^1.2.0" // 文件重命名 } } 首先 cd 到自己的项目目录 执行命令:npm install // 通过npm安装依赖,gulp的一些plugins就搞定了。 如果配置的 web 服务器需要自动刷新,可以在上面加上 "gulp-connect" 插件,或者直接执行命令安装:npm install gulp-connect. 配置 gulpfile.js 这是gulp的配置文件,我们现在只要对它进行一下配置就可以运行项目了,代码如下,已经加入注释: // 引入gulp var gulp = require

Can't get gulp-rev-replace working with gulp-useref

孤街醉人 提交于 2019-12-02 05:57:36
Continuing my previous question - but this time is the next step: getting file revisions to work. I'm working through johnpapa's course on automation with Gulp and seem to hit another wall (that's what you get when you try to adapt a concise course to a different file structure :P ). Basically, the issue is that I do get files named with a revision, but those names do not get into the end-result test.jsp , and I can't figure out why... This is the task (the minification is omitted for brevity, but it works fine with the file revisioning): gulp.task('build-dev', ['inject'], function () { var

Gulp concat and require path

五迷三道 提交于 2019-12-02 05:45:47
I have a problem with gulp-concat. I'm trying to concate all my js files in a single file, let's say, dist/app.js. But there is something that I don't understand. In that file, my required files path are still the same than before... Here is my gulpfile.js : var gulp = require("gulp"); var sourcemaps = require("gulp-sourcemaps"); var babel = require("gulp-babel"); var concat = require("gulp-concat"); var resolveDependencies = require("gulp-resolve-dependencies"); gulp.task("default", function () { return gulp.src("client/**/*.js") .pipe(sourcemaps.init()) .pipe(babel()) .pipe(concat("app.js"))

Use of browserify to pack React components

眉间皱痕 提交于 2019-12-02 05:36:24
问题 I am trying to learn browserify to manage my javascript. My first simple task is to create a react.js file which will be generated by gulp + browserify var browserify = require('gulp-browserify'); gulp.task('browserify-react', function () { return gulp.src('js/react/react.js') .pipe(browserify()) .pipe(rename('react-generated.js')) .pipe(gulp.dest('./dist')); }); In js/react/ I created a file react.js which is just two require commands: var React = require('react'); var ReactDOM = require(

Gulp Browserify SourceMaps

◇◆丶佛笑我妖孽 提交于 2019-12-02 04:51:46
I've looked at this question already and the answer doesn't work in my situation: gulp, browserify, maps? So here is what I have: gulp.task('debug-app-js', function () { console.log('DEBUG-APP-JS'); var src = './node_modules/js/app-main.js', dst = '../www/js', bundler = browserify(src, {debug:true}); return bundler.bundle() .pipe(source('app-build.js')) .pipe(gulp.dest(dst)) }); Debug is set to true, so why don't I get any sourcemaps? UPDATE: It appears to be an IE problem as the sourcemaps are appearing in Chrome and Firefox. But it's strange because I was getting sourcemaps in IE with my

Node.js event-stream: Where to setMaxListeners?

ⅰ亾dé卋堺 提交于 2019-12-02 04:39:12
I have searched and searched for this, to no avail. I've combed the web (including Stackoverflow), and the Node docs for an answer, and not found one---that worked (maybe that's just bad searching on my part). I'm working with an event-stream in a gulp config file, and I have a particular task that is hitting the classic "memory leak detected" error from the EventEmitter class. From what I've found, the answer to dealing with this issue seems to be to call the setMaxListeners method of the EventEmitter class; and my research has suggested that the event-stream has a Stream object, which should