
Security News
CISA Rebuffs Funding Concerns as CVE Foundation Draws Criticism
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
basalplatten
Advanced tools
BasalPlatten ('Base Plate') is a collection of core components and utilities to help build UIs, the 'Fountainhead' way.
Much like a 'seed' or 'boilerplate' project, it is intended to offer a 'quick-start' way of initalizing a new project. However, unlike similar projects, it is not intended to be 'forked' each time you start a new project.
Instead, simply install BasalPlatten as an NPM module:
$ npm install --save basalplatten
BasalPlatten assumes the following architecture and conventions:
Generate a Webpack2-compatible configuration using basalplatten/webpack/config
:
// webpack.config.js
const {buildConfig} = require('basalplatten/webpack/config');
module.exports = buildConfig('myApp');
buildConfig
accepts a second options
object, which will be merged in with the default options. Alternatively, you may mutate the returned configuration object before exporting it.
Without any custom options or mutations, the webpack configuration will provide the following:
src/index.tsx
.inline.less
will be embedded into index.html
, useful for styling the IPLlocalhost:8080
at /api
Create a UI-Router instance pre-configured with all of our favourite things using basalplatten/ui-router
:
// AppEntryPoint.jsx
const {UIRouter} = require('@uirouter/react');
const {buildRouter} = require('basalplatten/ui-router');
var router = buildRouter();
router.stateRegistry.register({
// ... your state definitions
});
<UIRouter router={router}>
<UIView/>
</UIRouter>
The buildRouter
factory provides you with a UI-Router instance preconfigured with our favourite things:
.observe()
state parameter changes directly from components/
when attempting to access a URL which does not match a stateA handful of custom parameter types that are useful for serializing state such as filter and order criteria from data tables into the URL. We use these types over the built-on json
type as they're a little friendlier on the (human) eye.
If you use the buildRouter
factory function in basalplatten/ui-router
, then these types are already registered with the router instance and ready to use. Otherwise, you'll need to register them manually:
const {where} = require('basalplatten/ui-router/paramTypes');
router.urlMatcherFactory.type('where', where);
where
A parameter with the where
type and following value:
{
"user_id": "13",
"owner_id": "37",
"status": ["completed", "failed"]
}
Will be encoded into the URL as ?user_id:13!owner_id:37!~status:completed,failed
.
order
A parameter with the order
type and following value:
{
"created_at": "desc"
}
Will be encoded into the URL as ?created_at:desc
.
FAQs
Core components for building UIs the Fountainhead way
The npm package basalplatten receives a total of 20 weekly downloads. As such, basalplatten popularity was classified as not popular.
We found that basalplatten 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
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.