Skip to content

Commit

Permalink
fix(js): packages author
Browse files Browse the repository at this point in the history
Signed-off-by: Godefroy Ponsinet <godefroy.ponsinet@outlook.com>
  • Loading branch information
90dy committed Sep 25, 2019
1 parent 9994061 commit 40181c5
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 25 deletions.
53 changes: 35 additions & 18 deletions js/Makefile
Expand Up @@ -3,6 +3,10 @@ export PATH := $(PWD)/node_modules/.bin:$(PATH)

UNAME_S ?= $(shell uname -s)

author = Berty Technologies <oss@berty.tech>
contributor = $(shell git config --get user.name) <$(shell git config --get user.email)>
license = (Apache-2.0 or MIT)

ifeq ($(UNAME_S),Darwin)
export SHELL = /bin/bash
npm := /usr/local/bin/npm
Expand All @@ -24,15 +28,13 @@ lerna_flags := --reject-cycles --concurrency=8
lerna_upgrade := $(bin)/upd
lerna_exec := $(lerna) $(lerna_flags) exec --stream --parallel --scope=$1 --

json := $(bin)/json

eslint := $(bin)/eslint

pkg ?= $(shell find $(PWD)/packages -depth 1 -type d)
pkg_mod := $(patsubst %, %/node_modules, $(pkg))

include packages/berty-app/Makefile
include packages/storybook-mobile/Makefile
include packages/storybook-web/Makefile
include packages/react-native-core/Makefile
pkg_desc := $(patsubst %, %/node_modules, $(pkg))

.DEFAULT_GOAL := deps

Expand Down Expand Up @@ -80,27 +82,36 @@ fclean: fclean

.PHONY: pkg
pkg: name ?= example
pkg: export PWD := $(PWD)
pkg: $(mod)
lerna create @berty-tech/$(name) \
--access restricted \
--private \
--license '(Apache-2.0 OR MIT)' \
--yes \
--license '$(license)' \
--yes
cd $(PWD)/packages/$(name) \
&& $(json) -I -f package.json -e "this.description=''" \
&& $(json) -I -f package.json -e "this.author='$(author)'"

.PHONY: rnpkg
rnpkg: name ?= example
rnpkg: export PWD := $(PWD)
rnpkg: $(mod)
cd packages && create-react-native-module \
--platforms ios,android \
--prefix Berty$(shell echo "$(name)" | caser --pascal $(name)) \
--package-identifier tech.berty.$(name) \
--license '(Apache-2.0 OR MIT)' \
--use-cocoapods \
--github-account berty \
--author-name 'Berty Technologies' \
--author-email oss@berty.tech \
$(name)
rm -f packages/$(name)/README.md
cd $(PWD)/packages \
&& create-react-native-module \
--platforms ios,android \
--prefix Berty$(shell echo "$(name)" | caser --pascal $(name)) \
--package-identifier tech.berty.$(name) \
--license '$(license)' \
--use-cocoapods \
--github-account berty \
$(name)
cd $(PWD)/packages/react-native-$(name) \
&& rm -rf README.md \
&& $(json) -I -f package.json -e "this.name='@berty-tech/$(name)'" \
&& $(json) -I -f package.json -e "this.description=''"
&& $(json) -I -f package.json -e "this.author='$(author)'" \
&& $(json) -I -f package.json -e "this.licenseFilename=undefined" \

.PHONY: lint
lint: export PWD := $(PWD)
Expand All @@ -118,3 +129,9 @@ lint.fix: lint
.PHONY: lint.watch
lint.watch: options += --watch
lint.watch: lint

include packages/berty-app/Makefile
include packages/storybook-mobile/Makefile
include packages/storybook-web/Makefile
include packages/react-native-core/Makefile

5 changes: 5 additions & 0 deletions js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions js/package.json
Expand Up @@ -11,11 +11,10 @@
"type": "git",
"url": "git+ssh://git@github.com/berty/berty.git"
},
"author": {
"username": "berty",
"name": "Berty Technologies",
"email": "oss@berty.tech"
},
"author": "Berty Technologies <oss@berty.tech>",
"contributors": [
"Godefroy Ponsinet <godefroy.ponsinet@outlook.com>"
],
"license": "(Apache-2.0 OR MIT)",
"bugs": {
"url": "https://github.com/berty/berty/issues"
Expand All @@ -25,6 +24,7 @@
"caser": "^0.1.1",
"create-react-native-module": "^0.10.2",
"eslint-plugin-jest": "^22.17.0",
"json": "^9.0.6",
"lerna": "^3.16.4",
"lerna-update-wizard": "^0.16.0",
"react-native-create-library": "^3.1.2",
Expand Down
1 change: 0 additions & 1 deletion js/packages/react-native-core/package.json
Expand Up @@ -20,7 +20,6 @@
"email": "staff@berty-tech.tech"
},
"license": "(Apache-2.0 OR MIT)",
"licenseFilename": "LICENSE",
"readmeFilename": "README.md",
"peerDependencies": {
"react": "^16.8.1",
Expand Down
1 change: 0 additions & 1 deletion js/packages/react-native-example/package.json
Expand Up @@ -20,7 +20,6 @@
"email": "staff@berty-tech.tech"
},
"license": "(Apache-2.0 OR MIT)",
"licenseFilename": "LICENSE",
"readmeFilename": "README.md",
"peerDependencies": {
"react": "^16.8.1",
Expand Down

0 comments on commit 40181c5

Please sign in to comment.