Skip to content

Commit

Permalink
Merge pull request #7 from ChFlick/switch-to-new-ui
Browse files Browse the repository at this point in the history
Fix: Switch to new cerebro-ui version
  • Loading branch information
ogustavo-pereira authored Nov 7, 2022
2 parents dc00d5b + 731a677 commit 19dd317
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 182 deletions.
15 changes: 0 additions & 15 deletions .babelrc

This file was deleted.

26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

39 changes: 13 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"name": "cerebro-mac-apps",
"version": "1.0.2",
"version": "1.0.3",
"description": "Plugin for searching and launching applications on MacOS",
"license": "MIT",
"repository": "KELiON/cerebro-mac-apps",
"homepage": "https://github.com/cerebroapp/cerebro-mac-apps#readme",
"bugs": {
"url": "https://github.com/cerebroapp/cerebro-mac-apps/issues"
},
"repository": "github:cerebroapp/cerebro-mac-apps",
"author": {
"name": "Alexandr Subbotin",
"email": "[email protected]",
Expand All @@ -13,11 +17,9 @@
"node": ">=4"
},
"scripts": {
"build": "webpack && babili dist -d dist --compact --no-comments",
"debug": "./scripts/debug",
"debug:windows": "scripts\\debug.bat",
"test": "NODE_ENV=test mocha --compilers js:babel-core/register --require ./test/setup.js",
"prepublish": "rimraf ./dist && npm run build"
"start": "cerebro-scripts start",
"build": "cerebro-scripts build",
"test": "cerebro-scripts test"
},
"main": "dist/index.js",
"keywords": [
Expand All @@ -27,27 +29,12 @@
"applications"
],
"devDependencies": {
"babel-cli": "^6.18.0",
"babel-loader": "^6.2.8",
"babel-node-modules": "0.0.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-es2015-classes": "^6.24.1",
"babel-plugin-transform-es2015-modules-commonjs": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-plugin-transform-react-jsx": "^6.8.0",
"babili": "0.1.2",
"chai": "^3.5.0",
"css-loader": "^0.26.0",
"mocha": "^3.3.0",
"rimraf": "^2.6.1",
"style-loader": "^0.13.1",
"url-loader": "^0.5.7",
"webpack": "2.5.1"
"@cerebroapp/cerebro-scripts": "^1.0.0-alpha.6"
},
"dependencies": {
"cerebro-ui": "^0.0.14",
"cerebro-tools": "^0.1.0",
"du": "^0.1.0",
"@cerebroapp/cerebro-ui": "^2.0.0-alpha.3",
"cerebro-tools": "^0.1.8",
"du": "^1.0.0",
"event-stream": "3.3.4"
}
}
33 changes: 0 additions & 33 deletions scripts/debug

This file was deleted.

14 changes: 0 additions & 14 deletions scripts/debug.bat

This file was deleted.

9 changes: 2 additions & 7 deletions src/Preview/FileDetails/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { PropTypes, Component } from 'react'
import React, { Component } from 'react'

import bytesToSize from './bytesToSize'
import getFileSize from './getFileSize'
Expand All @@ -24,6 +24,7 @@ class FileDetails extends Component {
const { details, size } = this.state
const { ctime, mtime, atime } = details
const name = nodePath.basename(path)

return (
<div className={styles.fileDetails}>
{!skipName && <h3 className={styles.fileName}>{name}</h3>}
Expand All @@ -42,10 +43,4 @@ class FileDetails extends Component {
}
}

FileDetails.propTypes = {
path: PropTypes.string.isRequired,
skipName: PropTypes.bool,
skipSize: PropTypes.bool,
}

export default FileDetails
8 changes: 1 addition & 7 deletions src/Preview/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { PropTypes } from 'react'
import { FileIcon } from 'cerebro-ui'
import { FileIcon } from '@cerebroapp/cerebro-ui'
import FileDetails from './FileDetails'
import styles from './styles.css'

Expand All @@ -13,9 +12,4 @@ const Preview = ({ path, name }) => (
</div>
)

Preview.propTypes = {
path: PropTypes.string,
name: PropTypes.string,
}

export default Preview
9 changes: 7 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const toString = (app) => (
`${app.name} ${app.filename.replace(/\.app$/, '')} ${getAbbr(app.name)}`
)

export const fn = ({ term, actions, display }) => {
const plugin = ({ term, actions, display }) => {
cachedAppsList().then(items => {
const result = orderBy(
search(items, term, toString),
Expand Down Expand Up @@ -77,7 +77,7 @@ export const fn = ({ term, actions, display }) => {
})
}

export const initialize = () => {
const initialize = () => {
// Cache apps cache and force cache reloading in background
const recache = () => {
cachedAppsList.clear()
Expand All @@ -92,3 +92,8 @@ export const initialize = () => {
fs.watch(dir, WATCH_OPTIONS, recache)
})
}

export default {
initialize,
fn: plugin
}
52 changes: 0 additions & 52 deletions webpack.config.js

This file was deleted.

0 comments on commit 19dd317

Please sign in to comment.