Skip to content

Commit d1ba2f3

Browse files
committed
Add Makefiles
1 parent 2c3458b commit d1ba2f3

File tree

20 files changed

+2160
-0
lines changed

20 files changed

+2160
-0
lines changed

dist/datasets-cmudict/Makefile

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
#/
2+
# @license Apache-2.0
3+
#
4+
# Copyright (c) 2020 The Stdlib Authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#/
18+
19+
# VARIABLES #
20+
21+
ifndef VERBOSE
22+
QUIET := @
23+
else
24+
QUIET :=
25+
endif
26+
27+
# Define the command for `node`:
28+
node := $(NODE)
29+
ifdef NODE
30+
node := $(NODE)
31+
else
32+
node := node
33+
endif
34+
35+
# Define the `NODE_PATH` environment variable:
36+
ifdef NODE_PATH
37+
node_path := $(NODE_PATH)
38+
else
39+
node_path :=
40+
endif
41+
42+
# List of bundle targets:
43+
bundle_targets := ./build/bundle.min.js
44+
45+
46+
# RULES #
47+
48+
#/
49+
# Generates bundles.
50+
#
51+
# @example
52+
# make
53+
#
54+
# @example
55+
# make all
56+
#/
57+
all: $(bundle_targets) test examples
58+
59+
.PHONY: all
60+
61+
#/
62+
# Generates bundles.
63+
#
64+
# @private
65+
#/
66+
$(bundle_targets):
67+
$(QUIET) NODE_PATH="$(node_path)" $(node) ./scripts/build.js
68+
69+
#/
70+
# Runs examples.
71+
#
72+
# @example
73+
# make examples
74+
#/
75+
examples: $(bundle_targets)
76+
$(QUIET) echo 'Running examples...'
77+
$(QUIET) for file in ./examples/*.js; do \
78+
echo "Running file: $$file"; \
79+
NODE_PATH="$(node_path)" $(node) $$file || exit 1; \
80+
done
81+
82+
.PHONY: examples
83+
84+
#/
85+
# Tests generated bundles.
86+
#
87+
# @example
88+
# make test
89+
#/
90+
test: $(bundle_targets)
91+
$(QUIET) echo 'Running tests...'
92+
$(QUIET) for file in ./test/test*.js; do \
93+
echo "Running file: $$file"; \
94+
NODE_PATH="$(node_path)" $(node) $$file || exit 1; \
95+
done
96+
97+
.PHONY: test
98+
99+
#/
100+
# Removes generated files.
101+
#
102+
# @example
103+
# make clean
104+
#/
105+
clean:
106+
$(QUIET) -rm -rf ./build
107+
108+
.PHONY: clean

dist/datasets-emoji/Makefile

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
#/
2+
# @license Apache-2.0
3+
#
4+
# Copyright (c) 2020 The Stdlib Authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#/
18+
19+
# VARIABLES #
20+
21+
ifndef VERBOSE
22+
QUIET := @
23+
else
24+
QUIET :=
25+
endif
26+
27+
# Define the command for `node`:
28+
node := $(NODE)
29+
ifdef NODE
30+
node := $(NODE)
31+
else
32+
node := node
33+
endif
34+
35+
# Define the `NODE_PATH` environment variable:
36+
ifdef NODE_PATH
37+
node_path := $(NODE_PATH)
38+
else
39+
node_path :=
40+
endif
41+
42+
# List of bundle targets:
43+
bundle_targets := ./build/bundle.min.js
44+
45+
46+
# RULES #
47+
48+
#/
49+
# Generates bundles.
50+
#
51+
# @example
52+
# make
53+
#
54+
# @example
55+
# make all
56+
#/
57+
all: $(bundle_targets) test examples
58+
59+
.PHONY: all
60+
61+
#/
62+
# Generates bundles.
63+
#
64+
# @private
65+
#/
66+
$(bundle_targets):
67+
$(QUIET) NODE_PATH="$(node_path)" $(node) ./scripts/build.js
68+
69+
#/
70+
# Runs examples.
71+
#
72+
# @example
73+
# make examples
74+
#/
75+
examples: $(bundle_targets)
76+
$(QUIET) echo 'Running examples...'
77+
$(QUIET) for file in ./examples/*.js; do \
78+
echo "Running file: $$file"; \
79+
NODE_PATH="$(node_path)" $(node) $$file || exit 1; \
80+
done
81+
82+
.PHONY: examples
83+
84+
#/
85+
# Tests generated bundles.
86+
#
87+
# @example
88+
# make test
89+
#/
90+
test: $(bundle_targets)
91+
$(QUIET) echo 'Running tests...'
92+
$(QUIET) for file in ./test/test*.js; do \
93+
echo "Running file: $$file"; \
94+
NODE_PATH="$(node_path)" $(node) $$file || exit 1; \
95+
done
96+
97+
.PHONY: test
98+
99+
#/
100+
# Removes generated files.
101+
#
102+
# @example
103+
# make clean
104+
#/
105+
clean:
106+
$(QUIET) -rm -rf ./build
107+
108+
.PHONY: clean
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
#/
2+
# @license Apache-2.0
3+
#
4+
# Copyright (c) 2020 The Stdlib Authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#/
18+
19+
# VARIABLES #
20+
21+
ifndef VERBOSE
22+
QUIET := @
23+
else
24+
QUIET :=
25+
endif
26+
27+
# Define the command for `node`:
28+
node := $(NODE)
29+
ifdef NODE
30+
node := $(NODE)
31+
else
32+
node := node
33+
endif
34+
35+
# Define the `NODE_PATH` environment variable:
36+
ifdef NODE_PATH
37+
node_path := $(NODE_PATH)
38+
else
39+
node_path :=
40+
endif
41+
42+
# List of bundle targets:
43+
bundle_targets := ./build/bundle.min.js
44+
45+
46+
# RULES #
47+
48+
#/
49+
# Generates bundles.
50+
#
51+
# @example
52+
# make
53+
#
54+
# @example
55+
# make all
56+
#/
57+
all: $(bundle_targets) test examples
58+
59+
.PHONY: all
60+
61+
#/
62+
# Generates bundles.
63+
#
64+
# @private
65+
#/
66+
$(bundle_targets):
67+
$(QUIET) NODE_PATH="$(node_path)" $(node) ./scripts/build.js
68+
69+
#/
70+
# Runs examples.
71+
#
72+
# @example
73+
# make examples
74+
#/
75+
examples: $(bundle_targets)
76+
$(QUIET) echo 'Running examples...'
77+
$(QUIET) for file in ./examples/*.js; do \
78+
echo "Running file: $$file"; \
79+
NODE_PATH="$(node_path)" $(node) $$file || exit 1; \
80+
done
81+
82+
.PHONY: examples
83+
84+
#/
85+
# Tests generated bundles.
86+
#
87+
# @example
88+
# make test
89+
#/
90+
test: $(bundle_targets)
91+
$(QUIET) echo 'Running tests...'
92+
$(QUIET) for file in ./test/test*.js; do \
93+
echo "Running file: $$file"; \
94+
NODE_PATH="$(node_path)" $(node) $$file || exit 1; \
95+
done
96+
97+
.PHONY: test
98+
99+
#/
100+
# Removes generated files.
101+
#
102+
# @example
103+
# make clean
104+
#/
105+
clean:
106+
$(QUIET) -rm -rf ./build
107+
108+
.PHONY: clean

0 commit comments

Comments
 (0)