Security News
Combatting Alert Fatigue by Prioritizing Malicious Intent
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
@nuxt/blueprints
Advanced tools
Module for Nuxt.js to create distributable micro-apps
This module is considered experimental and a work-in-progress.
Check the example for a simple blueprint example.
If you are looking for a more advanced example, have a look at the NuxtPress repository which is also build using blueprints.
If you wish to run the example from this repo, you need to use at least Node v12.4.0 due to the use of static class features. Those are transpiled on release using @babel/plugin-proposal-class-properties, but the example runs from source.
The blueprint module is a supercharged module container which supports autodiscovery of folders and resolving of templates/files.
Features:
tmpl
or template
to the name (the template identifier is removed before Nuxt.js will build the files)$
to replace the identifier with the blueprint instance id
(instead of removing the template identifier)autodiscover(<rootDir>, { validate(<path>), filter(<parsed path>) })
Filter and validate callbacks are more or less the same, validate
runs during walking the fs and receives the full path as string argument . Filter
runs when the fs walking has finished and passes the result of path.parse
as argument.It returns the found files by type, where type is the name of the first level folder
resolveFiles(<files>, <pathPrefix>)
This method simply checks if a add<capitalize(type)>
method exists. Eg if you have a first level folder plugins
then it will call the addPlugins
method with the list of files. If the corresponding method doesnt exists then its assumed it are just generic files (or templates) which need to be copied.
The pathPrefix
argument is the folder in buildDir
into which the files will be copied (i.e. if you set this to 'my-id' then all the blueprint files/templates are copied into .nuxt/my-id
)
It returns a mapping of the src
to dst
for all files
yarn install
or npm install
npm run dev
Copyright (c) Nuxt.js Team
FAQs
Module for Nuxt.js to create distributable micro-apps
We found that @nuxt/blueprints demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.