### Install Minium from source Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/minium/Python/quick_start.md Install Minium by downloading and extracting the package, then running the setup script. ```shell python3 setup.py install ``` -------------------------------- ### Usage Example Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/npm-run-path/readme.md Demonstrates how to use npm-run-path to get the modified PATH and execute a local binary. ```javascript const childProcess = require('child_process'); const npmRunPath = require('npm-run-path'); console.log(process.env.PATH); //=> '/usr/local/bin' console.log(npmRunPath()); //=> '/Users/sindresorhus/dev/foo/node_modules/.bin:/Users/sindresorhus/dev/node_modules/.bin:/Users/sindresorhus/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/usr/local/bin' // `foo` is a locally installed binary childProcess.execFileSync('foo', { env: npmRunPath.env() }); ``` -------------------------------- ### Install expand-brackets Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/readdirp/node_modules/expand-brackets/README.md Install the expand-brackets package using npm. This is the initial setup step for using the library. ```sh $ npm install --save expand-brackets ``` -------------------------------- ### Install npm-run-path Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/npm-run-path/readme.md Install the package using npm. ```bash $ npm install --save npm-run-path ``` -------------------------------- ### Install on-finished Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/on-finished/README.md Install the on-finished module using npm. ```sh $ npm install on-finished ``` -------------------------------- ### Quick Start: Get MIME Type and Extension Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/puppeteer/node_modules/mime/src/README_js.md Demonstrates basic usage of the Mime module to get the MIME type from an extension and the extension from a MIME type. ```javascript const mime = require('mime'); mime.getType('txt'); // RESULT mime.getExtension('text/plain'); // RESULT ``` -------------------------------- ### Install to-regex Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/to-regex/README.md Install the to-regex package using npm. ```sh npm install --save to-regex ``` -------------------------------- ### Install Minium from Local Tarball Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/minium/JavaScript/quick_start.md Install Minium by first downloading the package and then installing it locally using tnpm. Replace YOUR_MINIUM_TAR_FILE_PATH with the actual path to the downloaded file. ```shell tnpm i YOUR_MINIUM_TAR_FILE_PATH ``` -------------------------------- ### Install and Test Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/send/README.md Install project dependencies using npm and run the test suite. ```bash $ npm install $ npm test ``` -------------------------------- ### Install Send with npm Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/send/README.md Install the send library using the npm install command. ```bash npm install send ``` -------------------------------- ### Install ee-first Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/ee-first/README.md Install the ee-first module using npm. ```sh $ npm install ee-first ``` -------------------------------- ### Install is-plain-object Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/is-plain-object/README.md Install the is-plain-object library using npm. ```sh npm install --save is-plain-object ``` -------------------------------- ### Install Fresh Module Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/fresh/README.md Install the fresh module using npm. ```bash npm install fresh ``` -------------------------------- ### Install snapdragon-node Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/snapdragon-node/README.md Install the snapdragon-node package using npm. ```sh npm install --save snapdragon-node ``` -------------------------------- ### Run OpenCollective Setup Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/opencollective/README.md Initiates the interactive setup process for OpenCollective CLI. ```bash $ opencollective setup ``` -------------------------------- ### Install collection-visit Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/collection-visit/README.md Install the collection-visit package using npm. ```sh npm install --save collection-visit ``` -------------------------------- ### Install kind-of Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/has-values/node_modules/kind-of/README.md Install the kind-of library using npm. ```sh $ npm install kind-of ``` -------------------------------- ### Install wrap-ansi Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/wrap-ansi/readme.md Install the wrap-ansi package using npm. ```bash npm install --save wrap-ansi ``` -------------------------------- ### Install OPTS using NPM Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/opts/README.md Install the OPTS package from the NPM registry. ```bash npm install opts ``` -------------------------------- ### Install get-stream Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/get-stream/readme.md Install the get-stream module using npm. ```bash $ npm install --save get-stream ``` -------------------------------- ### Install color-convert using npm Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/color-convert/README.md Instructions for installing the color-convert library using npm. ```bash $ npm install color-convert ``` -------------------------------- ### Install ci-info Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/ci-info/README.md Install the ci-info module using npm. ```bash npm install ci-info --save ``` -------------------------------- ### Install verb for building docs Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/arr-union/README.md Install the verb package to generate documentation for your project. ```sh npm i verb && npm run docs ``` -------------------------------- ### Install Minium using zip Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/minium/Python/quick_start.md Install Minium by downloading the package and using pip. ```shell pip3 install minium-0.0.2.zip ``` -------------------------------- ### Install pify Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/make-dir/node_modules/pify/readme.md Install the pify module using npm. ```bash $ npm install --save pify ``` -------------------------------- ### Install normalize-path Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/normalize-path/README.md Install the normalize-path package using npm. ```bash $ npm install --save normalize-path ``` -------------------------------- ### Install agent-base with npm Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/agent-base/README.md Install the agent-base module using npm. ```bash $ npm install agent-base ``` -------------------------------- ### Install boxen Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/boxen/readme.md Install the boxen module using npm. ```bash $ npm install boxen ``` -------------------------------- ### Install isobject with npm (alternative) Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/has-value/node_modules/isobject/README.md Another way to install isobject using npm. ```sh $ npm install isobject ``` -------------------------------- ### Install to-regex-range with npm Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/to-regex-range/README.md Install the library using npm for use in your Node.js project. ```sh $ npm install --save to-regex-range ``` -------------------------------- ### Example: Init Command Module Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/yargs/README.md Defines an 'init' command with an optional directory argument. ```javascript exports.command = 'init [dir]' exports.desc = 'Create an empty repo' exports.builder = { dir: { default: '.' } } exports.handler = function (argv) { console.log('init called for dir', argv.dir) } ``` -------------------------------- ### Initialize Docsify Project Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/docsify-cli/README.md Use the init command to generate your docs. The path defaults to the current directory. Options include --local and --theme. ```shell docsify init [--local false] [--theme vue] # docsify i [--local false] [--theme vue] ``` -------------------------------- ### Install docsify-cli Globally Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/docsify-cli/README.md Install docsify-cli globally using npm or yarn. ```shell npm i docsify-cli -g # yarn global add docsify-cli ``` -------------------------------- ### Install Build Tools and Generate Docs Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/class-utils/README.md Install global build tools and generate the README file using verb. ```sh npm install -g verbose/verb#dev verb-generate-readme && verb ``` -------------------------------- ### Micromatch double-negation example Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/micromatch/README.md Demonstrates how to use negation patterns in micromatch to exclude specific matches. This example shows how to match strings that do not start with 'f' followed by 'o'. ```javascript mm(['fa', 'fb', 'f', 'fo'], '!(f!(o))'); //=> ['fo'] ``` -------------------------------- ### NPM Installation Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/puppeteer/node_modules/mime/src/README_js.md Install the Mime module using NPM for Node.js projects. ```bash npm install mime ``` -------------------------------- ### Install Snapdragon with npm Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/snapdragon/README.md Install the snapdragon package using npm for use in your project. ```sh $ npm install --save snapdragon ``` -------------------------------- ### Serve Docsify Project Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/docsify-cli/README.md Run a server on localhost with live-reload. Options include --open and --port. ```shell docsify serve [--open false] [--port 3000] # docsify s [--open false] [--port 3000] ``` -------------------------------- ### Examples: Returns False When Accessor is Not a Function Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/define-property/node_modules/is-accessor-descriptor/README.md Returns false if the 'get' or 'set' properties are present but are not functions. ```js isAccessor({get: noop, set: 'baz'}) isAccessor({get: 'foo', set: noop}) isAccessor({get: 'foo', bar: 'baz'}) isAccessor({get: 'foo', set: 'baz'}) //=> false ``` -------------------------------- ### Example Output 1 Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/minimist/readme.markdown Demonstrates the output of parsing simple key-value arguments. ```bash $ node example/parse.js -a beep -b boop { _: [], a: 'beep', b: 'boop' } ``` -------------------------------- ### isAccessor Returns False for Non-Function Accessors Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/base/node_modules/is-accessor-descriptor/README.md Examples where isAccessor returns false because the 'get' or 'set' properties are not functions. ```js isAccessor({get: noop, set: 'baz'}) isAccessor({get: 'foo', set: noop}) isAccessor({get: 'foo', bar: 'baz'}) isAccessor({get: 'foo', set: 'baz'}) //=> false ``` -------------------------------- ### Install verb for building docs Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/unset-value/node_modules/has-value/node_modules/isobject/README.md Install the verb package and run the docs script to generate documentation. ```sh $ npm install verb && npm run docs ``` -------------------------------- ### POSITION Token Example Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/ret/README.md Represents a position assertion in a regular expression, such as start of string (^), end of string ($), or word boundary (\b). ```javascript { "type": ret.types.POSITION, "value": "^", } ``` -------------------------------- ### Install for-own with npm Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/for-own/README.md Install the for-own package using npm for use in your project. ```sh $ npm install --save for-own ``` -------------------------------- ### isAccessor Returns True for Valid Accessor Properties Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/base/node_modules/is-accessor-descriptor/README.md Examples where isAccessor returns true because the object has valid 'get' or 'set' properties with correct types. ```js isAccessor({get: noop, set: noop}) isAccessor({get: noop}) isAccessor({set: noop}) //=> true ``` -------------------------------- ### CLI Usage Example Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/marked/README.md Demonstrates how to use Marked.js from the command line to convert markdown to HTML. ```bash $ marked -o hello.html hello world ^D $ cat hello.html

