gulp

Gulp TypeError: Path must be a string. Received undefined

[亡魂溺海] 提交于 2020-01-01 16:07:12
问题 I want to run build command but got the error message: TypeError: Path must be a string. Received undefined. Do you guys have any ideas? Thanks. gulp.task('build', function () { browserify("./src/components/source.js") .transform("babelify", {presets: ["es2015", "react"]}) .bundle() .pipe(gulp.dest(path.resolve(__dirname, './src/app.js'))); }); Below is the tracestack details: TypeError: Path must be a string. Received undefined at assertPath (path.js:8:11) at Object.posix.resolve (path.js

Gulp TypeError: Path must be a string. Received undefined

≡放荡痞女 提交于 2020-01-01 16:06:53
问题 I want to run build command but got the error message: TypeError: Path must be a string. Received undefined. Do you guys have any ideas? Thanks. gulp.task('build', function () { browserify("./src/components/source.js") .transform("babelify", {presets: ["es2015", "react"]}) .bundle() .pipe(gulp.dest(path.resolve(__dirname, './src/app.js'))); }); Below is the tracestack details: TypeError: Path must be a string. Received undefined at assertPath (path.js:8:11) at Object.posix.resolve (path.js

gulp generate html file with jade via markdown json

一曲冷凌霜 提交于 2020-01-01 15:33:43
问题 I'm using gulp-markdown-to-json and gulp-jade My aim is to grab data from markdown file which looks like this: --- template: index.jade title: Europa --- This is a test. grab template: index.jade file and pass it along with other variables to jade compiler. So far I've this: gulp.task('docs', function() { return gulp .src('./src/docs/pages/*.md') .pipe(md({ pedantic: true, smartypants: true })) .pipe(jade({ jade: jade, pretty: true })) .pipe(gulp.dest('./dist/docs')); }); I'm missing a step

How do I uglify my AngularJS 2 Typescript app files and wire up for a production release using Gulp

自作多情 提交于 2020-01-01 15:33:22
问题 How do I uglify my AngularJS 2 Typescript app files and wire up for a production release using Gulp? I can uglify the js files but then I have no idea how to use them / wire it up. Currently my code below just cache busts the css and injects it to the index file head. I used typescript for my angular 2 app and I noticed that when I viewed my website in chrome I could see all the source files for all the .ts and .js code that I have done. I'm looking to uglify that and make it more secure. I

Aurelia CLI app-bundle automatic update gets slow

不打扰是莪最后的温柔 提交于 2020-01-01 11:42:10
问题 Hi I have a web application runnig on the Aurelia CLI. From what I’ve read in the documentation, the Aurelia CLI runs always “bundled” and never targeting directly source files. By running the “au run –watch” command, Aurelia “listens” to file changes and recreates the app-bundle.js automatically. Sample output from console: Starting 'readProjectConfiguration'... Finished 'readProjectConfiguration' Starting 'processMarkup'... Starting 'processCSS'... Starting 'configureEnvironment'...

Aurelia CLI app-bundle automatic update gets slow

谁说我不能喝 提交于 2020-01-01 11:41:15
问题 Hi I have a web application runnig on the Aurelia CLI. From what I’ve read in the documentation, the Aurelia CLI runs always “bundled” and never targeting directly source files. By running the “au run –watch” command, Aurelia “listens” to file changes and recreates the app-bundle.js automatically. Sample output from console: Starting 'readProjectConfiguration'... Finished 'readProjectConfiguration' Starting 'processMarkup'... Starting 'processCSS'... Starting 'configureEnvironment'...

Aurelia CLI app-bundle automatic update gets slow

吃可爱长大的小学妹 提交于 2020-01-01 11:41:10
问题 Hi I have a web application runnig on the Aurelia CLI. From what I’ve read in the documentation, the Aurelia CLI runs always “bundled” and never targeting directly source files. By running the “au run –watch” command, Aurelia “listens” to file changes and recreates the app-bundle.js automatically. Sample output from console: Starting 'readProjectConfiguration'... Finished 'readProjectConfiguration' Starting 'processMarkup'... Starting 'processCSS'... Starting 'configureEnvironment'...

How to pass a parameter to gulp-watch invoked task

醉酒当歌 提交于 2020-01-01 11:39:48
问题 I am trying to pass a parameter to a task that is being invoked by gulp-watch. I need it because I am trying to build a modular framework. So if a file changes in module 1, the other modules don't need to be rebuild. And I want just one function to create the concatted & uglified files per module. This is what I got so far: //here I need the 'module' parameter gulp.task('script', function(module) { ... } gulp.task('watch', function() { gulp.watch('files/in/module1/*.js', ['script']); //here I

gulp plugin gulp-ruby-sass not compiling

让人想犯罪 __ 提交于 2020-01-01 10:17:22
问题 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/')); }); 回答1: The gulp-ruby-sass syntax has been changed: instead of: it is now: gulp.task(

gulp plugin gulp-ruby-sass not compiling

余生颓废 提交于 2020-01-01 10:17:08
问题 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/')); }); 回答1: The gulp-ruby-sass syntax has been changed: instead of: it is now: gulp.task(