Giter Site home page Giter Site logo

Comments (5)

cyberdelia avatar cyberdelia commented on August 22, 2024

Just to be sure do you have this in your settings :

PIPELINE_COMPILERS = (
    'pipeline.compilers.coffee.CoffeeScriptCompiler',
)

I have a similar setup and it works pretty well. Can you try to debug further or send me more data like what a listing of your files path and how the pipeline package final datastructure looks like ? Have a look at packager.py.

Thanks for your help.

from django-pipeline.

gerardo avatar gerardo commented on August 22, 2024

This is my current PIPELINE_COMPILERS.

PIPELINE_COMPILERS = (
  'pipeline.compilers.coffee.CoffeeScriptCompiler',
  'pipeline.compilers.less.LessCompiler',
  'pipeline.compilers.sass.SASSCompiler',
)

And this is STATIC_ROOT, which becomes PIPELINE_ROOT (PROJECT_ROOT is the project's current directory).

STATIC_ROOT = os.path.join(PROJECT_ROOT, 'collected/')

This is how I reproduce the error:

  • Delete collected/ if it has been generated by pipeline
  • ./manage.py runserver
  • Open the url for the first time. *.coffee files are compiled, and the resultant .js files are added
  • Refresh. This time, just resultant .js files of the .coffee files that were listed without the glob syntax are added.

I did debug further today, and I tracked down the issue to glob.py. I tested using 'js/app/views/*.coffee' as the only glob pattern in PIPELINE_JS, the rest are .coffee and .js complete relative paths.

First http call, I deleted collected/ previously: From Line 52, storage.listdir(dirname) returns files as [u'update_list_view.coffee', u'update_view.coffee'], which are the 2 files currently in that directory. They are later matched against pattern in fnmatch.filter(names, pattern). pattern here is *.coffee. So it works here.

BTW, these .coffee files are in static/ directory, I'm using staticfiles too.

Second and subsequent calls: storage.listdir(dirname) returns files as [u'update_list_view.js', u'update_view.js'], which are the generated files in PIPELINE_ROOT (collected/), but the pattern variable here is still *.coffee. So it won't match anything.

I'm not sure if this is how it should work, (maybe for cache purposes?).

from django-pipeline.

cyberdelia avatar cyberdelia commented on August 22, 2024

If you touch or modify those coffee files, do they get compiled again ?

from django-pipeline.

cyberdelia avatar cyberdelia commented on August 22, 2024

Any update on this ?

from django-pipeline.

gerardo avatar gerardo commented on August 22, 2024

Sorry it took me long, got into a rush in other projects.

If I touch or modify the coffe files, the won't get updated. If I delete the collected/ directory, they are regenerated.

I updated to the latest django-pipeline version and it's still happening there.

from django-pipeline.

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.