gulp

How to run angular 2 app in background

末鹿安然 提交于 2019-12-11 05:11:11
问题 i have already tried following solution but it is not working. sudo forever start -c "npm start" ./ and package.json file is something like this, look at the start command: (this is not full package.json) "name": "angular2-quickstart", "version": "1.0.0", "scripts": { "lite": "lite-server", "gulp": "gulp", "start": "concurrent \"npm run gulp\" \"npm run lite\" ", "postinstall": "typings install", "tsc": "tsc", "tsc:w": "tsc -w", "typings": "typings" }, 回答1: I'm going to piggyback off of this

gulp rollup not working external resource import

前提是你 提交于 2019-12-11 04:48:59
问题 I'm using gulp-rollup plugin with properly configured babel. Transpiled code from babel needs babel-polyfill to be loaded so I put import "babel-polyfill"; at the top of my main file (babel-polyfill is of course installed). Unfortunatelly, gulp outputted something like this 'babel-polyfill' is imported by src/main.js, but could not be resolved – treating it as an external dependency In rollup call, I used allowRealFiles: true So, rollup is able to touch real file system. Unfortunately, in

Replicating directory structure in Gulp dest

若如初见. 提交于 2019-12-11 04:44:57
问题 I'm trying to optimize images in a couple of different locations using Gulp. This is the directory structure: |-- app |-- _images -- image1.jpg -- image2.jpg |-- _templates |-- _pages |--_services |--_images -- image1.jpg -- image2.jpg And this is the code gulp.task('images:tmp', function() { return gulp.src(['app/templates/pages/**/*.{png,jpg,gif,svg}', 'app/images/**/*.{png,jpg,gif,svg}'], {base: 'app/'}) // Caching images that ran through imagemin .pipe(cache(imagemin({ interlaced: true, }

gulp compass creates an unwanted file instead of using only stream

こ雲淡風輕ζ 提交于 2019-12-11 04:38:22
问题 This is my app-compass gulp task: var compass = require('gulp-compass'); var autoprefixer = require('gulp-autoprefixer'); gulp.task('app-compass', function() { var stream = gulp.src('./app/styles/index.scss') .pipe(compass({ css: paths.css, sass: 'app/styles', image: 'app/assets/images', generated_images_path: paths.images })) .pipe(autoprefixer()) .pipe(gulp.dest(paths.css)); }); As part of compass, an index.css file created. This is an unwanted operation. I only want the data on the stream

Is there a way to build multiple semantic-ui themes in the same project?

我们两清 提交于 2019-12-11 04:25:22
问题 I'm trying to create a prototype at the moment and keep running into walls. I'm working on a project where we hope to have one code base that all of our end-users use and where the organization that user is affiliated with will determine the skin(css file) that gets applied to the site. Semantic-UI seems like a great fit for this as it has the concept of themes and a build process around it. I wanted to tap into the power of this build process without having to completely rewrite it. Is there

gulp: build the code and start it in the browser

拟墨画扇 提交于 2019-12-11 04:16:06
问题 So I want to use elm language for a web project and I need the project to be in visual studio 2015 and I am using gulp. My issue is that I don't know how to create a gulp task that builds the code and starts it in the browser. Here is what I've done so far: gulpfile.js: /// <binding ProjectOpened='default' /> var gulp = require('gulp') var elm = require('gulp-elm') var gutil = require('gulp-util') var plumber = require('gulp-plumber') var connect = require('gulp-connect') // File paths var

How to provide global TypeScript classes via WebPack bundle in JS

馋奶兔 提交于 2019-12-11 04:15:44
问题 I am currently working on TypeScript. I want to replace JS with TS, but I have a lot of JS-Files, so that I only want to create new classes in TS and want to use these in my old JS files atm. Later on I want to replace all JS with TS. I not 100% familiar with webpack and bundled js files, so that I could use some help. Is there any opportunity to compile TS into JS with gulp (already done - it works) AND use these TS classes in different (old) JS files? TypeScript file: class Car { seats:

DRY up gulp tasks

狂风中的少年 提交于 2019-12-11 04:02:51
问题 Say I have these two gulp tasks: gulp.task('js.task1', function() { return gulp.src(config.js1.src) .pipe($.plumber()) .pipe($.if(production, $.uglify())) .pipe(gulp.dest(config.js1.dest)); }); gulp.task('js.task2', function() { return gulp.src(config.js2.src) .pipe($.plumber()) .pipe($.if(production, $.uglify())) .pipe(gulp.dest(config.js2.dest)); }); They're both identical aside from the src and dest locations. Is it possible to do something like this? function jsMoveGeneric(src, dest) {

Using a local editor with Vagrant

怎甘沉沦 提交于 2019-12-11 03:56:24
问题 I typically use the atom editor for any coding work and have folders on my computer with the code. After doing some updates on my Mac OS computer, some ruby gems stopped worked, rvm no longer responded and homebrew gave me a ton of trouble. I want to prevent this from happening again and figured I'd use Vagrant instead. I like it so far and it works fine, however I want to use my Atom editor nevertheless. Normally I work on projects using gulp or grunt and they compile the files whenever any

gulp autoprefixer giving me a promise error

二次信任 提交于 2019-12-11 03:34:14
问题 I tried this solution from Gulp Autoprefixer Not Working but it's not working out for me. The code that I used is: "use strict"; var gulp = require('gulp'); var sass = require('gulp-sass'); var prefix = require('gulp-autoprefixer'); var minify = require('gulp-minify-css'); var plumber = require('gulp-plumber'); function onError(err) { console.log(err); } gulp.task('sass', function(){ return gulp.src('src/style.scss') .pipe(sass()) .pipe(prefix({browsers:['last 2 versions']})) .pipe(minify())