hello world

``` -------------------------------- ### Examples: Returns False for Invalid Properties Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/define-property/node_modules/is-accessor-descriptor/README.md Returns false when the object contains properties that are not part of a valid accessor descriptor, such as 'bar', 'writable', or 'value' when 'get' or 'set' are present. ```js isAccessor({get: noop, set: noop, bar: 'baz'}) isAccessor({get: noop, writable: true}) isAccessor({get: noop, value: true}) //=> false ``` -------------------------------- ### Install Puppeteer Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/puppeteer/README.md Install Puppeteer using npm or yarn. This includes a download of Chromium. ```bash npm i puppeteer # or "yarn add puppeteer" ``` -------------------------------- ### Examples: Returns True for Valid Accessor Properties Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/define-property/node_modules/is-accessor-descriptor/README.md Returns true when the object has valid accessor properties ('get' and/or 'set') and these properties have the correct JavaScript types (functions). ```js isAccessor({get: noop, set: noop}) isAccessor({get: noop}) isAccessor({set: noop}) //=> true ``` -------------------------------- ### Install isobject with yarn Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/cache-base/node_modules/isobject/README.md Install the isobject package using yarn for use in your project. ```sh $ yarn add isobject ``` -------------------------------- ### Build documentation with verb Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/object.pick/README.md Install verb and verb-generate-readme globally to generate the project's documentation. ```sh npm install -g verb verb-generate-readme && verb ``` -------------------------------- ### Basic Usage: Check for Accessor Descriptor Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/define-property/node_modules/is-accessor-descriptor/README.md Use the isAccessor function to check if an object has the characteristics of a valid JavaScript accessor descriptor. This example shows a simple object with a 'get' function. ```js var isAccessor = require('is-accessor-descriptor'); isAccessor({get: function() {}}); //=> true ``` -------------------------------- ### Install is-windows with npm Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/is-windows/README.md Install the is-windows package using npm for use in your project. ```sh npm install --save is-windows ``` -------------------------------- ### Hyphen Range Example Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/semver/README.md Specifies an inclusive set of versions. Missing parts in the first version are replaced with zeroes, and missing parts in the second version are handled to include all versions starting with the provided parts. ```semver 1.2.3 - 2.3.4 := >=1.2.3 <=2.3.4 ``` ```semver 1.2 - 2.3.4 := >=1.2.0 <=2.3.4 ``` ```semver 1.2.3 - 2.3 := >=1.2.3 <2.4.0 ``` ```semver 1.2.3 - 2 := >=1.2.3 <3.0.0 ``` -------------------------------- ### Install dev dependencies and run tests Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/is-data-descriptor/README.md Instructions for setting up the development environment and running tests for the is-data-descriptor package. ```sh #!/bin/sh $ npm i -d && npm test ``` -------------------------------- ### Run Benchmarks Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/repeat-string/README.md Instructions to install development dependencies and run the benchmark tests. ```sh npm i -d && node benchmark ``` -------------------------------- ### Basic Minium Test Script Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/minium/JavaScript/quick_start.md A basic JavaScript example demonstrating how to create a Minium client, get the app instance, retrieve system information, and shut down the client. This script requires Node.js and the WeChat DevTools to be running in safe mode. ```javascript const Minium = require("minium") const project_path = path.join(__dirname, "miniprogram-demo") async function main() { try { const client = await Minium.create(undefined, undefined, project_path, undefined, "info") const app = await client.getApp() const system_info = await client.getSystemInfo() console.log("system_info: ", system_info) await client.shutdown() } catch (e) { console.error(e) } process.exit(0) } main() ``` -------------------------------- ### Install verb for documentation generation Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/map-cache/README.md Install the verb package and run the documentation generation script. ```sh npm install verb && npm run docs ``` -------------------------------- ### Create AST Node in Parser Visitor Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/snapdragon-node/README.md Example of creating a new AST node within a snapdragon parser visitor function. This demonstrates how to capture the current position, match a pattern, and return a new Node with its type and value, setting its start and end positions. ```js var Node = require('snapdragon-node'); var Snapdragon = require('snapdragon'); var snapdragon = new Snapdragon(); // example usage inside a parser visitor function snapdragon.parser.set('foo', function() { // get the current "start" position var pos = this.position(); // returns the match if regex matches the substring // at the current position on `parser.input` var match = this.match(/foo/); if (match) { // call "pos" on the node, to set the start and end // positions, and return the node to push it onto the AST // (snapdragon will push the node onto the correct // nodes array, based on the stack) return pos(new Node({type: 'bar', val: match[0]})); } }); ``` -------------------------------- ### Customize Specific Yargs Strings Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/yargonaut/README.md This snippet demonstrates how to customize specific strings in yargs output, such as error messages. It uses yargonaut's font and style methods to change the appearance of the 'Invalid values:' string. The example also shows a typical yargs setup with an option that requires a choice. ```javascript require('yargonaut') .font('DOS Rebel', 'Invalid values:') .style('yellow', 'Invalid values:') var argv = require('yargs') .option('s', { alias: 'size', describe: 'Desired product size', choices: ['s', 'm', 'l'], demand: true }) .showHelpOnFail(false) .argv ``` -------------------------------- ### Example CLI Initialization Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/yargs/README.md A basic Node.js script to initialize Yargs with commands from the 'cmds' directory. ```javascript #!/usr/bin/env node require('yargs') .commandDir('cmds') .demandCommand() .help() .argv ``` -------------------------------- ### Install cross-spawn Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/cross-spawn/README.md Install the cross-spawn package using npm. If using spawnSync on older Node.js versions (0.10 and below), also install spawn-sync. ```bash npm install cross-spawn ``` ```bash npm install spawn-sync ``` -------------------------------- ### Install xdg-basedir Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/xdg-basedir/readme.md Install the xdg-basedir module using npm. ```bash $ npm install --save xdg-basedir ``` -------------------------------- ### Install url-parse-lax Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/url-parse-lax/readme.md Install the url-parse-lax package using npm. ```bash $ npm install --save url-parse-lax ``` -------------------------------- ### Install Dev Dependencies and Run Benchmarks Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/regex-cache/README.md Installs development dependencies and then runs the project's benchmarks. This is useful for performance testing. ```bash npm i -d && npm run benchmarks ``` -------------------------------- ### Install utils-merge Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/utils-merge/README.md Install the utils-merge package using npm. ```bash $ npm install utils-merge ``` -------------------------------- ### Run documentation build with verb Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/has-values/node_modules/is-number/README.md Instructions for generating the README documentation using the verb tool. This requires global installation of verb and the readme generator. ```sh $ npm install -g verb verb-generate-readme && verb ``` -------------------------------- ### Install ansi-regex Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/string-width/node_modules/ansi-regex/readme.md Install the ansi-regex package using npm. ```bash $ npm install ansi-regex ``` -------------------------------- ### Install ret.js Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/ret/README.md Install the ret.js package using npm. ```bash npm install ret ``` -------------------------------- ### Install object.omit Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/object.omit/README.md Install the object.omit package using npm. ```sh $ npm install --save object.omit ``` -------------------------------- ### JSON5 package.json5 Example Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/json5/README.md This example shows a realistic package.json5 file, illustrating JSON5 syntax within a project's configuration. It includes features like unquoted keys and comments. ```json5 // This file is written in JSON5 syntax, naturally, but npm needs a regular // JSON file, so compile via `npm run build`. Be sure to keep both in sync! { name: 'json5', version: '0.5.0', description: 'JSON for the ES5 era.', keywords: ['json', 'es5'], author: 'Aseem Kishore ', contributors: [ // TODO: Should we remove this section in favor of GitHub's list? // https://github.com/aseemk/json5/contributors 'Max Nanasy ', 'Andrew Eisenberg ', 'Jordan Tucker ', ], main: 'lib/json5.js', bin: 'lib/cli.js', files: ["lib/"], dependencies: {}, devDependencies: { gulp: "^3.9.1", 'gulp-jshint': "^2.0.0", jshint: "^2.9.1", 'jshint-stylish': "^2.1.0", mocha: "^2.4.5" }, scripts: { build: 'node ./lib/cli.js -c package.json5', test: 'mocha --ui exports --reporter spec', // TODO: Would it be better to define these in a mocha.opts file? }, homepage: 'http://json5.org/', license: 'MIT', repository: { type: 'git', url: 'https://github.com/aseemk/json5.git', }, } ``` -------------------------------- ### Install verb for building docs Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/is-posix-bracket/README.md Install the verb package globally or locally to build documentation. ```sh npm install verb && npm run docs ``` ```sh verb ``` -------------------------------- ### Install LiveReload Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/livereload/README.md Install the livereload package using npm. ```sh $ npm install livereload --save ``` -------------------------------- ### Build Documentation Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/arr-flatten/README.md Command to install dependencies and build the documentation for the arr-flatten project using verb. ```sh $ npm install -g verbose/verb#dev verb-generate-readme && verb ``` -------------------------------- ### Install lru-cache Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/lru-cache/README.md Install the lru-cache module using npm. ```javascript npm install lru-cache --save ``` -------------------------------- ### Browser Installation (Full Version) Source: https://github.com/leoxiaoge/minium/blob/master/minium-doc/node_modules/puppeteer/node_modules/mime/src/README_js.md Include the full browser-ready version of the Mime module using a script tag from wzrd.in. ```html