Creating the Library Source and Building the Distribution File
At this stage, if you're happy with your project setup, you're now able to run the bm forms create command. This will create the library source by reading your forms definition and using the templates specified by the plugin you selected in the init step.
This command will build the library automatically, however you can prevent this command from building so that you're able to edit the source files/templates first, should you require further customisation - we've included the --no-build flag for this purpose.
When running the command, you have the following two options:
Will create and build your library source
bm forms create
Will create your library without building or compiling your code
bm forms create --no-build
Now that you've built your library source, you can look at tweaking your templates to customise your output.
We recommend running bm forms create before editing the templates so you can see what a default form will look like.
Templates
my-forms/templates contains templates used by the transforms in the plugin. You can modify them to include any html/javascript you want, and commit them to your own version control for future reusability.
If you have modified your source files after this process, you will need to run the build command again. This will build out the library from the source folder:
bm forms build
It is important to note that bm forms create will overwrite anything in the sourcePath folder. If you have modified anything in the sourcePath folder, running bm forms create will remove it.
Final Project Layout Example
If you've followed through these steps, you will now have my-forms/src and my-forms/dist :