xfiveco / generator-chisel

Chisel is a development framework for creating easy to maintain and fast WordPress websites.
https://www.getchisel.co
MIT License
269 stars 37 forks source link

Updating generator-chisel #207

Closed Kwapi closed 7 years ago

Kwapi commented 7 years ago

Hi, I'm on version 5.0.3 and really enjoying working with chisel. What is the recommended way to update a project to work with the newest version if I wanted to upgrade the package?

luboskmetko commented 7 years ago

Hi @Kwapi glad to hear you enjoy working with Chisel! Not sure if I fully understand what package you want to upgrade so will try to explain more broadly:

First, Chisel can be updated globally with

npm i -g generator-chisel

However, if you have an ongoing project you have started with 0.5 version, updating to version 0.6.4 and then using Chisel subgenerators like yo chisel:page on that project might lead to some issues because the project structure could change between the 0.5 and 0.6 versions. However, I haven't tried this, so it might work as well.

Obviously, updating Chisel globally doesn't change structure of your existing project because you cannot run yo chisel on existing project to update its structure (well, theoretically you could but it would probably mess up everything).

So the easiest way is to update Chisel globally and then use it on new projects. If you want to migrate existing project to new Chisel structure, you could update Chisel, create new project and then copy your existing project files to appropriate places in newly created project.

Finally, if you just want to update some packages in your project like new Sass version etc. you can bump up versions in package.json and run npm install again.

Let me know if this helps or you have any other questions. Thanks.

Kwapi commented 7 years ago

Cheers, that's a very comprehensive answer. What I meant was porting a project over to the more up-to-date version of Chisel. I'll give it a go and let you know how it went!

luboskmetko commented 7 years ago

Thanks, let us know if you need any other help.