• I am dipping my toe into the Block development world and have been reading through the Block Editor Handbook.

    I have a development environment up and running but I am trying to get my head around how npm and the src and build folders fit into the whole wordpress plugin development process. Can anyone point me in the direction of some good documentation around this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @knockoutbunny npm, the node package manager, is used to handle the building process and the dependencies of the new block you are creating.

    The src folder contains all the Javascript files that will be compiled/build when you run npm run build in the block folder path. The compiled/dist version of these files are created In the build folder of your block.

    I hope this helps.

    Thread Starter knockoutbunny

    (@knockoutbunny)

    Many thanks for the reply.

    Does that mean that when publishing a block plugin to the plugin directory it is the developers responsibility to ensure the files checked in under the build folder have been built from those files checked in under the src folder? (i.e. the ‘npm run build’ command is run by the developer prior to checkin to SVN.) Do you know if this is validated by the plugin publishing process?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Block Plugin Development’ is closed to new replies.