gulp

Gulp-connect shows an error 'listen EADDRINUSE' 8080

非 Y 不嫁゛ 提交于 2019-12-12 18:32:45
问题 I have a simple gulpfile.js:I have a simple gulpfile.js:I have a simple gulpfile.js:I have a simple gulpfile.js:I have a simple gulpfile.js:I have a simple gulpfile.js:I have a simple gulpfile.js:I have a simple gulpfile.js var gulp = require('gulp'); var less = require('gulp-less'); var nodemon = require('gulp-nodemon'); var watch = require('gulp-watch-less'); var path = require('path'); var bower = require('gulp-bower'); var livereload = require('gulp-livereload'); var connect = require(

Gulp: How to auto replace minified files in html? [closed]

隐身守侯 提交于 2019-12-12 18:23:26
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 months ago . During development, normally I'll import lot of third party libs to my html separately, like below: <script src="/resource/jquery-validation-1.15.0/jquery.validate.js" type="text/javascript"></script> <script src="/resource/jquery-validation-1.15.0/localization/messages_en

TypeScript 2.1.4 breaking changes in webpack ts-loader

╄→尐↘猪︶ㄣ 提交于 2019-12-12 18:03:07
问题 Upgrading from Typescript 2.0.10 to 2.1.4 appears to break something in webpack, webpack-stream, ts-loader, or gulp as it’s no longer respecting my entry point or gulp source glob. It appears to be including all .ts files in my project (including the ones in the /server source folder) rather than just the ts files in /client and app.ts as per the gulp.src and web pack entry point. Is there a different/newer/better way I should be doing this? in gulp file: const serverPath = 'server'; const

Browserify Babelify Uglify source map sources do not get loaded in Google Chrome

亡梦爱人 提交于 2019-12-12 17:17:59
问题 I generated a js file with a source map using the following gulp task. The original sources get loaded in Firefox but do not get loaded in Chrome. Can anyone point out why Chrome can't find the sources which are clearly included in the generated index-[hash].js.map? gulp.task('browserify', function () { // set up the browserify instance on a task basis return browserify({ debug: true }) .transform(babelify) .require('client/web/private/js/es6/index.js', { entry: true }) .bundle() .on('error',

How to pass an object from gulpfile to another JavaScript file in nodejs?

杀马特。学长 韩版系。学妹 提交于 2019-12-12 17:15:31
问题 I have an object in my Gulp task which contains the data of my Yaml files. Now I want to access this object from other JavaScript files. This is what my Gulp Task looks like: Gulpfile.js var mergedYaml gulp.task('LoadYamlFiles', function() { mergedYaml = global.mergedYaml; try { //Load all the Yaml files available inside pom folder glob("tests/acceptance/wdio/utilities/pom/*.yml", function (er, files) { mergedYaml = yamlMerge.mergeFiles(files); }) } catch (e){ console.log(e); } }); exports

Angular2 ngIf not working in deployment environment

旧巷老猫 提交于 2019-12-12 16:46:38
问题 I've written a very simple little Angular2 app that I've built to generate exercise sheets. However it seems that when I deploy the app ngIf doesn't work (either my ISP default webserver or my own Heroku/local deployed node-http-server). When I run the exact same code base on my dev node server ( npm start ) ngIf works as expected. If anyone has some guidance on how I can debug this I would be extremely grateful, or if I'm just plain doing something wrong... Here's the relevant code src

“Foundation - ReferenceError: primordials is not define when starting a foundation zurb project.”

我只是一个虾纸丫 提交于 2019-12-12 16:16:45
问题 Getting an error when creating a Foundation Zurb project. Tried to solve using the previous suggestions shown for other applications, but none are working. A post referenced updating elm, and I did so, however, it did not work. Additionally, I reviewed the closed issue for Gulp 3 (i am using gulp 4), but there was not viable fixes (Gulp 3 is broken on Node 12 #2324) or workarounds. $ foundation new --framework emails fs.js:27 const { Math, Object } = primordials; ^ ReferenceError: primordials

Sequencing tasks with gulp

喜欢而已 提交于 2019-12-12 15:41:10
问题 I'm a bit stumped with gulp. Based on the docs, in order to get sequential execution, I should be returning the stream from my tasks, so i tried to do the below for my gulpfile. But as best I can tell, there's a race condition. Half the time I get ENOENT, lstat errors, the other half it succeeds, but my deployDir has weird folder names and missing files all over.. Am I missing something? Is there a trick to this? var gulp = require('gulp'), filter = require('gulp-filter'), mainBowerFiles =

Sourcemap generated from Gulp, not working as expected

限于喜欢 提交于 2019-12-12 14:23:11
问题 So my app is running off a concatenated admin.bundle.js file. I'm using webpack to manage the modules, and then using gulp-webpack to import my webpack config, then run the sourcemap code: gulp.task('webpack', function() { return gulp.src('entry.js') .pipe(webpack( require('./webpack.config.js') )) .pipe(sourcemaps.init()) .pipe(sourcemaps.write('./')) .pipe(gulp.dest('app/assets/js')); }); My Webpack config var webpack = require('webpack'); module.exports = { entry: "./entry.js", output: {

Simple ES7 decorator with babel

人盡茶涼 提交于 2019-12-12 14:21:39
问题 I can not run this code: https://www.npmjs.com/package/core-decorators#readonly I use gulp and babel. I have package.json { "name": "my-first-decorator", "version": "0.0.1", "dependencies": { "core-decorators": "^0.8.1" }, "devDependencies": { "babel-plugin-transform-class-properties": "^6.0.14", "babel-plugin-transform-decorators": "^6.0.14", "babel-preset-es2015": "^6.1.2", "babelify": "^7.2.0", "browserify": "^12.0.1", "gulp": "^3.9.0", "vinyl-source-stream": "^1.1.0" } } and I have