Writing plugin and test code

Writing plugin and test code

I wrote a plugin for html-webpack-plugin. The plugin is called html-link-injection. With this plugin, you can insert some link tags into a html which is generated by html-webpack-plugin.

Test code for this plugin

I use mocha test frame for testing this plugin. The kotlin multiplatform project uses the mocha test frame work on javascript testing. I would like to understand about kotlin multiplatform project deeply through using mocha test frame work. After I wrote some test code for the plugin, I thought that it might effective way to develop software by test driven project. It took lot of time to create test code, but It could be easy for us to create the solution code. It took 3 times longer to write test code than write solution code. Assume that you are a team leader to develop a software, you had to assign some tasks for newbie or less experienced developer. You would like to get the complete solution code and the growth of the developers. The develop ing by test driven way might work for this situation.

Html-link-injection

I came to almost end of development, I checked html-webpack-plugin document again. I noticed that I could control tags insertion position with html-webpack-plugin option. If you use this option, you would get same result without this plugin. I might reinvent the wheel. I regret that I investigate the document about html-webpack-plugin well. It satisfied me to understand webpack and html-webpack-plugin well.

You can use html-link-injection from npm.