-
Notifications
You must be signed in to change notification settings - Fork 31
/
Makefile
37 lines (28 loc) · 928 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# This Makefile facilitates fake package installation for testing
# purposes.
PKG_PATH:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
define USAGE
make <option> project_root=<folder>
options:
install # build and fake install to a javascript project
endef
export USAGE
project_root ?= ./examples
default:
@echo "$$USAGE"
build:
@yarn build
install: build
@rsync -zrv ${PKG_PATH}/ ${project_root}/node_modules/react-native-segmented-picker \
--include 'README.md' \
--include 'docs/***' \
--include 'LICENSE' \
--include 'package.json' \
--include 'yarn.lock' \
--include 'dist/***' \
--include 'ios/***' \
--include 'react-native.config.js' \
--include 'RNSegmentedPicker.podspec' \
--exclude '*'
@cd ${project_root}/node_modules/react-native-segmented-picker && yarn install --production
@echo "\n\nDone. Package successfully installed to '${project_root}/node_modules'."