@femessage/create-nuxt-app is a framework-template scaffolding that use SAO under the hood.
Please check out saojs.org to know what is SAO.
Add Jest for example
Add module files to template/frameworks
Then modify the template.config.js
which framework-template need to use the module.
Modify the generator/Template.js
to make this module be a default module, it will be apply to all framework-template.
Run create-nuxt-app -t single -o release
will be generated to workspace/release
.
Check the generated framework-template.
cd release
to enter the folder then run these following:
- yarn
- yarn build
Check is build succeed.
Check is the new feature works.
If this module pass your test and feeling good, then run yarn test:snapshot
to update the snapshots.
Add mobile command for example
Add a mobile template config in template.config.js
, it uses vant-ui under the hood.
Template exclusive files, organized in the standalone folder. e.g. framework/mobile
For reusable modules, please check out Add module
Facing problem: a template uses element-ui
for the desktop-side but another template uses vant-ui
for the mobile-side.
Add vant-ui module:
Add vant-ui
as a dependency to template/_package.json
. If the project uses vant-ui
and no longer requires element-ui
.
Modify the template/nuxt/nuxt.config.js
👋 your lovely template is ready to work with you.