![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@sum.cumo/nuxt-custom-route-folder
Advanced tools
Module to automatically add nuxt routes for specified files in the nuxt project.
Module to automatically add nuxt routes for specified files in the nuxt project.
npm install @sum.cumo/nuxt-custom-route-folder
import createCustomRoutes from '@sum.cumo/nuxt-custom-route-folder'
export default function MyModule() {
return createCustomRoutes({
nuxt: this.nuxt,
glob: 'myCustomFolder/**/*.vue',
})
}
Given we have a component myCustomFolder/foo.vue
, it will be added as a
myCustomFolder/foo
route to nuxt routes.
nuxt
When used as a library in another nuxt module, this needs to be the current instance of nuxt
glob
A minimatch
pattern specifying
all files that should create a new route.
transform(contents, route)
A transformer function that can be used to manipulate or wrap the contents
of a file found by the glob
.
Its recommended to prefer custom webpack loaders over this config
import createCustomRoutes from '@sum.cumo/nuxt-custom-route-folder'
export default function MyModule() {
return createCustomRoutes({
nuxt: this.nuxt,
glob: 'markdown/**/*.md',
transform(content) {
return someMarkdownToVueMagic(content)
},
})
}
transformExt
default: 'js'
Specify the file extension with which the result of the transform
is being
stored. This is especially relevant to control which webpack loaders are
applied to the transformed file.
priority
default: 0
When the module is used for different custom folders and multiple routes are created using the same path, the one with a higher priority will take precedence over the one with a lower priority.
mapRouteName(basePath, component)
Customize the name that is created for each generated route.
mapRoutePath(path)
Customize the path of each generated route.
This can be useful when using a different path then the folder name or for prefixing.
filter(component)
Can be used to additionally blacklist components.
Prefer using a more specific glob
over this.
srcDir
default: srcDir
from nuxt.options
the source directory of the nuxt application, use as a base for the given
glob
.
watch
default: dev
from nuxt.options
whether or not future file changes should cause a rebuild of the routes.
FAQs
Module to automatically add nuxt routes for specified files in the nuxt project.
The npm package @sum.cumo/nuxt-custom-route-folder receives a total of 7 weekly downloads. As such, @sum.cumo/nuxt-custom-route-folder popularity was classified as not popular.
We found that @sum.cumo/nuxt-custom-route-folder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.