Giter Club home page Giter Club logo

gulp-manifest's People

Contributors

alexander-akait avatar benediktvaldez avatar gronke avatar hbbbs avatar hildjj avatar hillmanov avatar jessehattabaugh avatar mariocasciaro avatar orkon avatar pgilad avatar satya164 avatar scottrain avatar shuhei avatar willfarrell 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  avatar

gulp-manifest's Issues

Windows path name support

It looks like Windows path names confuse this plugin. I have the following task set up:

gulp.task "manifest", ->
  gulp.src([ "public/**/*", "!public/app.manifest" ])
    .pipe(manifest(
      hash: true
      preferOnline: true
      network: [
        "http://*"
        "https://*"
        "*"
      ]
    ))
    .pipe(gulp.dest("public/app.manifest"))

This does not create the manifest file.

If I dump the value of manifestContents, I almost get the expected result. However, the CACHE: section contains escaped full path names such as:

c:%5Chtdocs%5Ctmdpw.eu%5Cpublic%5Cfavicon.ico

This is on Windows 8.1 x64 with node.js v0.11.11 (unstable) and Gulp 3.5.2.

Additionally, I ran the same code on Heroku, which didn't create the file either. Has Gulp's API changed? If you like, I'll open a separate issue for that, but maybe there's something wrong with my task instead?

Remove option exclude

IMO - this is redundant. You should only stream the files you wish to manifest into gulp-manifest. If you still need to exclude files - use gulp-filter.

include files from different domains

I'm trying to include files from different domains to my appcache, for instance jquery on a CDN.
I've tried different approaches to add entries to the files list that represent external files, but whatever I do those entries get filtered out.
Am I doing it wrong, or is it just not supported?

Timestamp default option does not apply

Running v0.1.1 without specifying an option for timestamp should default to true according to the README.
When running without specifying this option I do not get a timestamp & have to specify timestamp: true

Parent is undefined when timestamp is not explicitly set

It seems the parent object of timestamp is undefined when the property is not explicitly set. This is my setup:

gulp.task('app-manifest', function() {
  gulp.src(['public/js/*.js', 'public/css/*.css'])
    .pipe(manifest())
    .pipe(gulp.dest('public/app.manifest'));
});

Running the above produces the following output:

[gulp] Using file /Users/kaspertidemann/project/gulpfile.js
[gulp] Working directory changed to /Users/kaspertidemann/project/
[gulp] Running 'app-manifest'...
[gulp] Errored 'app-manifest' in 7.84 ms Cannot read property 'timestamp' of undefined

/Users/kaspertidemann/project/node_modules/gulp/node_modules/orchestrator/index.js:153
        throw err;
              ^
