Git Product home page Git Product logo

gulp-bro's People

Contributors

dependabot[bot] avatar dylanpiercey avatar fralonra avatar greenkeeper[bot] avatar greenkeeperio-bot avatar ngryman avatar shannonmoeller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gulp-bro's Issues

Excluding a module

I am trying to exclude some modules from my build but it's not working. How can I fix this?

const config = {
  exclude: ['sockjs-client', 'ws'],
  transform: [
    babelify.configure({presets: ['es2015']}),
    ['configurify', {pattern: "**/*config.js"}],
    ['uglifyify', {global: true}]
  ]
};

How do I make errors fatal, causing gulp to fail

What currently happens:
When a require('module') fails, gulp-bro reports the error, but carries on.

What I want to happen
When a require('module') fails, gulp-bro causes a fatal stop to the build.

const {src, dest} = require('gulp');
const bro = require('gulp-bro')

function js() {
    return src(paths.src.js)
        .pipe(bro())
        .on('Error', function () {

        })
        .pipe(dest(paths.dest.js))
};

Cache is not properly working

I have a foo.js with the following content:

require('bar.js')
require('foo.pug')

bar.js is:

require('bar.pug')

I'm using the following configuration along with a custom transform. Touching foo.js causes both foo.pug and bar.pug to compile.

However, in this configuration of browserify does not trigger bar.pug compilation when foo.js is touched.

I think they both works wrong because either of them should never trigger .pug file compilation when I touched a .js file.

Sorry for not providing a full, bare reproduction code but I thought you can guess what happens.

update browserify to version 16

Could you update your package.json (if it is enough?) browserify version to 16, in order to be able to use split-require with your gulp plugin please?

Using with browserify-shim

How would you globaly include lets say jQuery. Here is what currently I am testing:

gulpfile.js

gulp.src('src/scripts/app.js')
    .pipe(bro({
      transform: [['browserify-shim' , { global: true }]]
    }))
    .pipe(gulp.dest('.tmp/scripts'))
    .pipe(reload({stream: true}));

package.json

"dependencies": {
    "browserify-shim": "^3.8.14",
    "jquery": "^3.3.1",
    "select2": "select2/select2",
  },
  "browserify": {
    "transform": [
      "browserify-shim"
    ]
  },
  "browserify-shim": {
    "jquery": "global:jQuery"
  }

I am currently trying to implement select2 and I am having problems.

Usage with TypeScript

How to use with TypeScript? Following code was working with gulp-browserify but with gulp-bro i get the error:

Error: Cannot find module 'Users/[...]/src/main.js' from '/Users/[...]/src/scripts'

Gulp task:

 return gulp
        .src('./src/**/*.ts')
        .pipe(sourcemaps.init())
        .pipe(ts.createProject('tsconfig.json')())
        .pipe(bro())
        .pipe(sourcemaps.write())

gulp.src(...).then is not a function

I used the code you provided in the readme (while adding missing require statements):

var gulp = require('gulp');
var bro = require('gulp-bro');

gulp.task('build', () =>
  gulp.src('app.js')
    .then(bro())
    .then(gulp.dest('dist'))
)

gulp.watch('*.js', ['build'])

When running gulp build in the terminal, I get the following stack trace:

 TypeError: gulp.src(...).then is not a function
    at Gulp.<anonymous> (C:\Users\eric\workspace\Portfolio Sites\gulp_testing\gulpfile.js:13:6)
    at module.exports (C:\Users\eric\workspace\Portfolio Sites\gulp_testing\node_modules\orchestrator\lib\runTask.js:34:7)
    at Gulp.Orchestrator._runTask (C:\Users\eric\workspace\Portfolio Sites\gulp_testing\node_modules\orchestrator\index.js:273:3)
    at Gulp.Orchestrator._runStep (C:\Users\eric\workspace\Portfolio Sites\gulp_testing\node_modules\orchestrator\index.js:214:10)
    at Gulp.Orchestrator.start (C:\Users\eric\workspace\Portfolio Sites\gulp_testing\node_modules\orchestrator\index.js:134:8)
    at C:\Users\eric\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129:20
    at nextTickCallbackWith0Args (node.js:453:9)
    at process._tickCallback (node.js:382:13)
    at Function.Module.runMain (module.js:449:11)
    at startup (node.js:140:18)

Breaks gulp.watch

It seems that gulp.watch is not detecting changes when used with bro.

Unable to use global transforms.

