I have recently upgraded my package.json for my Jade and Connect-Assets. Jade 0.35 to 1.30 and Connect-Assets 2.3.3 to 3.0.0-beta1. But I am having an issue with the syntax for the following:

meta(name="viewport", content="initial-scale=1.0, width=device-width, user-scalable=no")
//- link(rel="icon", type="image/png", href="/static/favicon.ico")
//- Place favicon.ico and apple-touch-icon.png in the root directory: mathiasbynens.be/notes/touch-icons
link( href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.0/css/bootstrap.min.css", rel="stylesheet")
link( href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css", rel="stylesheet")

!= css('custom')

To be exact the last line != css('custom')

As well as

!= js('app')
!= js('controllers')
!= js('directives')
!= js('filters')
!= js('services')

Thank you in advance!

有帮助吗?

解决方案 2

Solution: What I found to be the issue was once updating Jade and Connect-Asset, the module was no longer able to find "assets" in root for I had it in other folder. So my solution was to:

app.use assets({paths: ["app/assets/js", "app/assets/css"]})

其他提示

There’s a known issue with newer versions of Jade that you’re likely hitting — see this GitHub issue.

app.use(require('connect-assets')({
  helperContext: app.locals
});
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top