![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.
@discoveryjs/cli
Advanced tools
CLI tools to serve & build projects based on Discovery.js
npm install @discoveryjs/cli
Usage:
discovery [config] [options]
Options:
--cache [dir] Enable data caching and specify path for cache files, use working directory when
is not set
-c, --config <filename> Path to config (JavaScript or JSON file)
--dev Enable developer mode
-h, --help Output usage information
-m, --model <name> Specify a model (multi-model mode only)
--no-warmup Disable warm up model data cache on server start
-p, --port <n> Listening port (default: 8123)
-v, --version Output version
Usage:
discovery-build [config] [options]
Options:
--cleanup Delete all files of output path before saving a result to it
-c, --config <filename> Path to config (JavaScript or JSON file)
-h, --help Output usage information
-m, --model <name> Specify a model (multi-model mode only)
-o, --output <path> Path for a build result
--pretty-data [indent] Pretty print of data.json
-s, --single-file Output a model build as a single file
-v, --version Output version
Discovery can work in following modes:
In this mode you can upload any data by clicking "Load data" button, or drag'n'drop file right into the browser.
In this mode discovery will start with model selection page. Every model will have own route namespace, and you can switch models and reports at any time.
If you want only one model, you should start discovery with --model %modelName%
. In this mode index page will represent your model default page.
To configure discovery you should specify one of config files:
.discoveryrc.js
.discoveryrc.json
.discoveryrc
(the same as .discoveryrc.json
)Or you can add a section in your package.json
file with discovery
as a key.
Config should provide JSON or exports an object with following properties:
name
- name of discovery instance (used in page title)models
- object with model configurations, where for each entry the key used as a slug and the value as a configExample:
module.exports = {
name: 'My cool dashboards',
models: {
one: <modelConfig>,
two: <modelConfig>
}
};
Model config may consists of the following fields (all fields are optional):
name
– name of model (used in title)data
– function which returns any|Promise<any>
. Result of this function must be JSON serializableprepare
– path to a script with additional initialization logic (e.g. add cyclic links and relations, extensions for query engine etc)view
– object with following fields:
basedir
– directory to resolve relative path in assets
and libs
libs
– path to libs, where key is local name available in asset's scope and value is a path to library file or an array of files (.js
or .css
)assets
– path to .js
and .css
filesjs files has own scope (as modules) with a reference
discovery
that points to discovery instance
extendRouter
– function(router, modelConfig, options)
cache
cacheTtl
cacheBgUpdate
Example:
const path = require('path');
module.exports = {
name: 'Model config',
data: () => ({ hello: 'world' }),
prepare: path.join(__dirname, 'path/to/prepare.js'),
view: {
basedir: __dirname,
assets: [
'ui/page/default.js',
'ui/view/model-custom-view.css',
'ui/view/model-custom-view.js',
'ui/sidebar.css',
'ui/sidebar.js'
]
}
};
MIT
1.4.0 (16-12-2019)
plugins
option in config, a set of paths relative to config file or npm package names (and optional path to a module inside the package)FAQs
CLI tools to serve & build projects based on Discovery.js
The npm package @discoveryjs/cli receives a total of 57 weekly downloads. As such, @discoveryjs/cli popularity was classified as not popular.
We found that @discoveryjs/cli 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
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.