Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
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 5 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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.