Giter Site home page Giter Site logo

Comments (9)

hotforfeature avatar hotforfeature commented on July 30, 2024 2

I think that'd be entirely possible. I'll reopen this and adjust the title to track the work

from origami.

ahmadhsalim avatar ahmadhsalim commented on July 30, 2024 1

Crap. It's my bad. My bower_components folder was in a wrong directory. I spent the entire day trying to figure this out. Finally figured it out by looking at the angular-polymer-starter-kit.

from origami.

hotforfeature avatar hotforfeature commented on July 30, 2024 1

Verified the patch script works in my starter kit and published in v2.0.2!

I do kind of like having bower_components/ in the project root next to node_modules/, it's a much more familiar place coming from Polymer.

from origami.

hotforfeature avatar hotforfeature commented on July 30, 2024

Can you try running the patch cli script? Sounds like the webpack loader isn't added to Angular.

node node_modules/@codebakery/origami/patch-cli.js

from origami.

hotforfeature avatar hotforfeature commented on July 30, 2024

Does the readme need to be more clear about why the bower folder needs to be in a certain directory? I only instruct the developer to do so in https://github.com/hotforfeature/origami#2-use-bower-to-add-elements without a real reason.

Alternatively, did you have your bower folder in the default root directory? I may be able to modify the patch script to support either the root folder or the src folder.

from origami.

ahmadhsalim avatar ahmadhsalim commented on July 30, 2024

I'm setting it up on a Laravel application so I actually put the bower inside the public folder, which is how Polymer does it. Maybe you could specifically mention that part. I didn't actually catch the "app's root" part specified in the readme, I just assumed its the usual public folder.
But the way you have done is more preferable to me, because I'd like the vendor codes to be outside of public folder.

FYI: I'm creating a boilerplate with Laravel+Angular+Polymer.

from origami.

hotforfeature avatar hotforfeature commented on July 30, 2024

I looked at the Angular CLI code, and it does look like there is a variable exposed for both the app's root and the project's root directory. I can easily modify the patch script to include both when webpack is searching for bower modules.

from origami.

ahmadhsalim avatar ahmadhsalim commented on July 30, 2024

Would it be possible to get the bower folder straight from the .bowerrc file?

from origami.

hotforfeature avatar hotforfeature commented on July 30, 2024

Hm, almost verified. I need to add documentation about why bower_components/ should be in the app's folder somewhere if the app root isn't the same as the project root. It's needed if you refer to the components in the index.html, which I recommend for the webcomponents loader.

from origami.

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.