gulp

Gulp angular unit testing directive templateUrl

 ̄綄美尐妖づ 提交于 2019-12-01 12:04:52
问题 I read many post on internet and SO but couldn't find any solution that works I am trying to write unit test for a directive and want the html files to be served from template cache I am using Gulp as a build tool The gulp task for test looks like this gulp.task('test', function (done) { karma.start({ configFile:__dirname + '/' + config.test.karmaconf, singleRun: false }, done); }); and in karma.conf , I have defined browserify: { debug: true, transform: [['browserify-ng-html2js', { module:

Passing arguments to combined npm script

别说谁变了你拦得住时间么 提交于 2019-12-01 11:32:50
I have in my package.json the following "scripts": { ... "prod": "gulp build --production && webpack --env.config=production" } I now want to pass a parameter "theme" to both gulp and webpack to be able to adjust the output of the build process from the command line. I figured out how to pass it to webpack: npm run prod -- --env.theme=themename but gulp does not take care of this. I also played around with the yargs -package, processs.argv and bash string substitution by changing the npm script to "gulp build --production \"$1\" && webpack --env.config=production" but that did not work out

Jekyll clobbering directory in _site despite _config.yml.

醉酒当歌 提交于 2019-12-01 10:03:56
问题 I'm building a site with Jekyll and using Gulp to manage the assets. Since I'm using Gulp to manage my assets, I would like Jekyll to ignore ./assets in the conversion process and to leave ./_site/assets/ alone when building the rest of the site. I've configured the _config.yml with exclude: [assets] # Exclude assets/ from the conversion keep: [assets] # Don't delete _site/assets when building the site My gulpfile.js is: var gulp = require('gulp'); var sass = require('gulp-ruby-sass'); gulp

gulp时发生错误---------const { Math, Object } = primordials;

为君一笑 提交于 2019-12-01 09:59:21
【问题描述】 执行完npm install后,对前台页面进行gulp操作时,报如下错误: const { Math, Object } = primordials; 【错误日志】 ***@**** MINGW64 /d/workspace/*** /***/*** /src/mai n /webapp/ view/ master (develop) $ gulp fs.js: 27 const { Math, Object } = primordials; ^ ReferenceError: primordials is not defined at fs.js: 27 : 26 at req_ (D:\workspace\***\***\***\src\main\webapp \v iew\master \n ode_modules \n atives\index.js: 143 : 24 ) at Object.req [as require] (D:\workspace\***\***\***\src\main\webapp \v iew\master \n ode_modules \n atives\index.js: 55 : 10 ) at Object.<anonymous> (D:\workspace\***\***\***\src\main\webapp \v

Run Gulp tasks with loop

百般思念 提交于 2019-12-01 09:43:17
I have a problem with my Gulp tasks. I use one task to create multiple html files with gulp-mustache, so that I have two files (index_de.html and index_en.html) at the end. I have a .json file, that contains the strings. It all works fine. But I always end up with either both files being de or en, instead of one file per language. I already tried creating tasks using a loop [gulp] , but that doesn't work. Edit: to clarify: Both files contain the same content. Always. Seems randomly what language it will be, but it's always the same. My Gulp tasks looks like the following: gulp.task('mustache',

Why do some Gulp streams “flow” by default, while others do not?

我的未来我决定 提交于 2019-12-01 09:04:33
Consider these two gulp tasks: gulp.task('src', function(done) { gulp.src('docs/*') .on('end', function() { console.log('ending'); done(); }); }); gulp.task('dest', function(done) { gulp.src('docs/*') .pipe(gulp.dest('temp')) .on('end', function() { console.log('ending'); done(); }); }); Running gulp dest behaves as expected, outputting: [12:33:15] Using gulpfile ~/Projects/gulp-exit/gulpfile.js [12:33:15] Starting 'dest'... ending [12:33:15] Finished 'dest' after 13 ms However, running gulp src only outputs: [12:31:11] Using gulpfile gulpfile.js [12:31:11] Starting 'src'... The 'end' callback

Run Gulp tasks with loop

半腔热情 提交于 2019-12-01 08:48:06
问题 I have a problem with my Gulp tasks. I use one task to create multiple html files with gulp-mustache, so that I have two files (index_de.html and index_en.html) at the end. I have a .json file, that contains the strings. It all works fine. But I always end up with either both files being de or en, instead of one file per language. I already tried creating tasks using a loop [gulp], but that doesn't work. Edit: to clarify: Both files contain the same content. Always. Seems randomly what

gulp-load-plugins not loading plugins

China☆狼群 提交于 2019-12-01 07:02:09
gulp-load-plugins is not loading any plugins. Can anyone suggest why this might be? Node: v0.12.0 NPM: v2.7.3 My package.json : { "name": "foo", "version": "0.0.1", "dependencies": {}, "devDependencies": { "gulp": "^3.8.11", "gulp-load-plugins": "^0.9.0" } } My gulpfile.js : var gulp = require('gulp'); var gulpLoadPlugins = require('gulp-load-plugins'); var plugins = gulpLoadPlugins(); console.log(JSON.stringify(plugins)); // {} gulp.task('default'); Install other gulp plugins. tl;dr If that is your complete package.json , looks like you have no other gulp plugins installed. Lets say the

How to execute custom file specific command / task in Visual Studio?

。_饼干妹妹 提交于 2019-12-01 07:01:31
问题 I would like to be able to define custom commands/task/macro for a VisualStudio solution. Then I would like to execute that command for a file that is selected in the Solution Explorer . There are several possibilities to execute the command that would be fine for me: a) Right click on the file in the Solution Explorer and choose the command from the context menu (my favorite) b) Select a file in the Solution Explorer . Then click on a button on a tool bar. The command would then somehow

ASP.NET MVC, AngularJS, Bower and deploying site folder structure

怎甘沉沦 提交于 2019-12-01 06:51:37
I've read a lot of articles and questions about site folder structure (develop & deploy) and still have missunderstood about questions below. I marked my current folder structure: Orange- looks like lib or vendor folder, where i'd like to store independent components; Blue- folder contains my own, relative to current project (application) files; Green- ready to deploy folder, that contains minified & concated files, which used to be included in index.html. There are a few questions i'd like to find an answer: Is it correct, that the best practise is deploying to web server only dist folder?