Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
croud-layout
Advanced tools
Step 1: Install plugin
yarn add croud-layout
Step 2: Add it to your project
import CroudLayout from 'croud-layout'
import store from './store'
Vue.use(CroudLayout, { store })
/* eslint-disable no-new */
new Vue({
el: '#app',
template: '<croud-layout><App slot="content"/></croud-layout>',
components: { App },
store,
})
Step 3: ????
Step 4: Profit :)
You can pass an additional option to disable legacy SSO auth
Vue.use(CroudLayout, { store, noLegacyAuth: true })
A drop in replacement for vue-resource
/* Main.js */
...
import axios from 'croud-layout/src/axios'
...
new Vue({
...
created() {
Vue.use(axios, { setCroudDefaults: true })
},
})
Croud-layout now includes the Security mixin that can make quick CRUD permission checks for the current user.
import Security from 'croud-layout/src/mixin/security'
export default {
mixins: [Security],
data() {
return {
permission: {
read: 'my-read-permission',
custom: 'my-custom-permission',
},
},
},
}
This will add a security object to your component that looks like this (if they have the correct permissions)...
{
create: false,
read: true,
update: false,
delete: false,
custom: true,
}
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
# run unit tests
npm run unit
# run all tests
npm test
For detailed explanation on how things work, checkout the guide and docs for vue-loader.
FAQs
A Vue.js project
The npm package croud-layout receives a total of 1 weekly downloads. As such, croud-layout popularity was classified as not popular.
We found that croud-layout demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.