1 Star 0 Fork 1

小蚂蚁/dagre

forked from mirrors_brickmaker/dagre 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile 2.23 KB
一键复制 编辑 原始数据 按行查看 历史
半清 提交于 2021-06-16 15:39 . feat: 🎸 longestPath add layer config
MOD = dagre
NPM = npm
BROWSERIFY = ./node_modules/browserify/bin/cmd.js
JSHINT = ./node_modules/jshint/bin/jshint
ESLINT = ./node_modules/eslint/bin/eslint.js
KARMA = ./node_modules/karma/bin/karma
MOCHA = ./node_modules/mocha/bin/_mocha
UGLIFY = ./node_modules/uglify-js/bin/uglifyjs
JSHINT_OPTS = --reporter node_modules/jshint-stylish/index.js
MOCHA_OPTS = -R dot
BUILD_DIR = build
COVERAGE_DIR = $(BUILD_DIR)/cov
DIST_DIR = dist
SRC_FILES = index.js lib/version.js $(shell find lib -type f -name '*.js')
TEST_FILES = $(shell find test -type f -name '*.js' | grep -v 'bundle-test.js')
BUILD_FILES = $(addprefix $(BUILD_DIR)/, \
$(MOD).js $(MOD).min.js \
$(MOD).core.js $(MOD).core.min.js)
DIRS = $(BUILD_DIR)
.PHONY: all bench clean browser-test unit-test test dist
all: unit-test lint
bench: test
@src/bench.js
lib/version.js: package.json
@src/release/make-version.js > $@
$(DIRS):
@mkdir -p $@
test: unit-test browser-test
unit-test: $(SRC_FILES) $(TEST_FILES) node_modules | $(BUILD_DIR)
@$(MOCHA) --dir $(COVERAGE_DIR) -- $(MOCHA_OPTS) $(TEST_FILES) || $(MOCHA) $(MOCHA_OPTS) $(TEST_FILES)
browser-test: $(BUILD_DIR)/$(MOD).js $(BUILD_DIR)/$(MOD).core.js
$(KARMA) start --single-run $(KARMA_OPTS)
$(KARMA) start karma.core.conf.js --single-run $(KARMA_OPTS)
bower.json: package.json src/release/make-bower.json.js
@src/release/make-bower.json.js > $@
lint:
@$(JSHINT) $(JSHINT_OPTS) $(filter-out node_modules, $?)
@$(ESLINT) $(SRC_FILES) $(TEST_FILES)
# $(BUILD_DIR)/$(MOD).js: index.js $(SRC_FILES) | unit-test
$(BUILD_DIR)/$(MOD).js: index.js $(SRC_FILES)
@$(BROWSERIFY) $< > $@ -s dagre
$(BUILD_DIR)/$(MOD).min.js: $(BUILD_DIR)/$(MOD).js
@$(UGLIFY) $< --comments '@license' > $@
# $(BUILD_DIR)/$(MOD).core.js: index.js $(SRC_FILES) | unit-test
$(BUILD_DIR)/$(MOD).core.js: index.js $(SRC_FILES)
@$(BROWSERIFY) $< > $@ --no-bundle-external -s dagre
$(BUILD_DIR)/$(MOD).core.min.js: $(BUILD_DIR)/$(MOD).core.js
@$(UGLIFY) $< --comments '@license' > $@
# dist: $(BUILD_FILES) | bower.json test
dist: $(BUILD_FILES)
@rm -rf $@
@mkdir -p $@
@cp $^ dist
release: dist
@echo
@echo Starting release...
@echo
@src/release/release.sh $(MOD) dist
clean:
rm -rf $(BUILD_DIR)
node_modules: package.json
@$(NPM) install
@touch $@
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/rencp_home/dagre.git
git@gitee.com:rencp_home/dagre.git
rencp_home
dagre
dagre
master

搜索帮助