Coder Social home page Coder Social logo

broccoli-manifest's People

Contributors

arenoir avatar craigteegarden avatar csenf avatar matthewlehner avatar nonmanifold avatar sladwig avatar ssured avatar vectart avatar vitch 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

Watchers

 avatar

broccoli-manifest's Issues

FYI - Ember CLI Addon Support

We discussed this in IRC a bit earlier this morning, and I have implemented the plumbing needed for broccoli-manifest to become an addon and give it direct access to the final post-processed tree.

This PR is merged now:

ember-cli/ember-cli#1214

As part of this change I removed broccoli-asset-rev from being included internally in Ember CLI, and made it an addon. You can see the changes needed for that here:

ember-cli/broccoli-asset-rev#8

Hopefully, this is all you need, and the Ember CLI PR is merged before the next version is cut.

Not working in Chrome?

I've implemented broccoli-manifest in a test project and tested with success in Firefox and IE when I kill the server. Yet it doesn't seem to work in the latest version of Chrome. I still get the 'This webpage is not available' message.

I followed all installation steps. The ember-cli-build (the new broccoli file) file looks like this:

/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var mergeTrees = require('broccoli-merge-trees');
var writeManifest = require('broccoli-manifest');
var writeServiceWorker = require('broccoli-serviceworker');

module.exports = function(defaults) {
  var app = new EmberApp(defaults, {
    // Add options here
  });

  var completeTree = app.toTree()

  return mergeTrees([completeTree, writeManifest(completeTree), writeServiceWorker(completeTree)]);
};

Allow Caching of Nested Routes

Currently, the implementation only works for the top-level / domain, but if you try to view a resource offline like /posts, since there's no posts/index.html cached, you will get the offline page.

I have tried editing the fallback section to serve index.html, but this still fails because the browser will request manifest.appcache from the nested domain, so resource/manifest.appcache. My next idea was to duplicate the top-level assets and files in the manifest.appcache, and this worked, but the problem was that this new appcache generated from the nested resource was overwriting the appcache initially created on the top-level (/).

Are there any suggestions on configuring nested resources/routes to work in a SPA application? Perhaps this isn't related to this particular plugin, but I thought it might be useful to explain that this plugin cannot deal with nested resources.

Fingerprint assets

Would it make sense to fingerprint the assets in the manifest. If they're stored in the local browser cache, but they've changed, the mainfest will be updated, but the asset may not be. Not sure the internal workings of if an asset has changed whether it gets re-loaded when the manifest changes...

Transforming file paths to support absolute paths

I currently use "real" URLs in my ember app, which unfortunately breaks the manifest since it uses relative paths.

To get around this, it feels like there should be a mechanism to transform paths (e.g. to add support for CDNs as well).

Thoughts? I'll be coding up a quick implementation on my fork.

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.