Coder Social home page Coder Social logo

Comments (5)

laktek avatar laktek commented on June 16, 2024

Have you defined a bundle in config.json by the name /css/main.css? Or is
it just a CSS file that's being processed from the /cs//main.styl.

Note that bundle helper tags will only work with the defined bundles. It
will not work with regular CSS files.

On Thu, Dec 6, 2012 at 9:31 PM, Adrian Simmons [email protected]:

Using a bundle helper tag as described in
https://github.com/laktek/punch/wiki/Asset-Bundles generates an error 500
(internal server error):

[TypeError: Cannot call method 'getTime' of undefined]

Location of source stylesheet is: /templates/css/main.styl
Location of generated stylesheet is: /output/css/main.css

Tag used in _layout.mustache:

{{#stylesheet_bundle}}/css/main.css{{/stylesheet_bundle}}

Am I right in thinking that the helper tag should point to the generated
css and not the source styl file?


Reply to this email directly or view it on GitHubhttps://github.com//issues/46.

from punch.

adrinux avatar adrinux commented on June 16, 2024

I had removed the bundle, when looking at other problems...it's back now.

  "bundles" : {
    "/css/all.css" : [
        "/css/main.styl"
    ]
  }

Tried a simple link to that in layout first:

<link rel="stylesheet" href="/css/all.css">

But I'm now getting: [Error: Content for /css/all.css not found]
Tried accessing all.css directly in the browser example.com/css/all.css as you suggested elsewhere but still get that not found error.

from punch.

adrinux avatar adrinux commented on June 16, 2024

Ok, got it working. Looks like I had a syntax error in config.json – unfortunately it only tells you

Cannot read the custom config: Error: ENOENT, stat 'config'
Using the default config.

And only mentions that when you run 'punch s' so if you introduce a syntax error to config.json whilst developing the site you end up with generic 'Error: Content for something not found'.

The bundle helper tag now works too.

Will close this issue.

from punch.

laktek avatar laktek commented on June 16, 2024

@adrinux Can you please open a new ticket for the ambiguous errors in config.json? I'll look into improve the error reporting.

from punch.

adrinux avatar adrinux commented on June 16, 2024

Done #47

from punch.

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.