Builds the bundles and style sheets of Tayori into priv/static.
$ mix tayori.build
This task is for work on Tayori itself. An application that uses Tayori gets the built files in the Hex package and does not run this task: in any project but Tayori, the task stops with an error before it changes a file.
The task:
- Runs
npm ciinassets/whenassets/node_modulesis missing orassets/package-lock.jsonchanged since the last install. - Empties
priv/static, so that it holds only the files of this build. - Runs esbuild (the
esbuildMix package) with the:tayori_esmand:tayori_cjsprofiles (the news in the app) and:tayori_admin(the admin, with Phoenix, LiveView, Kotoba and Koyomi fromdeps/). - Copies
assets/css/tayori.css,assets/css/tayori-sumi.cssandassets/css/tayori-admin.csstopriv/static/, with the Sumi fonts (assets/css/sumi-fonts.css) in place of the marker oftayori-sumi.css.
After the task, priv/static holds exactly these six files, which are
the files of the Hex package.
It needs npm on the path and the :esbuild dependency, which is
available in the :dev environment.