Currently the only way I can find to use global transforms is programatically, before bundling. As such it is impossible to use them with bro.

var bundler = browserify(__dirname + '/index.js')
bundler.transform({ global: true }, 'uglifyify')

Sourcemaps

Is there a way to create sourcemaps with gulp-bro?

ParseError: Unexpected token

Thank you for this plugin! But is problem.

If import css style not from folder "node_modules" --- it will be work!

If import css style from folder "node_modules" --- it will not be work :(

[13:35:36] Finished 'eslint.js' after 189 ms
[13:35:36] [bro] SyntaxError

...\app_js\node_modules\cropperjs\dist\AppRoot.css:1
.button__GI_m1{padding:8px 12px;}

I use browserify-postcss
https://github.com/zoubin/browserify-postcss/

Single Bundle File?

Hi. Kudos for this - it's much nicer than calling Browserify's CLI from gulp :)

Is it possible to bundle the input scripts into a combined single file? I've only done this on the command line, and I didn't see any browserify options I could inject.

Thanks

Error: Cannot find module @gulp-sourcemaps

Hi,
while executing a task I get this error:
Error: Cannot find module 'D:\Maicol\Documents\Progetti\Web\personal\node_modules\@gulp-sourcemaps'
even though I have the package installed:

D:\Maicol\Documents\Progetti\Web\personal\node_modules>dir

 Directory: D:\Maicol\Documents\Progetti\Web\personal\node_modules

