Resetting reloading tpl files



  • Okay I don't want to pull the site down and up every time it seems like I change TPL files and some update automatically while others don't..

    Is there a command line that will reload the TPL into memory?


  • Admin

    I use supervisor

    sudo npm install supervisor -g
    

    and then run nodebb like so:

    ./nodebb watch
    

    everytime you update any file .less, .tpl etc, it relaunches nodebb for you


  • Plugin & Theme Dev

    This works for the header.tpl & footer.tpl as well? I usually would have to restart the app also using forever restart app.js


  • Admin

    yup definitely. but if you're using supervisor then you won't be using forever

    supervisor for dev, forever for production 🙂



  • perfecto, thanks 😉


  • Plugin & Theme Dev

    <--- npm install supervisor -g 😞
    Okay thanks @psychobunny,now I know the difference between the two.



  • From git://github.com/designcreateplay/NodeBB
    8852420..4397da1 master -> origin/master
    Updating 26de85c..4397da1
    error: Your local changes to the following files would be overwritten by merge:
    public/templates/footer.tpl
    Please, commit your changes or stash them before you can merge.
    Aborting

    i get this error... when i git pull



  • From git://github.com/designcreateplay/NodeBB
    8852420..4397da1 master -> origin/master
    Updating 26de85c..4397da1
    error: Your local changes to the following files would be overwritten by merge:
    public/templates/footer.tpl
    Please, commit your changes or stash them before you can merge.
    Aborting

    i get this error... when i git pull

    I don't know if my technique is the proper way but what I did:

    Backed up my TPL files.
    Deleted the 3 or 4 I had modified.
    Git pull.
    Copy the edited TPL files back in.

    Unless they edit a TPL file in an update that shouldn't be an issue. If they do edit one, you will have to make your custom changes as necessary.



  • danm now i get 502 error -.-

    when i execute node app

    module.js:340
    throw err;
    ^
    Error: Cannot find module './redis'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at Object.<anonymous> (/home/capitansupositorio/mynodebb/node_modules/nodebb-plugin-markdown/index.js:6:22)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)


  • GNU/Linux Admin

    Looks like you need to run npm install.


  • GNU/Linux Admin

    error: Your local changes to the following files would be overwritten by merge:
    public/templates/footer.tpl

    @pablo_macaluso - Read the errors carefully - git is telling you exactly what is wrong!

    If the language seems cryptic, google it, don't just blindly assume linux commands worked 🙂


Log in to reply
 

Suggested Topics

| |