Skip to content

Commit

Permalink
Merge pull request #24 from maticzav/next
Browse files Browse the repository at this point in the history
Emma 2.0
  • Loading branch information
maticzav authored Mar 20, 2019
2 parents bf2e3d8 + 8181a83 commit 1c1f841
Show file tree
Hide file tree
Showing 33 changed files with 4,236 additions and 3,302 deletions.
21 changes: 0 additions & 21 deletions .babelrc

This file was deleted.

13 changes: 3 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ jobs:
- image: 'circleci/node:latest'
steps:
- checkout
- run:
name: install
command: npm install
- run:
name: test
command: |
npm run test
- run:
name: release
command: npm run semantic-release || true
- run: yarn install
- run: yarn run build
- run: yarn run release
Empty file added .github/opencollective.yml
Empty file.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# dependencies
/node_modules
/coverage

# production
/dist
Expand Down
5 changes: 5 additions & 0 deletions .huskyrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"hooks": {
"pre-commit": "pretty-quick --staged"
}
}
78 changes: 37 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,74 +9,70 @@

> Install the package you are looking for.
Powered by [Algolia search API](https://www.algolia.com/), [npm-suggestions](https://github.com/JureSotosek/npm-suggestions) and the [Yarn](http://yarnpkg.com/) package manager.
Powered by [Algolia search API](https://www.algolia.com/).

<p align="center"><img src="media/newExample.gif" width="655" /></p>
<p align="center"><img src="media/demo.gif" width="655" /></p>

## Overview

Emma is a command line assistant which helps you search and install packages more efficiently. Algolia's responsive and interactive features gives you the information you need to find the right package, while npm-suggestions make it quicker then ever to find the packages you need.
Emma is a command line assistant which helps you search and install packages more efficiently from your CLI.

## Features

- **Extremely fast:** Search all the packages from NPM and Yarn using your terminal.
- **Suggestions:** Get packages selected based on the ones you have already selected.
- **Build the stack:** Search for multiple packages and install them with one keystroke.
- **Automatic tool detection:** Detects whether it should use Yarn or NPM, out of the box.
- 🔍**Peek definitions:** Use right arrow keys to get description of the packages or peek README.
-**Scroll infinitely:** Search all the packages from NPM and Yarn using your terminal.
- 📚**Build the stack:** Search for multiple packages and install them with one keystroke.

## Install

```bash
npm install -g emma-cli
npx emma-cli
```

Use Yarn or NPM to install.
or

```bash
yarn global add emma-cli
```

> Exposes two global commands, `ema` and `emma`.
## Example

```
❯ emma-cli ~ emma
Search packages 📦 : grap
Search results:
11 grap loopingrage Utility that GReps for gAPs and out of sequence line in log
8.4m sass-graph xzyfer Parse sass files and extract a graph of imports
3.7m @types/graphql DefinitelyTyped TypeScript definitions for graphql
❯ 2.9m graphql graphql A Query Language and Runtime which can target any service.
1.8m graphlib dagrejs A directed and undirected multi-graph library
Suggestions results: Press Tab to select suggestions
10.2m react-dom facebook React package for working with the DOM.
14.6m prop-types facebook Runtime type checking for React props and similar objects.
7m classnames JedWatson A simple utility for conditionally joining classNames toget
65.3m lodash lodash Lodash modular utilities.
7.2m redux reactjs Predictable state container for JavaScript apps
Search packages on Yarn: @types/rea
◉ 16.6m @types/react DefinitelyTyped
7.3m @types/react-dom DefinitelyTyped
4m @types/react-router DefinitelyTyped
3.9m @types/react-transition-group DefinitelyTyped
2.8m @types/react-router-dom DefinitelyTyped
Overview
dependencies
- react
- react-dom
devDependencies
- @types/react
Installation
Successfully installed dependendencies!
Search powered by Algolia.
Picked: Press Space to install packages...
› react 16.5.1
```

## API

```
Usage
$ emma
Options
--dev -D Add to dev dependencies.
--limit -L Number of packages shown, defaults to 5.
Example
$ emma -D
Run without package-name to enter live search.
Use keyboard to search through package library.
Use up/down to select packages.
Use enter to select a package.
Use tab to move between search/suggestions.
When query is empty use backspace to remove packages.
Click space to trigger the install.
$ emma
Controls:
- space: toggle dependencies
- up/down: scroll the list
- right/left: hide or show details
- double right: show repo
```

> All flags after `emma` are forwarded to installer.
## Contributors

This project exists thanks to all the people who contribute.
Expand Down
21 changes: 21 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
roots: ['<rootDir>/tests', '<rootDir>/src'],
testEnvironment: 'node',
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
testPathIgnorePatterns: ['/node_modules/', '/__fixtures__/'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
collectCoverage: true,
collectCoverageFrom: [
'**/*.{ts,tsx}',
'!**/node_modules/**',
'!**/vendor/**',
'!**/generated/**',
],
snapshotSerializers: ['jest-serializer-ansi'],
verbose: true,
coverageDirectory: './coverage',
coverageReporters: ['json', 'lcov', 'text', 'clover', 'html'],
}
Binary file added media/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed media/newExample.gif
Binary file not shown.
107 changes: 65 additions & 42 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,76 +1,99 @@
{
"name": "emma-cli",
"description": "Great assistant who helps you search Yarn and NPM in your terminal.",
"description": "Advanced package search from your terminal.",
"author": "Matic Zavadlal <[email protected]>",
"version": "0.0.0-semantic-release",
"bin": {
"emma": "dist/index.js"
"emma": "dist/bin.js",
"ema": "dist/bin.js"
},
"engines": {
"node": ">=8.0.0"
},
"release": {
"branch": "master"
},
"scripts": {
"build": "babel src --out-dir dist --ignore __tests__",
"prepublish": "cross-env NODE_ENV=production npm run build",
"dev": "babel -w src --out-dir dist --ignore __tests__",
"format": "prettier --write --ignore-path .gitignore {src,.}/*.js",
"test": "prettier-check --ignore-path .gitignore {src,.}/*.js && ava",
"build": "tsc -d",
"coverage": "yarn codecov",
"dev": "ts-node --files src/bin.tsx",
"prepack": "npm run build",
"pack": "pkg dist/bin.js -c package.json -o packed",
"prepublish": "npm run build",
"pretest": "npm run build",
"semantic-release": "semantic-release",
"postinstall": "opencollective postinstall"
"release": "semantic-release",
"test": "jest"
},
"main": "dist/index.js",
"files": [
"dist"
],
"homepage": "https://github.com/maticzav/emma-cli",
"keywords": [
"emma"
"emma",
"yarn",
"npm"
],
"bugs": {
"url": "https://github.com/maticzav/emma-cli/issues"
},
"dependencies": {
"algoliasearch": "^3.24.12",
"apollo-cache-inmemory": "^1.2.10",
"apollo-client": "^2.4.2",
"apollo-link-http": "^1.5.5",
"ava": "^0.25.0",
"child_process": "^1.0.2",
"dot-prop": "^4.2.0",
"execa": "^0.9.0",
"graphql": "^14.0.2",
"graphql-tag": "^2.9.2",
"has-ansi": "^3.0.0",
"ink": "^0.4.1",
"ink-select-input": "^1.0.0",
"ink-spinner": "^1.0.0",
"ink-text-input": "^1.1.1",
"meow": "^4.0.0",
"opencollective": "^1.0.3",
"prettier": "^1.14.2",
"prettier-check": "^2.0.0",
"term-size": "^1.2.0",
"update-notifier": "^2.3.0",
"yargs": "^11.0.0"
"algoliasearch": "^3.32.1",
"execa": "^1.0.0",
"ink": "^2.0.5",
"ink-spinner": "^3.0.0",
"meow": "^5.0.0",
"multilines": "^1.0.2",
"opn": "^5.5.0",
"react": "^16.8.4",
"update-notifier": "^2.5.0"
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.40",
"@babel/core": "^7.0.0-beta.40",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.40",
"@babel/preset-env": "^7.0.0-beta.40",
"babel-plugin-transform-react-jsx": "^6.24.1",
"cross-env": "^5.1.3",
"semantic-release": "^12.4.1"
"@types/algoliasearch": "^3.30.7",
"@types/execa": "^0.9.0",
"@types/ink": "^0.5.1",
"@types/ink-testing-library": "^1.0.0",
"@types/jest": "^24.0.11",
"@types/meow": "^5.0.0",
"@types/node": "^11.11.3",
"@types/opn": "^5.1.0",
"@types/react": "^16.8.8",
"@types/update-notifier": "^2.5.0",
"@zeit/ncc": "^0.16.1",
"codecov": "^3.2.0",
"husky": "^1.3.1",
"ink-testing-library": "^1.0.1",
"jest": "^24.5.0",
"jest-serializer-ansi": "^1.0.3",
"pkg": "^4.3.7",
"prettier": "^1.16.4",
"pretty-quick": "^1.10.0",
"semantic-release": "^12.4.1",
"ts-jest": "^24.0.0",
"ts-node": "^8.0.3",
"typescript": "^3.3.3333"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/maticzav/emma-cli.git"
},
"pkg": {
"scripts": "dist/**/*.js",
"targets": [
"node10-alpine-x64",
"node10-linux-x64",
"node10-macos-x64",
"node10-win-x64"
]
},
"release": {
"branch": "master",
"publish": [
"@semantic-release/npm",
{
"path": "@semantic-release/github",
"assets": "packed/*"
}
]
},
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/emma-cli",
Expand Down
Loading

0 comments on commit 1c1f841

Please sign in to comment.