Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@flowio/babel-preset-flowio
Advanced tools
Readme
A Babel preset for transforming your JavaScript for Flow Commerce.
The following stage 4 syntax is excluded:
generators: regenerator-runtime
is too heavyweight for our use.
async/await
: regenerator-runtime
is too heavyweight for our use, and async-to-promises is not yet complete enough to be safely used.
async iterators: depends on both generators and async
functions
$ npm install --save-dev @flowio/babel-preset-flowio
You must also install @babel/runtime
as a production dependency:
$ npm install --save @babel/runtime
This preset includes the @babel/plugin-transform-runtime
, which is used to externalize references to helpers and builtins by importing them from the @babel/runtime
module.
.babelrc
(Recommended).babelrc
{
"presets": ["@flowio/babel-preset-flowio"]
}
$ babel script.js --presets flowio
require("babel-core").transform("code", {
presets: ["@flowio/babel-preset-flowio"]
});
This preset includes @babel/preset-env
to target specific environments.
You may use the target
option to describe the environments you support for your project.
{
"presets": [
["@flowio/babel-preset-flowio", {
"targets": "> 0.25%, not dead"
}]
]
}
You may also leverage the Browserlist integration instead.
You may use the modules
option to enable transformation of ES6 module syntax to another module type.
{
"presets": [
["@flowio/babel-preset-flowio", {
"modules": false
}]
]
}
You may use the debug
option to print configuration details to console.log
.
{
"presets": [
["@flowio/babel-preset-flowio", {
"debug": true
}]
]
}
This preset can be configured to include @babel/preset-react
. To enable this transformation, set the react
option to true
:
{
"presets": [
["@flowio/babel-preset-flowio", {
"react": true
}]
]
}
When process.env.NODE_ENV
is not 'production'
, the development mode will be set for @babel/preset-react
.
You may override our default development option by providing your own.
{
"presets": [
["@flowio/babel-preset-flowio", {
"development": false
}]
]
}
This preset can also be configured to remove propTypes using babel-plugin-transform-react-remove-prop-types with the following default options:
To enable this transformation with the default options, set the removePropTypes
option to true
:
{
"presets": [
["@flowio/babel-preset-flowio", {
"removePropTypes": true
}]
]
}
The default options that will be used are:
{
"mode": "wrap",
"ignoreFilenames": ["node_modules"]
}
Default options can be overridden using the removePropTypes
option. These options will be shallow-merged with the defaults:
{
"presets": [
["@flowio/babel-preset-flowio", {
"removePropTypes": {
"mode": "remove"
}
}]
]
}
For example, you might want to use the remove mode for your production build and disable this transform entirely in development for optimal build speeds.
This preset can be configured to include @babel/preset-typescript
. To enable this transformation, set the typescript
option to true
:
{
"presets": [
["@flowio/babel-preset-flowio", {
"typescript": true
}]
]
}
MIT
FAQs
A Babel preset for transforming your JavaScript for Flow Commerce
The npm package @flowio/babel-preset-flowio receives a total of 3 weekly downloads. As such, @flowio/babel-preset-flowio popularity was classified as not popular.
We found that @flowio/babel-preset-flowio demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.