Giter Club home page Giter Club logo

Comments (8)

jejacks0n avatar jejacks0n commented on August 16, 2024

Ah... so, the source you link to is total bullshit, and I hate it, but sprockets + the railtie are such crap that it requires us to do that. Honestly, it drives me nuts.

And yes, external scripts are an oversight. How would you like it to be implemented? To include external libraries like this in your suite.javascripts configuration, or some other means?

from teaspoon.

iainbeeston avatar iainbeeston commented on August 16, 2024

Looking at my own projects, it seems like it'd have to be either in the suite config or in spec_helper.

The advantage of putting it in the suite config is that it'd be clean. The advantage of spec_helper is that I'm already putting my other dependencies in spec_helper, so it'd seem a natural place to put external libraries (although it's markedly different to what people are used to with sprockets)

Another option might just be asynchronously loading the external dependencies (by adding a script tag to the page) in spec_helper, which (I think) would work without any changes to teabag itself.

from teaspoon.

jejacks0n avatar jejacks0n commented on August 16, 2024

I went with adding the ability from within the suite config.. hopefully that covers the need.

I wish sprockets supported it itself though: sstephenson/sprockets#289

from teaspoon.

jkarmel avatar jkarmel commented on August 16, 2024

Can you give an example of how this works?

from teaspoon.

jkarmel avatar jkarmel commented on August 16, 2024

For example, if I want to include externally hosted javascript files on every suite, what do I need to do to get this up and running with teaspoon?

from teaspoon.

jkarmel avatar jkarmel commented on August 16, 2024

Hey sorry I figured this out, didn't read the docs carefully enough!

from teaspoon.

equiet avatar equiet commented on August 16, 2024

What is the solution here? I know I can make a boot partial where I can download what I need, but it's far from ideal.

from teaspoon.

jejacks0n avatar jejacks0n commented on August 16, 2024

you should be able to put them in the configuration in 0.8 (master)

suite.javascripts << ['//cdn.com/jquery']

from teaspoon.

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.