Skip to content

Commit

Permalink
CLI to install project (twentyhq#164)
Browse files Browse the repository at this point in the history
* CLI to install project

* CLI fixes

* Update README.md

* Cleanup gitignore
  • Loading branch information
FelixMalfait authored Jun 1, 2023
1 parent 7d87598 commit e8f1146
Show file tree
Hide file tree
Showing 22 changed files with 6,639 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ It is meant to be:
- Perfectly in-sync with your data
- Crafted with care and enjoyable to use

# Quickstart
No need to clone the repo, just run `npx twenty-cli` in your terminal and follow the instructions.

# Progress
We are currently in the development phase of Twenty's alpha version:

Expand Down
26 changes: 26 additions & 0 deletions cli/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended'
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js', 'codegen.js', '**/generated/*', '/lib/*'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
};

36 changes: 36 additions & 0 deletions cli/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# Dependency directories
node_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# other
lib/
.DS_Store
4 changes: 4 additions & 0 deletions cli/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
2 changes: 2 additions & 0 deletions cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Twenty CLI
A simple CLI to get started with Twenty
8 changes: 8 additions & 0 deletions cli/__tests__/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { execShell } from '../src/config';

export {};

test('execShell runs a shell command', async () => {
let response = await execShell('echo "hello"');
expect(response).toEqual('hello\n');
});
5 changes: 5 additions & 0 deletions cli/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
Loading

0 comments on commit e8f1146

Please sign in to comment.