Skip to content

Commit 7197c45

Browse files
committed
Reuse types from lib instead of copying to build
1 parent e4c5f09 commit 7197c45

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
lib/
21
test/
32
examples/
43
dist/

Makefile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ MIN_MAP = $(DIST)/react-grid-layout.min.js.map
1212
.PHONY: test dev lint build clean install link
1313

1414

15-
build: clean build-js copy-flow $(MIN)
15+
build: clean build-js $(MIN)
1616

1717
clean:
1818
rm -rf $(BUILD) $(DIST)
@@ -39,17 +39,6 @@ build-example:
3939
view-example: build-example
4040
@$(BIN)/opener examples/0-showcase.html
4141

42-
# Copy original source as `.js.flow` for use with flow
43-
copy-flow:
44-
# Create tmpdir & copy
45-
$(eval TMP := $(shell mktemp -d))
46-
cp -R $(LIB)/ $(TMP)
47-
# Rename extensions
48-
find $(TMP) -type f -name '*.js*' -exec sh -c 'mv -f "$$0" "$${0%.*}.js.flow"' {} \;
49-
# Copy into build
50-
cp -R $(TMP)/ $(BUILD)
51-
# Remove tmpdir
52-
rm -rf $(TMP)
5342

5443
# FIXME flow is usually global
5544
lint:

index.js.flow

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// @flow
22

3-
import * as utils from './build/utils';
4-
export { default } from './build/ReactGridLayout';
5-
export { default as Responsive } from './build/ResponsiveReactGridLayout';
6-
export { default as WidthProvider } from './build/components/WidthProvider';
3+
import * as utils from './lib/utils';
4+
export { default } from './lib/ReactGridLayout';
5+
export { default as Responsive } from './lib/ResponsiveReactGridLayout';
6+
export { default as WidthProvider } from './lib/components/WidthProvider';
77

88
export {
99
utils

0 commit comments

Comments
 (0)