29/04/2020  17:27    <DIR>          .
29/04/2020  17:27    <DIR>          ..
29/04/2020  17:27    <DIR>          .bin
27/04/2020  18:35    <DIR>          .cache
29/04/2020  17:27            87.799 .yarn-integrity
29/04/2020  14:48    <DIR>          @gulp-sourcemaps
27/04/2020  20:17    <DIR>          @material
29/04/2020  14:48    <DIR>          acorn
29/04/2020  15:37    <DIR>          acorn-node
29/04/2020  15:37    <DIR>          acorn-walk
29/04/2020  13:54    <DIR>          ansi-colors
29/04/2020  13:54    <DIR>          ansi-gray
27/04/2020  20:17    <DIR>          ansi-regex
27/04/2020  20:17    <DIR>          ansi-styles
29/04/2020  13:54    <DIR>          ansi-wrap
29/04/2020  14:48    <DIR>          anymatch
29/04/2020  13:54    <DIR>          append-buffer
29/04/2020  13:54    <DIR>          archy
27/04/2020  20:17    <DIR>          arr-diff
29/04/2020  13:54    <DIR>          arr-filter
27/04/2020  20:17    <DIR>          arr-flatten
29/04/2020  13:54    <DIR>          arr-map
27/04/2020  20:17    <DIR>          arr-union
29/04/2020  13:54    <DIR>          array-each
29/04/2020  13:54    <DIR>          array-initial
29/04/2020  13:54    <DIR>          array-last
29/04/2020  13:54    <DIR>          array-slice
29/04/2020  13:54    <DIR>          array-sort
27/04/2020  20:17    <DIR>          array-unique
29/04/2020  15:37    <DIR>          asn1.js
29/04/2020  15:37    <DIR>          assert
27/04/2020  20:17    <DIR>          assign-symbols
29/04/2020  15:48    <DIR>          async
29/04/2020  13:54    <DIR>          async-done
27/04/2020  20:17    <DIR>          async-each
29/04/2020  13:54    <DIR>          async-settle
27/04/2020  20:17    <DIR>          atob
29/04/2020  17:27    <DIR>          autoprefixer
29/04/2020  13:54    <DIR>          bach
27/04/2020  20:17    <DIR>          balanced-match
27/04/2020  20:17    <DIR>          base
29/04/2020  15:37    <DIR>          base64-js
27/04/2020  20:17    <DIR>          binary-extensions
29/04/2020  15:37    <DIR>          bn.js
27/04/2020  20:17    <DIR>          brace-expansion
27/04/2020  20:17    <DIR>          braces
29/04/2020  15:37    <DIR>          brorand
29/04/2020  17:27    <DIR>          browser-pack
29/04/2020  15:37    <DIR>          browser-resolve
29/04/2020  17:27    <DIR>          browserify
29/04/2020  15:37    <DIR>          browserify-aes
29/04/2020  15:48    <DIR>          browserify-cache-api
29/04/2020  15:37    <DIR>          browserify-cipher
29/04/2020  15:37    <DIR>          browserify-des
29/04/2020  15:48    <DIR>          browserify-incremental
29/04/2020  15:37    <DIR>          browserify-rsa
29/04/2020  15:37    <DIR>          browserify-sign
29/04/2020  15:37    <DIR>          browserify-zlib
29/04/2020  14:22    <DIR>          browserslist
29/04/2020  15:37    <DIR>          buffer
29/04/2020  13:54    <DIR>          buffer-equal
27/04/2020  20:17    <DIR>          buffer-from
29/04/2020  15:37    <DIR>          buffer-xor
29/04/2020  15:37    <DIR>          builtin-status-codes
29/04/2020  15:37    <DIR>          cache-base
29/04/2020  15:37    <DIR>          cached-path-relative
29/04/2020  13:54    <DIR>          camelcase
29/04/2020  14:22    <DIR>          caniuse-lite
29/04/2020  13:54    <DIR>          chalk
29/04/2020  15:37    <DIR>          chokidar
29/04/2020  15:37    <DIR>          cipher-base
27/04/2020  20:17    <DIR>          class-utils
29/04/2020  13:54    <DIR>          cliui
29/04/2020  13:54    <DIR>          clone
29/04/2020  13:54    <DIR>          clone-buffer
29/04/2020  13:54    <DIR>          clone-stats
29/04/2020  13:54    <DIR>          cloneable-readable
27/04/2020  20:17    <DIR>          code-point-at
29/04/2020  13:54    <DIR>          collection-map
27/04/2020  20:17    <DIR>          collection-visit
27/04/2020  20:17    <DIR>          color-convert
27/04/2020  20:17    <DIR>          color-name
29/04/2020  13:54    <DIR>          color-support
29/04/2020  15:37    <DIR>          combine-source-map
29/04/2020  15:37    <DIR>          component-emitter
27/04/2020  20:17    <DIR>          concat-map
27/04/2020  20:17    <DIR>          concat-stream
29/04/2020  15:37    <DIR>          console-browserify
29/04/2020  15:37    <DIR>          constants-browserify
29/04/2020  15:37    <DIR>          convert-source-map
27/04/2020  20:17    <DIR>          cookieconsent
27/04/2020  20:17    <DIR>          copy-descriptor
29/04/2020  13:54    <DIR>          copy-props
27/04/2020  20:17    <DIR>          core-util-is
29/04/2020  15:37    <DIR>          create-ecdh
29/04/2020  15:37    <DIR>          create-hash
29/04/2020  15:37    <DIR>          create-hmac
29/04/2020  15:37    <DIR>          crypto-browserify
29/04/2020  14:48    <DIR>          css
29/04/2020  14:48    <DIR>          css-tree
29/04/2020  14:37    <DIR>          csso
29/04/2020  13:54    <DIR>          d
29/04/2020  15:37    <DIR>          dash-ast
29/04/2020  13:54    <DIR>          debug
29/04/2020  14:48    <DIR>          debug-fabulous
27/04/2020  20:17    <DIR>          decamelize
27/04/2020  20:17    <DIR>          decode-uri-component
29/04/2020  13:54    <DIR>          default-compare
29/04/2020  13:54    <DIR>          default-resolution
27/04/2020  20:17    <DIR>          define-properties
27/04/2020  20:17    <DIR>          define-property
29/04/2020  15:37    <DIR>          defined
29/04/2020  17:27    <DIR>          deps-sort
29/04/2020  15:37    <DIR>          des.js
27/04/2020  20:17    <DIR>          desandro-matches-selector
27/04/2020  20:17    <DIR>          detect-file
29/04/2020  14:48    <DIR>          detect-newline
29/04/2020  15:37    <DIR>          detective
29/04/2020  17:27    <DIR>          diffie-hellman
29/04/2020  15:37    <DIR>          domain-browser
29/04/2020  15:37    <DIR>          duplexer2
27/04/2020  20:17    <DIR>          duplexify
29/04/2020  13:54    <DIR>          each-props
29/04/2020  14:22    <DIR>          electron-to-chromium
29/04/2020  15:37    <DIR>          elliptic
27/04/2020  20:17    <DIR>          end-of-stream
29/04/2020  13:54    <DIR>          error-ex
29/04/2020  14:48    <DIR>          es5-ext
29/04/2020  13:54    <DIR>          es6-iterator
29/04/2020  13:54    <DIR>          es6-symbol
29/04/2020  13:54    <DIR>          es6-weak-map
27/04/2020  20:17    <DIR>          escape-string-regexp
27/04/2020  20:17    <DIR>          ev-emitter
29/04/2020  14:48    <DIR>          event-emitter
29/04/2020  15:37    <DIR>          events
29/04/2020  15:37    <DIR>          evp_bytestokey
27/04/2020  20:17    <DIR>          expand-brackets
27/04/2020  20:17    <DIR>          expand-tilde
29/04/2020  13:54    <DIR>          ext
29/04/2020  13:54    <DIR>          extend
27/04/2020  20:17    <DIR>          extend-shallow
27/04/2020  20:17    <DIR>          extglob
29/04/2020  17:27    <DIR>          fancy-log
29/04/2020  15:37    <DIR>          fast-safe-stringify
27/04/2020  20:17    <DIR>          fill-range
29/04/2020  13:54    <DIR>          find-up
29/04/2020  13:54    <DIR>          findup-sync
29/04/2020  13:54    <DIR>          fined
27/04/2020  20:17    <DIR>          fizzy-ui-utils
29/04/2020  13:54    <DIR>          flagged-respawn
27/04/2020  20:17    <DIR>          flush-write-stream
27/04/2020  20:17    <DIR>          for-in
29/04/2020  13:54    <DIR>          for-own
27/04/2020  20:17    <DIR>          fragment-cache
29/04/2020  13:54    <DIR>          fs-mkdirp-stream
27/04/2020  20:17    <DIR>          fs.realpath
27/04/2020  20:17    <DIR>          function-bind
29/04/2020  15:37    <DIR>          get-assigned-identifiers
27/04/2020  20:17    <DIR>          get-caller-file
27/04/2020  20:17    <DIR>          get-size
27/04/2020  20:17    <DIR>          get-value
27/04/2020  20:17    <DIR>          gettext-translator
27/04/2020  20:17    <DIR>          glob
27/04/2020  20:17    <DIR>          glob-parent
29/04/2020  13:54    <DIR>          glob-stream
29/04/2020  15:37    <DIR>          glob-watcher
29/04/2020  13:54    <DIR>          global-modules
29/04/2020  17:27    <DIR>          global-prefix
29/04/2020  13:54    <DIR>          glogg
27/04/2020  20:17    <DIR>          graceful-fs
29/04/2020  17:27    <DIR>          gulp
29/04/2020  14:22    <DIR>          gulp-autoprefixer
29/04/2020  15:48    <DIR>          gulp-bro
29/04/2020  17:27    <DIR>          gulp-cli
29/04/2020  14:37    <DIR>          gulp-csso
29/04/2020  13:54    <DIR>          gulp-dart-sass
29/04/2020  14:48    <DIR>          gulp-sourcemaps
29/04/2020  13:54    <DIR>          gulplog
29/04/2020  15:37    <DIR>          has
27/04/2020  20:17    <DIR>          has-flag
27/04/2020  20:17    <DIR>          has-symbols
27/04/2020  20:17    <DIR>          has-value
27/04/2020  20:17    <DIR>          has-values
29/04/2020  15:37    <DIR>          hash-base
29/04/2020  15:37    <DIR>          hash.js
29/04/2020  15:37    <DIR>          hmac-drbg
27/04/2020  20:17    <DIR>          homedir-polyfill
29/04/2020  13:54    <DIR>          hosted-git-info
29/04/2020  15:37    <DIR>          htmlescape
29/04/2020  15:37    <DIR>          https-browserify
29/04/2020  15:37    <DIR>          ieee754
27/04/2020  20:17    <DIR>          inflight
27/04/2020  20:17    <DIR>          inherits
27/04/2020  20:17    <DIR>          ini
29/04/2020  15:37    <DIR>          inline-source-map
29/04/2020  17:27    <DIR>          insert-module-globals
27/04/2020  20:17    <DIR>          interpret
29/04/2020  13:54    <DIR>          invert-kv
29/04/2020  13:54    <DIR>          is-absolute
29/04/2020  13:54    <DIR>          is-accessor-descriptor
29/04/2020  13:54    <DIR>          is-arrayish
27/04/2020  20:17    <DIR>          is-binary-path
27/04/2020  20:17    <DIR>          is-buffer
29/04/2020  13:54    <DIR>          is-data-descriptor
29/04/2020  13:54    <DIR>          is-descriptor
27/04/2020  20:17    <DIR>          is-extendable
27/04/2020  20:17    <DIR>          is-extglob
29/04/2020  13:54    <DIR>          is-fullwidth-code-point
27/04/2020  20:17    <DIR>          is-glob
29/04/2020  13:54    <DIR>          is-negated-glob
29/04/2020  13:54    <DIR>          is-number
27/04/2020  20:17    <DIR>          is-plain-object
29/04/2020  14:48    <DIR>          is-promise
29/04/2020  13:54    <DIR>          is-relative
29/04/2020  13:54    <DIR>          is-unc-path
29/04/2020  13:54    <DIR>          is-utf8
29/04/2020  13:54    <DIR>          is-valid-glob
27/04/2020  20:17    <DIR>          is-windows
29/04/2020  15:37    <DIR>          isarray
27/04/2020  20:17    <DIR>          isexe
27/04/2020  20:17    <DIR>          isobject
27/04/2020  20:17    <DIR>          isotope-layout
27/04/2020  20:17    <DIR>          jquery
29/04/2020  15:37    <DIR>          json-stable-stringify
29/04/2020  13:54    <DIR>          json-stable-stringify-without-jsonify
29/04/2020  15:37    <DIR>          jsonify
29/04/2020  15:37    <DIR>          jsonparse
29/04/2020  15:37    <DIR>          JSONStream
29/04/2020  13:54    <DIR>          just-debounce
29/04/2020  13:54    <DIR>          kind-of
29/04/2020  15:37    <DIR>          labeled-stream-splicer
29/04/2020  13:54    <DIR>          last-run
29/04/2020  13:54    <DIR>          lazystream
29/04/2020  13:54    <DIR>          lcid
29/04/2020  13:54    <DIR>          lead
29/04/2020  13:54    <DIR>          liftoff
29/04/2020  13:54    <DIR>          load-json-file
29/04/2020  14:22    <DIR>          locate-path
29/04/2020  13:54    <DIR>          lodash.clonedeep
29/04/2020  15:37    <DIR>          lodash.memoize
29/04/2020  14:48    <DIR>          lru-queue
29/04/2020  13:54    <DIR>          make-iterator
27/04/2020  20:17    <DIR>          map-cache
27/04/2020  20:17    <DIR>          map-visit
27/04/2020  20:17    <DIR>          masonry-layout
29/04/2020  13:54    <DIR>          matchdep
29/04/2020  15:37    <DIR>          md5.js
29/04/2020  14:37    <DIR>          mdn-data
29/04/2020  14:48    <DIR>          memoizee
27/04/2020  20:17    <DIR>          micromatch
29/04/2020  15:37    <DIR>          miller-rabin
29/04/2020  15:37    <DIR>          minimalistic-assert
29/04/2020  15:37    <DIR>          minimalistic-crypto-utils
27/04/2020  20:17    <DIR>          minimatch
29/04/2020  15:37    <DIR>          minimist
27/04/2020  20:17    <DIR>          mixin-deep
29/04/2020  15:37    <DIR>          mkdirp-classic
29/04/2020  17:27    <DIR>          module-deps
29/04/2020  13:54    <DIR>          ms
29/04/2020  13:54    <DIR>          mute-stdout
27/04/2020  20:17    <DIR>          nanomatch
29/04/2020  14:48    <DIR>          next-tick
29/04/2020  14:22    <DIR>          node-releases
29/04/2020  17:27    <DIR>          normalize-package-data
29/04/2020  14:48    <DIR>          normalize-path
29/04/2020  14:22    <DIR>          normalize-range
29/04/2020  13:54    <DIR>          now-and-later
29/04/2020  14:22    <DIR>          num2fraction
27/04/2020  20:17    <DIR>          number-is-nan
29/04/2020  14:48    <DIR>          object-assign
29/04/2020  13:54    <DIR>          object-copy
27/04/2020  20:17    <DIR>          object-keys
27/04/2020  20:17    <DIR>          object-visit
27/04/2020  20:17    <DIR>          object.assign
29/04/2020  13:54    <DIR>          object.defaults
29/04/2020  13:54    <DIR>          object.map
27/04/2020  20:17    <DIR>          object.pick
29/04/2020  13:54    <DIR>          object.reduce
27/04/2020  20:17    <DIR>          once
29/04/2020  13:54    <DIR>          ordered-read-streams
29/04/2020  15:37    <DIR>          os-browserify
29/04/2020  13:54    <DIR>          os-locale
27/04/2020  20:17    <DIR>          outlayer
29/04/2020  14:22    <DIR>          p-limit
29/04/2020  14:22    <DIR>          p-locate
29/04/2020  14:22    <DIR>          p-try
29/04/2020  15:37    <DIR>          pako
29/04/2020  15:37    <DIR>          parents
29/04/2020  15:37    <DIR>          parse-asn1
29/04/2020  13:54    <DIR>          parse-filepath
29/04/2020  13:54    <DIR>          parse-json
29/04/2020  13:54    <DIR>          parse-node-version
27/04/2020  20:17    <DIR>          parse-passwd
27/04/2020  20:17    <DIR>          pascalcase
29/04/2020  15:37    <DIR>          path-browserify
27/04/2020  20:17    <DIR>          path-dirname
29/04/2020  13:54    <DIR>          path-exists
27/04/2020  20:17    <DIR>          path-is-absolute
27/04/2020  20:17    <DIR>          path-parse
29/04/2020  15:37    <DIR>          path-platform
29/04/2020  13:54    <DIR>          path-root
29/04/2020  13:54    <DIR>          path-root-regex
29/04/2020  13:54    <DIR>          path-type
29/04/2020  15:37    <DIR>          pbkdf2
27/04/2020  20:17    <DIR>          picomatch
29/04/2020  13:54    <DIR>          pify
27/04/2020  20:17    <DIR>          pinkie
27/04/2020  20:17    <DIR>          pinkie-promise
29/04/2020  14:22    <DIR>          pkg-up
29/04/2020  13:54    <DIR>          plugin-error
27/04/2020  20:17    <DIR>          posix-character-classes
29/04/2020  14:22    <DIR>          postcss
29/04/2020  14:22    <DIR>          postcss-value-parser
29/04/2020  13:54    <DIR>          pretty-hrtime
29/04/2020  15:37    <DIR>          process
27/04/2020  20:17    <DIR>          process-nextick-args
27/04/2020  20:17    <DIR>          promise-polyfill
29/04/2020  15:37    <DIR>          public-encrypt
29/04/2020  13:54    <DIR>          pump
29/04/2020  13:54    <DIR>          pumpify
29/04/2020  15:37    <DIR>          punycode
29/04/2020  15:37    <DIR>          querystring
29/04/2020  15:37    <DIR>          querystring-es3
29/04/2020  15:37    <DIR>          randombytes
29/04/2020  15:37    <DIR>          randomfill
29/04/2020  15:37    <DIR>          read-only-stream
29/04/2020  13:54    <DIR>          read-pkg
29/04/2020  13:54    <DIR>          read-pkg-up
29/04/2020  14:54    <DIR>          readable-stream
27/04/2020  20:17    <DIR>          readdirp
29/04/2020  13:54    <DIR>          rechoir
27/04/2020  20:17    <DIR>          regex-not
29/04/2020  13:54    <DIR>          remove-bom-buffer
29/04/2020  15:37    <DIR>          remove-bom-stream
27/04/2020  20:17    <DIR>          remove-trailing-separator
27/04/2020  20:17    <DIR>          repeat-element
27/04/2020  20:17    <DIR>          repeat-string
29/04/2020  13:54    <DIR>          replace-ext
29/04/2020  13:54    <DIR>          replace-homedir
27/04/2020  20:17    <DIR>          require-directory
27/04/2020  20:17    <DIR>          require-main-filename
27/04/2020  20:17    <DIR>          resolve
29/04/2020  13:54    <DIR>          resolve-dir
29/04/2020  13:54    <DIR>          resolve-options
27/04/2020  20:17    <DIR>          resolve-url
27/04/2020  20:17    <DIR>          ret
29/04/2020  15:37    <DIR>          ripemd160
29/04/2020  15:37    <DIR>          safe-buffer
27/04/2020  20:17    <DIR>          safe-regex
29/04/2020  15:37    <DIR>          sass
27/04/2020  20:17    <DIR>          semver
29/04/2020  13:54    <DIR>          semver-greatest-satisfied-range
27/04/2020  20:17    <DIR>          set-blocking
27/04/2020  20:17    <DIR>          set-value
29/04/2020  15:37    <DIR>          sha.js
29/04/2020  15:37    <DIR>          shasum
29/04/2020  15:37    <DIR>          shasum-object
29/04/2020  15:37    <DIR>          shell-quote
29/04/2020  15:37    <DIR>          simple-concat
29/04/2020  14:48    <DIR>          snapdragon
27/04/2020  20:17    <DIR>          snapdragon-node
29/04/2020  13:54    <DIR>          snapdragon-util
29/04/2020  14:48    <DIR>          source-map
29/04/2020  17:27    <DIR>          source-map-resolve
27/04/2020  20:17    <DIR>          source-map-url
29/04/2020  13:54    <DIR>          sparkles
29/04/2020  13:54    <DIR>          spdx-correct
29/04/2020  13:54    <DIR>          spdx-exceptions
29/04/2020  13:54    <DIR>          spdx-expression-parse
29/04/2020  13:54    <DIR>          spdx-license-ids
27/04/2020  20:17    <DIR>          split-string
29/04/2020  13:54    <DIR>          stack-trace
27/04/2020  20:17    <DIR>          static-extend
29/04/2020  15:37    <DIR>          stream-browserify
29/04/2020  15:37    <DIR>          stream-combiner2
29/04/2020  13:54    <DIR>          stream-exhaust
29/04/2020  15:37    <DIR>          stream-http
27/04/2020  20:17    <DIR>          stream-shift
29/04/2020  15:37    <DIR>          stream-splicer
29/04/2020  13:54    <DIR>          string-width
29/04/2020  15:37    <DIR>          string_decoder
27/04/2020  20:17    <DIR>          strip-ansi
29/04/2020  13:54    <DIR>          strip-bom
29/04/2020  14:48    <DIR>          strip-bom-string
29/04/2020  15:37    <DIR>          subarg
29/04/2020  13:54    <DIR>          supports-color
29/04/2020  13:54    <DIR>          sver-compat
27/04/2020  20:17    <DIR>          sweetalert2
29/04/2020  15:37    <DIR>          syntax-error
29/04/2020  15:37    <DIR>          through
27/04/2020  20:17    <DIR>          through2
29/04/2020  13:54    <DIR>          through2-filter
29/04/2020  13:54    <DIR>          time-stamp
29/04/2020  15:37    <DIR>          timers-browserify
29/04/2020  14:48    <DIR>          timers-ext
29/04/2020  13:54    <DIR>          to-absolute-glob
29/04/2020  13:54    <DIR>          to-object-path
27/04/2020  20:17    <DIR>          to-regex
27/04/2020  20:17    <DIR>          to-regex-range
29/04/2020  13:54    <DIR>          to-through
27/04/2020  20:17    <DIR>          tslib
29/04/2020  15:37    <DIR>          tty-browserify
29/04/2020  13:54    <DIR>          type
27/04/2020  20:17    <DIR>          typedarray
29/04/2020  15:37    <DIR>          umd
29/04/2020  13:54    <DIR>          unc-path-regex
29/04/2020  15:37    <DIR>          undeclared-identifiers
29/04/2020  13:54    <DIR>          undertaker
29/04/2020  13:54    <DIR>          undertaker-registry
27/04/2020  20:17    <DIR>          union-value
29/04/2020  13:54    <DIR>          unique-stream
27/04/2020  20:17    <DIR>          unset-value
27/04/2020  20:17    <DIR>          upath
27/04/2020  20:17    <DIR>          urix
29/04/2020  15:37    <DIR>          url
27/04/2020  20:17    <DIR>          use
29/04/2020  15:37    <DIR>          util
27/04/2020  20:17    <DIR>          util-deprecate
29/04/2020  13:54    <DIR>          v8flags
29/04/2020  13:54    <DIR>          validate-npm-package-license
29/04/2020  13:54    <DIR>          value-or-function
29/04/2020  13:54    <DIR>          vinyl
29/04/2020  13:54    <DIR>          vinyl-fs
29/04/2020  13:54    <DIR>          vinyl-sourcemap
29/04/2020  14:48    <DIR>          vinyl-sourcemaps-apply
29/04/2020  15:37    <DIR>          vm-browserify
27/04/2020  20:17    <DIR>          which
29/04/2020  13:54    <DIR>          which-module
29/04/2020  13:54    <DIR>          wrap-ansi
27/04/2020  20:17    <DIR>          wrappy
27/04/2020  20:17    <DIR>          xtend
29/04/2020  13:54    <DIR>          y18n
29/04/2020  15:37    <DIR>          yargs
29/04/2020  15:37    <DIR>          yargs-parser

