The Australian Government coat of Arms

Communities of practice

Communities of practice

Pancake/Syrup causing issues

#1

Do you have a flag to disable this post install script? Couldn’t see anything documented in repos.

We would think that npm is all we really need.

#2

Hi @DouglasCross sorry to hear it is causing you issues. The post install script is meant to make your life easier.

I will quickly mention that there is an issue right now related to performance and we are hoping to fix that up soon, however we are waiting for some vulnerabilities in dependencies to be fixed.

Pancake is a tool we created to make sure that you don’t get incorrect component dependencies, you can learn more about it here and watch this video that talks about it in detail. Using the post install script guarantees your components are going to work together without any incorrect peer dependencies sneaking in.

The documentation for pancake needs some work, the main thing to note is that it modifies your package.json file and adds configuration to a pancake object. You can learn about the settings you can set for the different pipelines. If you wish to disable the pipelines you can do so by configuring it to look like:

  "pancake": {
    "auto-save": false,
    "plugins": false,
    "ignore": []
  }, 

Our teams usually use the sass pipeline as a minimum which creates a pancake.scss file. We then ignore this file from git as it has absolute path names. This allows us to import the pancake.scss file and override the variables throughout our system. This also allows us to easily update components, add new components without having to think about changing a .scss file.

2 Likes
#3

I read your article, and I’m familiar with the problem.

You are failing in your 3rd goal.
3. Don’t force tooling, environment or preferences.

Unfortunately your desire to conceal the tool from those who need to use your repository are imposing it on others who don’t care for it.

What we are experiencing is.

  • Seeing pancake trying to run when we don’t care about anything related to dtakit.
  • Pancake being slow. (really, really, really slow.)
  • The ouput from npm has a large degree of spam.

Could you please rethink the compulsory nature of pancake?
We are seriously considering just zipping up the dta kit and copy and pasteing it into our repository. Thereby defeating the usual benefits of NPM.

Even if you do manage to make pancake faster; you are still running a script.

Build steps (pancake) should be separated from fetch steps (npm).

Rhetorical Question:
Imagine if every npm repository had its own build script?

#4

I know this seems harsh.
It’s just a reflection of the degree of frustration involved.

Sometimes doing a complete npm install/update is needed after coming back to a project after a while or needing to brute force through debugging measures.

Having pancake in the “mix” makes this form of debugging and maintaining a project infeasible any longer. NPM is just meant to just be a way of fetching assets.

#5

Hi @DouglasCross,

Thanks for the feedback on the use of Pancake. I agree with both you and Alex that we have a bit of work to do with the documentation we have for Pancake.

Our intention is not to impose an unwanted post-install script on folks using the whole of government design system, but rather to address what we saw as a dependency management issue not solved in npm. That said, I totally understand where you’re coming from and we might need to rethink how we offer Pancake to users. By trying to make folks’ lives easier, we might have been a bit over-zealous with our solution.

As Alex said, you can disable Pancake build scripts by adjusting the settings in your package.json file. It will still check that all your @gov.au component versions are compatible with each other (which we view as critical), but it disables the sass and JS build pipelines. This should speed up your development process, especially if you’re removing your node_modules folder and re-running npm i frequently.

We currently can’t disable the version compatibility check that are run by Pancake. We (and other government agencies) rely on Pancake to ensure component versions are compatible. If all you need is the compiled CSS and JS you can download those from our download page.

I also appreciate your frustration. I want to encourage you to keep a positive and helpful tone using the forum here. We’re all here to try and help each other so we have to be mindful that tone and intent aren’t easily conveyed via text.

We’re happy to jump on a phone call or a video call to better understand some of the frustrations you’re having and see if there’s anything we can do to help. Let me know if you’re interested and we can organise a time to chat.

3 Likes