Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
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.
@lmc-eu/spirit-analytics
Advanced tools
Analytic tools for Spirit Design System.
Spirit-analytics is a simple CLI tool, which parses a repository with react-scanner. The output is a JSON file or files with collected data.
# NPM
npm install --save-dev @lmc-eu/spirit-analytics
# Yarn
yarn add -D @lmc-eu/spirit-analytics
Running the command without arguments will use the working directory as a root and parse the entire directory structure from this point.
spirit-analytics
You can parse only specific directories from the project with --source
argument:
spirit-analytics --source ./frontend
By default, the output will be saved into the .scanner
directory, but you can specify the path with the --output
argument:
spirit-analytics --output path/to/folder
The react-scanner requires a config file to make it work, spirit-analytics
has a default config inside, but if you need to, you can use your own config:
spirit-analytics --config path/to/config
You can easily switch from React scanner to Twig scanner using type
argument. By default, both scanners will be used.
spirit-analytics --type react
You can run spirit-analytics --help
to get a list of available options and examples.
You can provide your own configuration file in the following format:
export default {
react: {
// react-scanner config; @see https://www.npmjs.com/package/react-scanner#config-file
},
twig: {
crawlFrom: './',
exclude: ['node_modules', 'dist', 'build', 'coverage', 'public', 'vendor', 'storybook-static'],
configFile: './config/spirit-web-twig.yml',
outputFile: './.scanner/adoption-data-twig.json',
coreComponentsPath: './vendor/lmc/spirit-web-twig-bundle/src/Resources/twig-components',
},
};
👉 react-scanner
Configuration Options
Option | Type | Description |
---|---|---|
crawlFrom | string | The path of the directory to start crawling from. |
exclude | array or function | Each array item should be a string or a regex. When crawling, if directory name matches exactly the string item or matches the regex item, it will be excluded from crawling. For more complex scenarios, exclude can be a a function that accepts a directory name and should return true if the directory should be excluded from crawling. |
configFile | string | Path to the local spirit-web-twig.yml configuration file. |
outputFile | string | Path to the file where the result of the analysis will be stored. |
coreComponentsPath | string | Path to the directory where are core Spirit components installed. |
FAQs
Analytic tools for Spirit Design System
The npm package @lmc-eu/spirit-analytics receives a total of 34 weekly downloads. As such, @lmc-eu/spirit-analytics popularity was classified as not popular.
We found that @lmc-eu/spirit-analytics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
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.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.