Git Product home page Git Product logo

Comments (4)

ragingwind avatar ragingwind commented on July 30, 2024

I have to concern all of workflow of development of ChromeApps and compatibility of yeoman workflow of other generators. I think that using vulcanize is make little bit conflict with current workflow. I want to make it so nicely but... It might be a solution that make other workflow via sub-generator yo chromeapp:polymer but I'd like to keep in yeoman basic workflow. If Chrome supports HTML Imports in natively We don't have to use vulcanized(am I right?)

If we support new workflow? new directory structures is might be:

app-root\
  \src\
  \debug\ debug version files, vulcanized, compiled, not minified and optimized
  \release\ release version files vulcanized, compiled, minified and optimized.
  ....

User must be build before load a ChromeApps and has changed. we can watch src path to build automatically by monitor task.

Here is my suggestion, If we have to use vulcanize so workflow has been changed? We can make the generator to must be use Polymer. Polymer is default to make ChromeApps. the generator provides a few default project like a Polymer samples when project created. It seems like that create a OS/Android Project on their IDE

Here is sample:

yo chromeapp
Choose a template for your new project:
- Master - Detail Application
- Single view Application
- Tabbed Application

from generator-chromeapp.

davidmaxwaterman avatar davidmaxwaterman commented on July 30, 2024

"If Chrome supports HTML Imports in natively We don't have to use vulcanized(am I right?)"

I don't think that's correct. The issue is the CSP imposed by chrome on packaged apps - it restricts the inline script (and style?) that is used in so many of the examples, eg my-element.html :

<link rel="import" href="/components/polymer/polymer.html">
<!-- could be many imports, depending on what elements are used as part of this element -->

<polymer-element name="my-element">
  <template>
    <!-- style element -->
    <style>...</style>
    <!-- html elements defining element -->
  </template>
  <script>
    Polymer('proto-element', {
      ready: function() {
        //...
      }
    });
  </script>
</polymer-element>

The vulcanize tool extracts the <script> into a separate file.

It would be nice to get an additional build step in there, not only for things like vulcanize, but also any of the other pre-processors; but I can see how it presents a problem.

The problem with the leaving it up to the user to strip out <script> into a separate file is that the pre-built polymer elements (bower install Polymer/core-elements, for example) use these inline scripts.
I imagine it is only a simple use of polymer (eg where you use polymer to encapsulate your own elements) that relying on the dev to separate <script> into a separate file would work - anything more than simple and there needs to be vulcanize step.

Max.

[0] http://www.polymer-project.org/resources/faq.html#csp

from generator-chromeapp.

ragingwind avatar ragingwind commented on July 30, 2024

You're right. we should be used vulcanize with csp options to extracts scripts

from generator-chromeapp.

ragingwind avatar ragingwind commented on July 30, 2024

Close this issue. I will use PSK for this #59

from generator-chromeapp.

Related Issues (20)

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.