gulp-src-files
Synchronous get filenames like a gulp.src
Last updated 5 years ago by 59naga .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-src-files 
SYNC missed versions from official npm registry.

gulp-src-files gulpSrcFiles NPM version Build Status Coverage Status

Synchronous get filenames like a gulp.src

example:

gulpSrcFiles= require 'gulp-src-files'
files= gulpSrcFiles [
  'my_components/**/*.coffee.'
  '!my_components/**/*.spec.coffee'
]
console.log files
###
 [ 
  '/path/to/my_components/index.coffee',
  '/path/to/my_components/users.coffee',
  '/path/to/my_components/images.coffee',
  ...
]
###

Usage for browserify

Can use expose option for browserify.require

gulpSrcFiles= require 'gulp-src-files'
files= gulpSrcFiles [
  'my_components/**/*.coffee.'
  '!my_components/**/*.spec.coffee'
],expose:true
console.log files
###
 [ 
  ['/path/to/my_components/index.coffee',{expose:'index.coffee'}],
  ['/path/to/my_components/users.coffee',{expose:'users.coffee'}],
  ['/path/to/my_components/images.coffee',{expose:'images.coffee'}],
  ...
]

or custom

gulpSrcFiles= require 'gulp-src-files'
files= gulpSrcFiles [
  'my_components/**/*.coffee.'
  '!my_components/**/*.spec.coffee'
],expose:(file)->
  path= require 'path'
  opts=
    expose: path.basename file,'.coffee'
  [file,opts]

console.log files
###
[ 
  ['/path/to/my_components/index.coffee',{expose:'index'}],
  ['/path/to/my_components/users.coffee',{expose:'users'}],
  ['/path/to/my_components/images.coffee',{expose:'images'}],
  ...
]
###

TODO

  • Write document for options

License

MIT by 59naga

Current Tags

  • 0.0.16                                ...           latest (5 years ago)

15 Versions

  • 0.0.16                                ...           5 years ago
  • 0.0.15                                ...           5 years ago
  • 0.0.14                                ...           5 years ago
  • 0.0.13                                ...           5 years ago
  • 0.0.12                                ...           5 years ago
  • 0.0.11                                ...           5 years ago
  • 0.0.10                                ...           5 years ago
  • 0.0.9                                ...           5 years ago
  • 0.0.8                                ...           5 years ago
  • 0.0.7                                ...           5 years ago
  • 0.0.6                                ...           5 years ago
  • 0.0.4                                ...           5 years ago
  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 45
Dependencies (3)
Dev Dependencies (11)

Copyright 2014 - 2017 © taobao.org |