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

Commit

Permalink
Merge pull request #9 from thiagodesouza/master
Browse files Browse the repository at this point in the history
feat(v4): update project structure
  • Loading branch information
thrsouza authored Jan 19, 2020
2 parents ce60d29 + 8b14b32 commit f915368
Show file tree
Hide file tree
Showing 163 changed files with 21,559 additions and 2,486 deletions.
14 changes: 8 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# dependencies
node_modules
temp

# production
build
dist

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
.npmrc

npm-debug.log*
yarn-debug.log*
yarn-error.log*
37 changes: 28 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,37 @@
language: node_js

node_js:
- node

cache:
yarn: true
directories:
- node_modules
install:
- yarn

script:
- yarn format
- bash scripts/travis-create-assets.sh
- yarn lerna:format
- yarn build

deploy:
provider: npm
email: $EMAIL
api_key: $NPM_API_KEY
on:
tags: true
repo: neutronjs/neutron-cli
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: website/build
on:
branch: master

- provider: releases
api_key: $GITHUB_TOKEN
skip_cleanup: true
overwrite: true
file: "temp/packages/*"
on:
tags: true
repo: neutronjs/neutron

- provider: script
script: bash scripts/travis-deploy-npm.sh
on:
tags: true
repo: neutronjs/neutron
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)
MIT License

Copyright (c) 2017
Copyright (c) 2020 - Neutron JS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Thanks for your interest on our project. Take a moment to read our guidelines:
We have a few channels for contact:

- Email: [[email protected]](mailto:[email protected])
- [GitHub Issues](https://github.com/neutronjs/neutron-website/issues)
- [GitHub Issues](https://github.com/neutronjs/neutron/issues)

<hr/>

Expand Down
3 changes: 0 additions & 3 deletions commitlint.config.js

This file was deleted.

21 changes: 21 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"npmClient": "yarn",
"packages": [
"packages/neutron-cli",
"packages/neutron-start-react-native-template",
"packages/neutron-start-react-template",
"website"
],
"useWorkspaces": true,
"version": "4.0.0-next.0",
"changelog": {
"repo": "neutronjs/neutron",
"labels": {
"neutron: breaking": ":boom: Breaking Change",
"neutron: enhancement": ":rocket: Enhancement",
"neutron: bug": ":bug: Bug Fix",
"neutron: documentation": ":memo: Documentation",
"neutron: internal": ":house: Internal"
}
}
}
76 changes: 26 additions & 50 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,65 +1,41 @@
{
"name": "@neutronjs/cli",
"description": "This CLI was developed to help developers create new projects quickly and easily",
"private": true,
"version": "3.0.1",
"license": "MIT",
"main": "build/cli.js",
"bin": {
"neutron": "bin/neutron"
},
"workspaces": [
"packages/neutron-cli",
"packages/neutron-start-react-native-template",
"packages/neutron-start-react-template",
"website"
],
"scripts": {
"format": "prettier --write **/*.{js,jsx,json} && eslint **/*.{js,jsx} --fix"
},
"author": {
"name": "Thiago de Souza",
"email": "[email protected]",
"url": "https://github.com/thiagodesouza"
},
"repository": {
"type": "git",
"url": "https://github.com/neutronjs/neutron.git"
"build": "yarn workspace @neutronjs/website build",
"start": "yarn workspace @neutronjs/website start",
"postinstall": "yarn lerna:bootstrap",
"lerna:bootstrap": "lerna bootstrap",
"lerna:changelog": "lerna-changelog",
"lerna:clean": "lerna clean --yes",
"lerna:format": "lerna run format",
"lerna:version": "lerna version",
"neutron:link": "yarn workspace @neutronjs/cli link",
"neutron:unlink": "yarn workspace @neutronjs/cli unlink",
"neutron:upgrade": "yarn upgrade-interactive --latest"
},
"keywords": [
"neutron",
"expo",
"react",
"react-native",
"node",
"javascript",
"gluegun"
],
"files": [
"src",
"LICENSE",
"README.md",
"bin"
],
"lint-staged": {
"./**/*.js": [
"yarn format",
"git add ."
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"pre-commit": "lerna run --concurrency 1 --stream precommit",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"dependencies": {
"exec-sh": "^0.3.4",
"gluegun": "^4.1.2",
"hyperquest": "^2.1.3",
"tar-pack": "^3.4.1"
},
"devDependencies": {
"@commitlint/cli": "^8.3.4",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.19.1",
"husky": "^3.1.0",
"lint-staged": "^9.5.0",
"prettier": "^1.19.1"
"husky": "^4.0.10",
"lerna": "^3.20.2",
"lerna-changelog": "^1.0.0"
}
}
9 changes: 9 additions & 0 deletions packages/neutron-cli/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions packages/neutron-cli/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# dependencies
node_modules

# production
build
dist

# misc
.DS_Store
npm-debug.log*
yarn-debug.log*
yarn-error.log*
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
57 changes: 57 additions & 0 deletions packages/neutron-cli/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "@neutronjs/cli",
"description": "This CLI was developed to help developers create new projects quickly and easily",
"version": "4.0.0-next.0",
"license": "MIT",
"main": "build/cli.js",
"bin": {
"neutron": "bin/neutron"
},
"scripts": {
"format": "prettier --write **/*.{js,jsx,json} && eslint **/*.{js,jsx} --fix",
"precommit": "lint-staged"
},
"author": {
"name": "Thiago de Souza",
"email": "[email protected]",
"url": "https://github.com/thiagodesouza"
},
"repository": {
"type": "git",
"url": "https://github.com/neutronjs/neutron.git"
},
"keywords": [
"neutron",
"expo",
"react",
"react-native",
"node",
"javascript",
"gluegun"
],
"files": [
"src",
"LICENSE",
"README.md",
"bin"
],
"lint-staged": {
"**/*.{js,jsx}": [
"yarn format",
"git add ."
]
},
"dependencies": {
"exec-sh": "^0.3.4",
"gluegun": "^4.1.2",
"hyperquest": "^2.1.3",
"tar-pack": "^3.4.1"
},
"devDependencies": {
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.19.1",
"lint-staged": "^9.5.0",
"prettier": "^1.19.1"
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ class AddDuckCommand {
return;
}

const pascalCaseName = strings.pascalCase(parameters.first);
const camelCaseName = strings.camelCase(parameters.first);
const upperCaseName = strings.upperCase(pascalCaseName).replace(' ', '_');
const pascalCaseName = strings.pascalCase(parameters.first);
const file = `src/store/ducks/${camelCaseName}.js`;

if (filesystem.exists(file)) {
Expand All @@ -57,7 +56,7 @@ class AddDuckCommand {
await template.generate({
template: 'shared/add-duck/duck.js.ejs',
target: file,
props: { pascalCaseName, upperCaseName },
props: { camelCaseName, pascalCaseName },
});

PrintDivider();
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ class AddSagaCommand {
return;
}

const pascalCaseName = strings.pascalCase(parameters.first);
const camelCaseName = strings.camelCase(parameters.first);
const upperCaseName = strings.upperCase(pascalCaseName).replace(' ', '_');
const pascalCaseName = strings.pascalCase(parameters.first);

const sagaFileName = `src/store/sagas/${camelCaseName}.js`;
const duckFileName = `src/store/ducks/${camelCaseName}.js`;
Expand All @@ -66,8 +65,8 @@ class AddSagaCommand {
template: 'shared/add-saga/saga.js.ejs',
target: sagaFileName,
props: {
pascalCaseName,
camelCaseName,
pascalCaseName,
},
});

Expand All @@ -78,7 +77,7 @@ class AddSagaCommand {
);

PrintMessage(
`import { ${pascalCaseName}Types } from '../ducks/${camelCaseName}';`,
`import ${pascalCaseName}Actions from '@/store/ducks/${camelCaseName}';`,
MessageType.DEFAULT,
2,
);
Expand Down Expand Up @@ -106,7 +105,7 @@ class AddSagaCommand {
await template.generate({
template: 'shared/add-duck/duck.js.ejs',
target: duckFileName,
props: { pascalCaseName, upperCaseName },
props: { camelCaseName, pascalCaseName },
});

PrintDivider();
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ class NeutronInfo {
String.raw`| |\ | __/ |_| | |_| | | (_) | | | |:|_| |___) |`,
String.raw`|_| \_|\___|\__,_|\__|_| \___/|_| |_|\___/|____/ `,
],
SubTitle: `React & React Native Flux Architecture CLI v${version}`,
SubTitle: `React & React Native Flux Architecture CLI v${
version.split('-')[0]
}`,
};
}

Expand Down
Loading

0 comments on commit f915368

Please sign in to comment.