TypeError: Cannot read property 'timestamp' of undefined
  at manifest (/Users/kaspertidemann/project/node_modules/gulp-manifest/index.js:14:14)
  at Gulp.<anonymous> (/Users/kaspertidemann/project/gulpfile.js:112:9)
  at module.exports (/Users/kaspertidemann/project/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:31:7)
  at Gulp.Orchestrator._runTask (/Users/kaspertidemann/project/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
  at Gulp.Orchestrator._runStep (/Users/kaspertidemann/project/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
  at Gulp.Orchestrator.start (/Users/kaspertidemann/project/node_modules/gulp/node_modules/orchestrator/index.js:134:8)
  at startGulp (/usr/local/share/npm/lib/node_modules/gulp/bin/gulp.js:142:26)
  at /usr/local/share/npm/lib/node_modules/gulp/bin/gulp.js:134:5
  at process._tickCallback (node.js:415:13)
  at Function.Module.runMain (module.js:499:11)

Setting timestamp explicitly to either true or false remedies this problem. This seems to be a bug, no?

Gulp task fails if fallback value is a string

If I set the fallback value with a string, like the readme suggests is possible, like so

fallback: "/ /offline.html"

then my task fails miserably, like so

/path/to/code/project/node_modules/gulp-manifest/index.js:69
      options.fallback.forEach(function (file) {
                       ^
TypeError: undefined is not a function
    at Stream.endStream (/path/to/code/project/node_modules/gulp-manifest/index.js:69:24)
    at _end (/path/to/code/project/node_modules/gulp-manifest/node_modules/through/index.js:65:9)
    at Stream.stream.end (/path/to/code/project/node_modules/gulp-manifest/node_modules/through/index.js:74:5)
    at DestroyableTransform.onend (/path/to/code/project/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:523:10)
    at DestroyableTransform.g (events.js:199:16)
    at DestroyableTransform.emit (events.js:129:20)
    at /path/to/code/project/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:965:16
    at process._tickCallback (node.js:355:11)

License

This repo dies not contain license information. (The NPM package registry lists this package as MIT licensed)

@hillmanov can you please add a LICENSE file, so that we know under which license content of this repo is?

%5C instead of / when generating a manifest

Hi, I am not sure if that's wrong but instead of getting "/" in my paths I get "%5C". For example I get a path generated like this: "css%5Cmain.css" instead of "css/main.css".

I am running gulp in windows.

Npm release bump

Could you possibly release a new version on npm to include the latest pull request you merged ?

Broken paths

The generated manifest file no longer generates correct paths. for example, I've files under, /public/s/, when I run gulp-manifest with the options

      {
        basePath: "public",
        network: [ "*" ],
        timestamp: true,
        filename: "manifest.appcache"
    }

It produces,

CACHE MANIFEST
# Time: Mon Sep 07 2015 11:24:43 GMT+0000 (UTC)


CACHE:
scrollback-logo-dark.png
[email protected]
scrollback-logo-white.png
[email protected]
scrollback-logo.png
[email protected]
fonts/icons.eot
fonts/icons.svg
fonts/icons.ttf
fonts/icons.woff
scripts/app.bundle.min.js
styles/embed.min.css
styles/style.min.css


NETWORK:
*

It should produce this,

CACHE MANIFEST
# Time: Mon Sep 07 2015 11:29:40 GMT+0000 (UTC)


CACHE:
/s/assets/logo/scrollback-logo-dark.png
/s/assets/logo/[email protected]
/s/assets/logo/scrollback-logo-white.png
/s/assets/logo/[email protected]
/s/assets/logo/scrollback-logo.png
/s/assets/logo/[email protected]
/s/dist/fonts/icons.eot
/s/dist/fonts/icons.svg
/s/dist/fonts/icons.ttf
/s/dist/fonts/icons.woff
/s/dist/scripts/app.bundle.min.js
/s/dist/styles/embed.min.css
/s/dist/styles/style.min.css


NETWORK:
*

The absence of the paths is a biggie for me, which means cache will no longer work :(

This basically reverts #17 which is a genuine case.

I think the commit 4962ce0 is the culprit.

Can we please revert that commit, since it's a breaking change and doesn't provide any additional features, while breaking the existing ones.

Piping issue

There seems to be a piping problem with this plugin. This is my setup:

gulp.task('app-manifest', function() {
  gulp.src(['public/js/*.js', 'public/css/*.css'])
    .pipe(manifest({
      timestamp: true
    }))
    .pipe(gulp.dest('public/app.manifest'));
});

There are files in both the public/js and public/css folder. Running gulp app-manifest produces the following output:

[gulp] Using file /Users/kaspertidemann/project/gulpfile.js
[gulp] Working directory changed to /Users/kaspertidemann/project/
[gulp] Running 'app-manifest'...
[gulp] Finished 'app-manifest' in 9.3 ms

stream.js:94
      throw er; // Unhandled stream error in pipe.
        ^
TypeError: Arguments to path.resolve must be strings
  at Object.exports.resolve (path.js:313:15)
  at saveFile (/Users/kaspertidemann/project/node_modules/gulp/node_modules/vinyl-fs/lib/dest/index.js:15:26)
  at wrappedMapper (/Users/kaspertidemann/project/node_modules/gulp/node_modules/vinyl-fs/node_modules/map-stream/index.js:84:19)
  at Stream.stream.write (/Users/kaspertidemann/project/node_modules/gulp/node_modules/vinyl-fs/node_modules/map-stream/index.js:96:21)
  at Stream.ondata (stream.js:51:26)
  at Stream.EventEmitter.emit (events.js:95:17)
  at Stream.endStream (/Users/kaspertidemann/project/node_modules/gulp-manifest/index.js:80:10)
  at _end (/Users/kaspertidemann/project/node_modules/gulp-manifest/node_modules/through/index.js:65:9)
  at Stream.stream.end (/Users/kaspertidemann/project/node_modules/gulp-manifest/node_modules/through/index.js:74:5)
  at Stream.onend (stream.js:79:10)

Any idea what's going on here?

New Release

Can you please make a new release on npm? I would love to use gulp-manifest, but we are on Windows and we need #11 to fix the pathing issue. I cloned from source, and it does indeed fix the issue.

need file path prefix

dude, I'm sending static files to amazon s3 with gulp, every change. so I need prefix_path option.

Include cache entries in hash

Using the following example:

gulp.task('manifest', function(){
  gulp.src(['build/*'], { base: './' })
    .pipe(manifest({
      hash: true,
      cache: ['http://example.org/foo']
     }))
    .pipe(gulp.dest('build'));
});

Nothing about the cache'd URL goes into the hash. Ideally, you would try to download the resource (even more ideally using a local cache), and feed the resulting bytes into the hash. Less ideally, you could send a HEAD request to the URL, and include the ETag or Last-Modified header in the hash.

Even less ideally, you could at least include the URL itself in the hash.

The HEAD approach seems like the best bang-for-the-buck, but would need adequate fallbacks for HEAD failing or the interesting headers not being returned.

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.