gulp

Why is the TypeScript compiler ignoring tsconfig.json?

血红的双手。 提交于 2019-12-10 12:48:09
问题 I have this file, pasted from a tutorial (and let's face it, the disparity between docs, tuts, and examples is astounding): /scripts/tsconfig.json: { "compilerOptions": { "emitDecoratorMetadata": true, "experimentalDecorators": true, "module": "commonjs", "noEmitOnError": true, "noImplicitAny": false, "outDir": "../wwwroot/appScripts/", "removeComments": false, "sourceMap": true, "target": "es5", "moduleResolution": "node" }, "exclude": [ "node_modules", "typings/index", "typings/index.d.ts"

Visual Studio Task Runner Explorer Extension does not recognize gulpfile.js

巧了我就是萌 提交于 2019-12-10 12:46:32
问题 I am trying to use the VS Task Runner Explorer to run gulp as a step during the build. Here are the steps I took: 1) Downloaded node.js 2) ran: npm install gulp -g from the command line 3) downloaded and installed task runner 4) closed and reopened visual studio I can now access the task runner window in visual studio but when I right click on my gulpfile.js, there is no option to open it in the task runner explorer. All help is appreciated, thanks in advance. 回答1: I've found it doesn't work

Gulp - does anyone know how to cache bust a js file?

百般思念 提交于 2019-12-10 12:28:18
问题 Gulp - does anyone know how to cache bust a js file? I'm using gulp, angular2 and html. Current gulp file with an attempt of cache busting: 'use strict'; const gulp = require('gulp'); const ts = require('gulp-typescript'); const uglify = require('gulp-uglify'); const concat = require('gulp-concat'); var htmlreplace = require('gulp-html-replace'); var addsrc = require('gulp-add-src'); var cachebust = require('gulp-cache-bust'); // See this article: http://caveofcode.com/2016/03/gulp-tasks-for

After updating xdan/datetimepicker from 2.4.0 to 2.5.4 - $.datetimepicker is undefined

混江龙づ霸主 提交于 2019-12-10 12:06:42
问题 Previously I used "xdan/datetimepicker" v2.4.0. But I needed to upgrade it and after upgrade it doe snot work. It trows: vendor.js:20065 Uncaught TypeError: Unable to process binding "with: function (){return $root.manageView }" Message: Unable to process binding "datetimepicker: function (){return timeFrom }" Message: $element.datetimepicker is not a function There is my "package.json" file: { "name": "App1", "version": "1.0.0", "description": "App1 Testing", "main": "./src/app/app.js",

Gulp concatening multiple actions

别等时光非礼了梦想. 提交于 2019-12-10 11:57:40
问题 I get the following error when i run this gulp.task('gen:enemies', function () { /** * Hold all directories names starting with "enemy" */ var EnemyDirs = fs.readdirSync(path.join('images')).filter(function (p) { if (p.match(/^enemy/)) { return fs.readdirSync(path.join('images', p)); } }); /** * Run action for every directory found */ var EnemyBuildAction = EnemyDirs.map(function (_dir) { // Get all images in directory return gulp.src(path.join('images', _dir, '*.png')) .pipe(sprite({ //

Gulp dest() dynamic destination folders based on file names

旧巷老猫 提交于 2019-12-10 11:41:59
问题 I want to iterate over all the src files and move every file in a folder named with the file name itself, for example. from: hello.js omg.js to: hello/ hello.js omg/ omg.js I have this task: gulp.src('/*.js') .pipe(gulp.dest('/' + filename here.......)); How do i achieve this? 回答1: gulp.task('pack', function () { return gulp.src('temp/**/*.js') .pipe(uglify()) .pipe(rename(function (path) { path.dirname += "/"+path.basename; path.extname = ".min.js"; })) .pipe(gulp.dest('./build')); }); 来源:

gulp-uglify won't preserve files order

不羁岁月 提交于 2019-12-10 10:56:46
问题 When I use gulp-uglify to minify the Javascript files the order gets messed up. Lets say I have this task working as expected: var gulp = require('gulp'); var rename = require('gulp-rename'); var gp_concat = require('gulp-concat'); gulp.task('js', function() { gulp.src([ './public/bower_components/jquery/dist/jquery.min.js', './public/js/functions.js', ]) .pipe(gp_concat('combined.js')) .pipe(gulp.dest(path.js + '/dist')) }); Adding the uglify line to it changes the order of the jquery and

Babel Config “strict mode”

折月煮酒 提交于 2019-12-10 10:53:34
问题 For some strange reason I can't for the life of me compile "vendor" libraries with my build process. Im getting this error: SyntaxError: <FILENAME> 'with' in strict mode . (where <FILENAME> is an actual existing filename) The line that's failing is > 130928 | with (locals || {}) { (function(){ and its complaining about that with . Bear in mind that this file is outside my control. My .babelrc file has this config. { "compact": true, "plugins": [ "transform-runtime", "undeclared-variables

Cannot read property 'line' of undefined at originalPosition in gulp-clean-css plugin

[亡魂溺海] 提交于 2019-12-10 10:52:00
问题 As mentioned in the question, when I launch gulp build I get the following error: C:\dev\work\viewAngular\web\node_modules\gulp-clean-css\node_modules\clean-css\lib\reader\input-source-map-tracker.js:37 if (originalPosition.line === null && line > 1 && selectorFallbacks > 0) { ^ TypeError: Cannot read property 'line' of undefined at originalPosition For (C:\dev\work\viewAngular\web\node_modules\gulp-clean-css\node_modules\clean-css\lib\reader\input-source-map-tracker.js:37:23) I dont know

Running gulp gives “path.js:7 throw new TypeError('Path must be a string. Received ' + inspect(path));”

北战南征 提交于 2019-12-10 10:48:44
问题 In my Wordpress project I'm using Laravel Elixir to deal with assets. Everything was working till today. Now every time I run gulp I'm getting: $ gulp path.js:7 throw new TypeError('Path must be a string. Received ' + inspect(path)); ^ TypeError: Path must be a string. Received { includePaths: [ 'bower_components/foundation-sites/scss/', 'bower_components/slick-carousel/slick' ] } at assertPath (path.js:7:11) at Object.join (path.js:1211:7) at prefixOne (/Users/slick/Code/Komarnicki2/wp