exprs v0.1.0
exprs
The command-line interface for exprs.sh.
exprs is a micromodule hosting and registry service for JavaScript. No worry about setting lint, formatting, transpilations or test runners. Just write and share your code.
Features
- Just expression. A micromodule is a single expression of JavaScript, which will do one thing well.
- Immutable. All micromodules are immutable and would never dissapear.
- Deterministic. With aliasing, your dependencies are not unintentionally upgraded and are always the exact same.
- Transpile on install. The transpilation runs on the installtion phase, so module users can select supporting environments instead of authors.
- No task setup. Common tasks like linting and formatting are integrated into the platform.
- No name collision. All micromodules have an unique name and can have alias names under your namespace.
Get started
Install the package from npm:
npm install --global exprs
# or with `yarn`
yarn global add exprsInstall a micromodule:
exprs add @nkzawa/leftPadUse it on your applications as always you do with node modules:
const leftPage = require("@nkzawa/leftPad");Commands
exprs install
Install micromodules defined in package.json.
This command is the default so you can execute it as just exprs.
exprs install
# or just
exprsdependencies and devDependencies are defined on the exprs field:
{
"exprs": {
"dependencies": {
"@nkzawa/leftPad": "leftPad_a01",
"@username/aliasName": "moduleName_b12",
"someModule_c23": "someModule_c23"
}
}
}To not install devDependencies, use the --production option:
exprs --productionexprs add \<module|alias...>
Install a micromodule from the registry and add it to package.json.
exprs add @nkzawa/leftPadTo install as devDependencies, run with the --dev (or -d) option:
exprs add --dev @nkzawa/leftPadexprs upgrade alias...
Upgrade aliases to the latest version of micromodules.
exprs upgradeexprs remove \<module|alias...>
Uninstall a micromodule and remove it from package.json.
exprs remove @nkzawa/leftPadexprs help
Display the help message.
exprs helpIntegration with npm
When your npm package has dependencies on exprs micromodules,
you want to setup a npm hook script
to install micromodules along with npm install:
{
"scripts": {
"install": "exprs"
},
"dependencies": {
"exprs": "*"
}
}License
MIT