![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
clay-build-js
Advanced tools
Readme
Build JS for your Clay components.
npm install --save clay-build-js
clay build-js
const buildJs = require('clay-build-js');
buildJs({
// defaults
watch: false,
debug: false,
verbose: false
})
public/js
using browserify-splitter. These chunks can be combined arbitrarily by resolve-media within the context of a bundle.client-env.json
, which is an array of all env vars usedfalse
. Watch for changes.false
. Log all files written.false
. Disable bundle-collapser
and uglifyify
, allowing for easier debugging and faster builds.Usually, the JavaScript that any page needs is known beforehand, by the developer. For example, you might include a homepage.js
script on your homepage and a section.js
script on your section pages.
In Clay, a page is made up entirely of arbitrary data -- components. Some components need client-side JavaScript. Any page could theoretically have any combination of components.
So how do we get all the client.js that a page needs on to the page itself? The solution should:
require
should work client-side and ES6 should be transpiled to ES5.Clay-build-js resolves all these issues. It scans your Clay installation for component JS, traces their dependencies, and arranges those dependencies into a bundle via Browserify, but splits that bundle into separate chunks using browserify-splitter. It also extracts a dependency registry with browserify-extract-registry, transpiles to ES5 using Babel, and uglifies.
When Clay generates a page, it detects the components that a page contains, determines which module chunks the components need using the registry clay-build-js exported, and includes only those chunks on the page, nesting them in a context in which require
works. As a result, a Clay server can effectively generate valid bundles on-the-fly without compromising performance.
FAQs
Build JS for your Clay components.
The npm package clay-build-js receives a total of 1 weekly downloads. As such, clay-build-js popularity was classified as not popular.
We found that clay-build-js 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 four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.