gulp

Extracting typescript exports to json file using gulp

二次信任 提交于 2019-12-13 07:26:15
问题 I have several typescript files, some of them export a certain var - named APIS - which is an array of objects. I want to extract the values of all of these exports, and pipe them to a json file using gulp. For example, I have a folder named services, with 3 files: service1.ts, service2.ts, service3.ts. service1.ts: ... export const APIS = [ { "field1" : "blabla" } ]; service2.ts: ... export const APIS = [ { "field2" : "yadayada" }, { "field3" : "yadabla" } ]; service3.ts: - does not export

Gulp and Bower - creating proper files structure

最后都变了- 提交于 2019-12-13 07:14:51
问题 I'm adding Bower to project which is using Gulp already. My folder structure is like: |- bower_components | |- dependency1 | | |- dist | | |- lib1.js | | |- lib1.min.js | | | |- dependency2 | |- core | |- sub | | |- extra.js | | | |- lib2.js | |- target |- js I have already managed to copy all 3rd party libreries to target/js using main-bower-files and bower-normalize. But it's flatten (and I didn't set bower-normalize option flatten to true!), so it's looks like: target |- js |- lib1.js |-

heroku using gulp - no error in logs - still

Deadly 提交于 2019-12-13 07:01:12
问题 I am trying to setup heroku deploy using gulp... 2015-05-31T12:39:43.160121+00:00 app[web.1]: [12:39:43] Webserver started at http://localhost:24018 2015-05-31T12:39:43.208954+00:00 app[web.1]: [12:39:43] Finished 'serve' after 544 ms 2015-05-31T12:40:39.255239+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch 2015-05-31T12:40:39.255427+00:00 heroku[web.1]: Stopping process with SIGKILL as per the logs webserver does get started

How to use the new Browserify API?

风格不统一 提交于 2019-12-13 05:24:58
问题 I am currently working on a ReactJS project, so I decided to setup a workflow using Gulp to manage the uglification, minification, JSX transformation and so on. The problem is that the Browserify API is constantly changing (the documentation is not being updated quite often) we can no longer use options inside bundle() As it is stated by the log error message : "Move all option arguments to the Browserify() constructor" But not all the options I am using are available, here is my code for now

ES6 transpiler + browserify + gulp

筅森魡賤 提交于 2019-12-13 05:24:10
问题 I am trying to create a gulp task that takes code generated from the ES6 module transpile (using CJS), and use browserify to turn that into a single file. I have the following code:- var gulp = require('gulp'); var browserify = require('gulp-browserify'); var es6transpiler = require('gulp-es6-module-transpiler'); var rjs = require('gulp-requirejs'); gulp.task('jscompile', function () { gulp.src('./app/scripts/**/*.js') .pipe(es6transpiler({ type : "cjs" })) .pipe(gulp.dest('./dist')) .pipe

gulp-tag-version running command?

主宰稳场 提交于 2019-12-13 04:58:22
问题 I installed gulp-tag-version, but when I am running the command 'gulp tag v1.1.1', it will not confirm this as a task var gulp = require('gulp'); var tag_version = require('gulp-tag-version'); gulp.task('tag', function() { return gulp.src(['./package.json']).pipe(tag_version()); }); So what am I doing wrong ? 回答1: It looks like it has been added correct. The command however would be: gulp tag Which would look at the version in your package.json file and tag the last commit with it. Refer to

Run gulp programmatically in memory

南笙酒味 提交于 2019-12-13 04:58:17
问题 Specific question Can I run gulp from node and get a return var from it without manipulating any files, just reading from them? More background I am trying to build something not unlike Modernizr's build tool. I have several files on disk and want to give the visitor the chance to select a subset of those in a form and submit it. What should happen then is the visitor will get a download as an return of the submission (a zip file) with those files he/she selected curated and processed

How do I ignore a file using gulp?

久未见 提交于 2019-12-13 04:51:25
问题 I have the following folder and file structure: Vendor bootstrap css -bootstrap.css js -bootstrap.js font-awesome css -font-awesome.css nivo-slider -nivo-slider.css theme -theme.css -theme-animate.css -theme-blog.css -theme-responsive.css -theme-shop.css I am trying to make sure that the css files are added to the stream in this specific order: 1) The bootstrap.css file src/vendor/bootstrap/css/bootstrap.css 2) All of the other css files inside the 'src/vendor/' sub-directories in no

“WARN peerdependencies” while installing Semantic-UI

ぐ巨炮叔叔 提交于 2019-12-13 04:36:56
问题 I followed all the instructions posted on the Semantic-UI website in order to install the framework, namely: Install node: I have confirmed it was installed properly by running node -v, to which I get "v0.12.7". Node is installed in /usr/local/include and I have already unpdated the $PATH to reflect the changes. Install gulp: I ran sudo npm install -g gulp to install gulp globally in /usr/local/lib/node_modules (non-sudo command gave me errors and suggested the sudo command) I cd to my

libsass bindings not found when running gulp dist

给你一囗甜甜゛ 提交于 2019-12-13 04:35:01
问题 I'm trying to use a gulp project on my Linux machine. The readme for the project tells me to first run sudo npm install -g gulp bower , then in the project directory run sudo npm install and then bower install . Everything up to this point works just fine for me. However, after that I try to run gulp dist and get this error: Error: `libsass` bindings not found in /[PROJECT DIRECTORY]/trunk/node_modules/gulp-sass/node_modules/node-sass/vendor/linux-x64-14/binding.node. Try reinstalling `node