Could you help me?
Thanks

How to add plugin with options

const browserify = require('browserify');
const distillify = require('distillify');
const b = browserify({ entries: ['example/entry.js']});
b.plugin(distillify, {
  outputs: {
    file: write('example/build.vendor.js'),
    pattern: 'node_modules/**',
  },
});

Seems that is not possible with gulp-bro

g.bro({
   plugin: [distillify]
})

And browserify/index.js

    [].concat(opts.plugin).filter(Boolean).forEach(function (p) {
        self.plugin(p, { basedir: opts.basedir });
    });

Only basedir option will be passed to plugin if we are using browserify(options)

React and jsx scripts not getting compiled on windows 10

I switched to this package today over gulp-browserify after discovering that gulp-browserify is no longer being maintained. On Mac OS I can build my jsx and it makes it into the output where I expect it. However, on Windows 10 it does not include anything but the following javascript:

(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({},{},[]);

If I switch back to gulp-browserify on Windows 10, it works just fine. So I think this issue is with gulp-bro, but I need to investigate further to determine what the cause of the issue is.

Has anyone else had any issues running gulp-bro on Windows?

browserify and watchify as peer dependencies

Would it make sense to make browserify and watchify peer dependencies? Right now, they are defined as hard dependencies of this plugin, but maybe project consuming it uses different version of those tools (e.g. you’re on ^13.0.0 for browserify, but your project, for whatever reason, uses ^10.0.0).

Support for multiple bundles

I want to be able to split my source into multiple bundles as per https://github.com/substack/node-browserify#multiple-bundles

I am currently splitting into a 3rd party bundle and my source. Calling browserify on the 3rd part code and then gulp-bro on my code. This makes the incremental building a lot quicker.

This relies on being able to set the external flag which doesn't seem possible with the current configuration options as the Opt object doesn't include externals.

Please correct me if I'm wrong and there's a way to do this that I've missed.

Gulp-bro doesn't seem to work on stream, but on files?

My scenario is the following.

I have a token, @@imports@@, in my JS source, and I am trying to generate a list of import statements based on js files in a folder.

Gulp pipeline, componentImportString is a variable containing the import statements.

  return gulp.src('src/js/index.js')
    .pipe(through.obj(function (chunk, enc, callback) {
      if (chunk.isBuffer()) {
        chunk.contents = Buffer.from(chunk.contents.toString(enc).replace('// @@IMPORTS@@', componentImportString), enc);

        this.push(chunk);
      }

      callback();
    }))
    .pipe(bro(browserifySettings))
    .pipe(rename('bundle.js'))
    .pipe(gulp.dest('dist/js'))

Note: I started with a simpler gulp-replace, but the results have been the same all the way through.

If I comment gulp-bro from my pipeline, I can see that the list of files are generated correctly, and transformed / replaced into the source as excpected.

But, when I run this with gulp-bro enabled, my transformation is completely ignored, it seems like gulp-bro work directly on files on disk, and not on the vinyl-stream in the pipeline.

Note 2: I have tried doing this transformation in browserify itself, but I am also running the esmify plugin, and it looks like browserify processes plugins before transformations, so thats not a solution either.

Not using the entry in incremental build

The changes made in entry are not being implemented in the incremental build, only first time it builds it builds correctly. Every incremental will remain the same, no matter the changes in the initial entry.

Rollup support

First of all; I love this plugin! I have replaced most of my browserify and source stream stuff to this and it works well.

I just have a feature request. Would it be possible to also support Rollup? Rollup-stream (https://github.com/Permutatrix/rollup-stream) is pretty much a drop-in replacement for Browserify. I think it would be nice if people can pick the backend they want and I personally believe that Rollup has a couple of advantages of Browserify.

If this is something worth pursuing for you, I also would not mind working on implementing it.

Remove bro build time log (toggle).

Would be nice if the logging here could be configurable since gulp already logs the time taken.
screen shot 2016-05-13 at 10 40 25 pm

Otherwise this module is awesome, always happy to delete a chunk of my own code / consolidate deps and the standard browserify-incremental setup is pretty clunky.

Creating a bundle using multiple entry files

My original build looked like

   let props = {
        entries: ['one.js', 'two.js'],
        transforms: [...]
    }
   let bundler = browserify(props)
        .bundle()
        .pipe(source(name + '.js'))
        .pipe(buffer())
        ...

How can I do something similar with gulp-bro?

  • Bundle multiple entry files
  • Create a new stream with different name using the resulting bundle

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.