gulp

WebPack ts-loader compiling all files when I only want it to run in one folder/file

房东的猫 提交于 2019-12-04 05:50:41
I found a problem in my app structure and build process using WebPack, TypeScript, and TS-Loader that I thought was caused by TypeScript 2.1.4, but apparently was there the whole time. You can see all the details from my other post: TypeScript 2.1.4 breaking changes in webpack ts-loader In short, I have Gulp and WebPack set to an entry point of /client/app.ts which for now has almost nothing in it (certainly nothing referencing /server/) but the TypeScript compilation stage of the WebPack build process is still trying to run on /server (and in my other post, showing a compilation error from

Gulp sourcemaps with TypeScript and Babel

 ̄綄美尐妖づ 提交于 2019-12-04 05:44:34
I am currently writing a side project where I can learn more about TypeScript and ES6 (using babel). I wanted to use ES6 with my TypeScript, so I settled on the following workflow. Typescript (ES6) -> Babel (ES6) -> ES5 Now I am using Gulp to automate all of this, and I am having a hard time getting the sourcemaps to generate properly. I should mention that this style was suggested to me by a user on /r/typescript so I am not even sure if it is possible. Anyways here is my current gulp task var server = $.typescript.createProject('src/server/tsconfig.json'); gulp.task('build', ['vet'],

gulp plugin gulp-ruby-sass not compiling

末鹿安然 提交于 2019-12-04 05:41:06
Gulp plugin gulp-ruby-sass ( https://github.com/sindresorhus/gulp-ruby-sass ) giving not compiling, the error message in terminal coming like this 👇 Error: must provide pattern Here is the gulpfile.js details var gulp = require('gulp'), uglify = require('gulp-uglify'), sass = require('gulp-ruby-sass'); gulp.task('styles', function (argument) { gulp.src('sass/app.scss') .pipe(sass()) .pipe(gulp.dest('css/')); }); The gulp-ruby-sass syntax has been changed: instead of: it is now: gulp.task('styles', function (){ gulp.task('styles', function (){ gulp.src('sass/app.scss') return .pipe(sass()) sass

How do I get gulp + browsersync to work an apache vhost?

南笙酒味 提交于 2019-12-04 05:39:05
I'd like to add gulp, sass and browsersync to my toolkit. I'm now running gulp with a sass and browsersync task configured. I'm skinning a php app running from a vhost on my local apache server. I'm attempting to run browsersync from a watch task, using the browsersync's proxy option to use my vhost. Currently, when I run the watch no server can be found on port 3000. If I navigate to 'localhost:3000' I get chromes 'no web page found' message. If I navigate to port 3001 I can access browsersync's admin UI. So I know that browsersync is running. My gulp conf is as follows /* load plugins */ var

gulp-order node module with merged streams

拥有回忆 提交于 2019-12-04 05:31:57
I'm using the gulp-order module along with the event-streams module and gulp-concat to concatenate javascript files into a single dest file. The gulp-order plugin has worked great for me in other projects where I wanted to concatenate files from the stream in a distinct order. For some reason in this project it is not working properly, and the files in the public/angular/config directory are dispersed amongst the files I specify to concatenate last in the public/js directory. I think this may have something to do with specifying multiply sources ie. the angular and js directories. I tried

Set working directory in gulpfile.js?

一世执手 提交于 2019-12-04 05:30:51
Is there a way to set the working directory for Gulp within a gulpfile, so that I can run a gulp command from a subdirectory without running into any issues? I ran a search for this and didn't find what I was looking for. To clarify, I'm aware of adding a prefix to the files I'm using. However, instead of this - var gulp = require('gulp'); var jshint = require('gulp-jshint'); ... var paths = { js: [__dirname + 'app/*/*.js', __dirname + '!app/lib/**'], css: __dirname + 'app/*/*.styl', img: __dirname + 'app/img/*', index: __dirname + '*.html', dist: __dirname + 'dist' }; I'd like to do something

How to overcome “Access-Control-Allow-Origin” error when client talks to server

不羁的心 提交于 2019-12-04 05:29:11
问题 So I'm using a yeoman project from swiip called generator-gulp-angular - just do "npm search gulp-angular" and you'll see it. Out of the box the client is running from 127.0.0.1:3000 and I wish to make a $http call to a (python) service on 127.0.0.1:8080. Its using browser-sync for live reload and proxy middleware to make the proxy calls from client to server. Proxy middleware is per default disabled, so the trick is to enable it and successfully make requests to and receive responses from

How to replace in stream using Gulp?

拥有回忆 提交于 2019-12-04 04:29:21
I try to switch from Grunt to Gulp and I have an issue: I read two streams from two files var fileStream = gulp.src(file); var injectionStream = gulp.src(injection) .pipe(replace('#class-name#', argv.cname)); If my console argument "--remove" is absent I have no problem to concatenate these streams .pipe(concat('animation.styl')) .pipe(gulp.dest('./dist')) However when '--remove' is true I want to delete injection, in other words, subtract injectionStream from fileStream. I tried: var es = require('event-stream'); es.replace() var replace = require('gulp-replace'); It works with strings, but I

gulp is Killed irregularly

本秂侑毒 提交于 2019-12-04 04:09:00
I have an issue when running gulp as it kills itself during the task. I'm not doing anything: > gulp build [11:25:34] Using gulpfile /app/app-base/frontend/gulpfile.js [11:25:34] Starting 'css-clean'... [11:25:34] Starting 'js-clean'... [11:25:34] Finished 'css-clean' after 5.99 ms [11:25:34] Starting 'css-build'... [11:25:34] Finished 'js-clean' after 17 ms [11:25:34] Starting 'js-build'... [11:25:35] Finished 'css-build' after 888 ms [11:25:35] Starting 'css'... [11:25:35] Finished 'css' after 13 μs Killed npm ERR! app-frontend@0.0.1 build: `gulp build` npm ERR! Exit status 137 npm ERR! npm

Copy angular-ui-grid fonts into .tmp/fonts

試著忘記壹切 提交于 2019-12-04 04:04:32
问题 I was experiencing a known issue with Angular UI Grid where some of my fonts would look Korean in production. I applied a certain fix by adding the following CSS: @font-face { font-family: 'ui-grid'; src: url('../fonts/ui-grid.eot'); src: url('../fonts/ui-grid.eot#iefix') format('embedded-opentype'), url('../fonts/ui-grid.woff') format('woff'), url('../fonts/ui-grid.ttf?') format('truetype'), url('../fonts/ui-grid.svg?#ui-grid') format('svg'); font-weight: normal; font-style: normal; } This