laktek / punch

A fun and easy way to build modern websites
http://laktek.github.com/punch
MIT License
1.17k stars 107 forks source link

Custom compiler works only on generate #131

Open alexmakeev opened 7 years ago

alexmakeev commented 7 years ago

No compilation during development (even at first launch without output folder).

Have not found documented config to fix it.

My config:

{
    "template_dir": "templates", 
    "content_dir": "contents",
    "output_dir": "output",

    "server": { 
        "port": 9009
    },

  "generator": {
    "blank": true
  },
    "bundles": {
        "css/all.css": [
            "css/common.css",
            "css/main.css"
        ],
    "js/ractive.runtime.min.js": [
      "js/ractive.runtime.js"
    ],
        "js/all.js": [
            "js/src_link.js"
        ]
    },

  "plugins": {
    "compilers": {
      ".js": "./compilers/browserify_compiler.js"
    }
  }
}
jssee commented 7 years ago

Same thing happening to me, not sure what is causing it since my config is so simple. It will not compile stylus correctly:

    "template_dir": "templates",
    "content_dir": "contents",
    "output_dir": "public",

    "server": {
        "port": 9009,
        "generate_interval": 5000,
        "serving_only": false
    },

    "asset_bundling": {
        "fingerprint": false
    },

    "bundles": {
        "public/css/all.css": [
            "/css/master.styl"
        ]
    },

    "plugins":{
        "compilers": {
            ".css": "punch-stylus-compiler"
        }
    }
}
jssee commented 7 years ago

I think it has something to do with bundler. It seems to compile the styles into the public directory, but then not render them on localhost.

laktek commented 7 years ago

This looks like a bug, I will try to allocate some time next week to fix it.

jssee commented 7 years ago

@laktek I went and took at look at the stylus compiler and the sass compiler for punch and neither have the force_compile option set to true as mentioned in the punch wiki here: https://github.com/laktek/punch/wiki/Adding-Pre-Compilers

could possibly be the issue thats stopping changes to render while in development mode.