Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
feat: add support to react-native
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiago de Souza committed Sep 15, 2019
1 parent 98d19d5 commit f2b724f
Show file tree
Hide file tree
Showing 92 changed files with 1,701 additions and 3,872 deletions.
4 changes: 0 additions & 4 deletions .prettierrc

This file was deleted.

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

This file was deleted.

68 changes: 32 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,58 @@
<h1 align="center">
<img src="assets/neutron.png" width="300" />
</h1>
<div align="center">
The best tool to speed up your development process! 💻️
</div>
<div align="center">
## 🚀 Overview

[![npm](https://img.shields.io/npm/v/@somadevs/neutron.svg)](https://www.npmjs.com/package/@somadevs/neutron)<space><space>
[![Build Status](https://travis-ci.org/somadevs/neutron.svg?branch=master)](https://travis-ci.org/somadevs/neutron)<space><space>
This CLI was developed to help developers create new react projects with [Redux](https://github.com/reduxjs/redux) + [Duck Pattern](https://github.com/erikras/ducks-modular-redux).

</div>
#### Templates and Scaffolding

## Overview
- [x] React JS
- [x] React Native

This CLI was developed to help developers create new projects quickly and easily.
<br/>

#### Templates and Scaffold

- [x] ReactJS
- [ ] React Native
- [ ] Node REST API
- [ ] Node GraphQL API

## Quick Start
## ‍👨🏽‍💻 Quick Start

To install Neutron CLI, execute into your terminal:

```shell
$ npm i @somadevs/neutron -g
# yarn
$ yarn global add @neutron.js/cli

# npm
$ npm i @neutron.js/cli -g
```

Command list:

```shell
$ neutron -h

neutron -
react add:component Add new component files
react add:duck Add new duck file
react add:page Add new page files
react add:saga Add new saga file
react create Create new react app with duck pattern
help (h) -
version (v) Output the version number
Starts With:
neutron create Create new project with React

Commands:
neutron add:component Add new component files
neutron add:duck Add new duck file
neutron add:page Add new page files
neutron add:saga Add new saga file

Utils:
neutron -h Show help information
neutron -v Output the version number
```

## What's under the hood?
<br/>

## 🚘 What's under the hood?

[create-react-app](https://github.com/facebook/create-react-app) to create a project basis <br/>
[gluegun](https://github.com/infinitered/gluegun) toolkit for building node-based command-line interfaces

## Contributing
<br/>

## 📃 Contributing

Thanks for your interest on our project. Take a moment to read our guidelines:

- [Contributing](.github/CONTRIBUTING.md)
- [Code of Conduct](.github/CODE_OF_CONDUCT.md)

## License
## 📃 License

MIT © [Somadevs](https://github.com/somadevs)
MIT © [NeutronJs](https://github.com/neutronjs)
16 changes: 0 additions & 16 deletions __tests__/react/add-component.spec.ts

This file was deleted.

16 changes: 0 additions & 16 deletions __tests__/react/add-duck.spec.ts

This file was deleted.

16 changes: 0 additions & 16 deletions __tests__/react/add-page.spec.ts

This file was deleted.

15 changes: 0 additions & 15 deletions __tests__/react/add-saga.spec.ts

This file was deleted.

12 changes: 0 additions & 12 deletions __tests__/react/create.spec.ts

This file was deleted.

10 changes: 0 additions & 10 deletions __tests__/utils/index.ts

This file was deleted.

Binary file removed assets/neutron.png
Binary file not shown.
10 changes: 10 additions & 0 deletions assets/neutron.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional']
}
extends: ["@commitlint/config-conventional"]
};
12 changes: 0 additions & 12 deletions jest.config.js

This file was deleted.

42 changes: 20 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@somadevs/neutron",
"name": "@neutron.js/cli",
"description": "This CLI was developed to help developers create new projects quickly and easily",
"version": "1.0.0",
"version": "2.0.0",
"main": "build/cli.js",
"license": "MIT",
"bin": {
Expand All @@ -12,23 +12,22 @@
"lint": "tslint -p .",
"compile": "tsc -p .",
"templatescopy": "rm -rf build/templates && yes | cp -rf src/templates build/templates",
"build": "yarn format && yarn lint && yarn compile && yarn templatescopy",
"test": "jest",
"watch": "jest --watch"
"build": "yarn format && yarn lint && yarn compile && yarn templatescopy"
},
"author": {
"name": "Thiago de Souza",
"email": "[email protected]",
"url": "https://www.thiagodesouza.com.br"
"url": "https://github.com/thiagodesouza"
},
"repository": {
"type": "git",
"url": "https://github.com/somadevs/neutron"
"url": "https://github.com/neutronjs/neutron-cli"
},
"keywords": [
"neutron",
"expo",
"react",
"somadevs",
"react-native",
"node",
"typescript",
"gluegun"
Expand All @@ -39,7 +38,6 @@
"build",
"LICENSE",
"readme.md",
"docs",
"bin"
],
"jest": {
Expand All @@ -52,21 +50,21 @@
}
},
"dependencies": {
"gluegun": "^3.3.0",
"ts-node": "^8.2.0",
"typescript": "^3.5.1"
"exec-sh": "^0.3.2",
"gluegun": "^3.3.3",
"ts-node": "^8.3.0",
"typescript": "^3.6.2"
},
"devDependencies": {
"@commitlint/cli": "^8.0.0",
"@commitlint/config-conventional": "^8.0.0",
"@types/jest": "^24.0.13",
"@types/node": "^12.0.4",
"husky": "^2.3.0",
"jest": "^24.8.0",
"prettier": "^1.12.1",
"@commitlint/cli": "^8.1.0",
"@commitlint/config-conventional": "^8.1.0",
"@types/jest": "^24.0.18",
"@types/node": "^12.7.2",
"husky": "^3.0.4",
"prettier": "^1.18.2",
"ts-jest": "^24.0.2",
"tslint": "^5.12.0",
"tslint-config-prettier": "^1.17.0",
"tslint": "^5.19.0",
"tslint-config-prettier": "^1.18.0",
"tslint-config-standard": "^8.0.1"
}
}
}
16 changes: 7 additions & 9 deletions src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
const { build } = require('gluegun')
const { build } = require("gluegun");

/**
* Create the cli and kick it off
*/
async function run(argv) {
// create a CLI runtime
const cli = build()
.brand('neutron')
.brand("neutron")
.src(__dirname)
.plugins('./node_modules', { matching: 'neutron-*', hidden: true })
.help() // provides default for help, h, --help, -h
.plugins("./node_modules", { matching: "neutron-*", hidden: true })
.version() // provides default for version, v, --version, -v
.defaultCommand()
.create()
.create();

// and run it
const toolbox = await cli.run(argv)
const toolbox = await cli.run(argv);

// send it back (for testing, mostly)
return toolbox
return toolbox;
}

module.exports = { run }
module.exports = { run };
Loading

0 comments on commit f2b724f

Please sign in to comment.