![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
# previously named `bubleup`
$ bili
# is the same as
$ bili src/index.js --out-dir dist
# watch mode
$ bili --watch
I always repeat the same configurations for bundling my front-end libraries. With bili you can simply run bili
to generate commonjs
-format code and or append --format umd
to generate umd
-format code, and it's fast! You can even pass --compress
to generate compressed file and sourcemap.
$ npm install -g bili
The buble guide: https://buble.surge.sh/guide, this is built upon buble, but you can use any javascript compiler you like.
You can specific options in command-line:
$ bili src/index.js -d dir
For full CLI usage please run bili -h
, It's hard to describe some nested options in command line, so you can also configure them in .bilirc
, eg:
{
"entry": "./path/to/my-entry.js"
}
And you can also put the configs in package.json
under key bili
. To go even further, if you need the power of javascript, use bili.config.js
.
The filename of bundled files, the default value is package name in package.json
. If no package.json was found, fallback to index
.
$ bili --name redux --format umd --format cjs
# generate ./dist/redux.js ./dist/redux.common.js
Specific the bundle format, it could be a string like 'umd'
or multiple targets ['umd', 'cjs']
, it's useful if you want to support multiple standards. Default value is ['cjs']
.
You should specfic a moduleName
if you target umd
, otherwise fallback to name
.
{
"format": ["cjs", "umd"]
}
Enable this option to generate an extra compressed file for the UMD bundle, and sourcemap.
{
"format": "umd",
"compress": true
}
// generates: [name].js [name].min.js [name].min.js.map
Transform async/await
to generator function, defaults to true
. This is using async-to-gen
, so it has nothing to do with buble
.
This is some feature which is similar to Webpack's alias
, eg:
{
"alias": {
"controllers": "./src/controllers"
}
}
Use a custom js compiler instead of buble
, it should a rollup plugin, like rollup-plugin-babel
:
// bili.config.js
const babel = require('rollup-plugin-babel')
module.exports = {
jsCompiler: babel({
presets: [
['es2015', {modules: false}]
]
})
}
Add options to rollup-plugin-replace:
{
"replace": {
"VERSION": "0.0.1"
}
}
This helps you import some file from the CDN (as using AMD), or set an alias to an external file, see more details in Rollup's WIKI.
Generate soucemaps for cjs
and umd
builds, note that --compress
will always generate sourcemaps for .min.js
file:
{
"map": true
}
Run Rollup in watch mode, which means you will have faster incremental builds.
Apply custom transform rules to buble
options:
{
"buble": {
"transforms": {
"dangerousForOf": false
}
}
}
Buble supports JSX, and you can specfic a custom JSX pragma:
{
"buble": {
"jsx": "createElement"
}
}
Compile targets for buble, eg:
{
"buble": {
"target": {"chrome": 48, "firefox": 44, "node": 4}
}
}
import bili from 'bili'
bili(options).catch(err => {
if (err.snippet) {
// display the actual error snippet
console.error(err.snippet)
}
console.error(err.stack)
})
MIT © EGOIST
FAQs
A zero configuration library bundler.
The npm package bili receives a total of 2,837 weekly downloads. As such, bili popularity was classified as popular.
We found that bili demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.