Skip to content

Commit

Permalink
Merge branch 'master' into order-options
Browse files Browse the repository at this point in the history
  • Loading branch information
rustedgrail committed Jul 3, 2023
2 parents 99e0d75 + 61f76b2 commit 26cc748
Show file tree
Hide file tree
Showing 68 changed files with 12,555 additions and 20,218 deletions.
11 changes: 8 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
"extends": "eslint:recommended",
"env": {
"browser": true,
"node": true,
"mocha": true
"es6": true,
"mocha": true,
"node": true
},
"parserOptions": {
"ecmaVersion": "latest"
},
"extends": "eslint:recommended",
"rules": {
"indent": [ "error", 2 ],
"linebreak-style": [ "error", "unix" ],
"no-prototype-builtins": 0,
"semi": [ "error", "always" ]
}
}
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build Status

on:
push:
pull_request:

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node-version: [18.x]

steps:
- uses: actions/checkout@v2
- uses: browser-actions/setup-firefox@latest

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: package-lock.json

- name: Install dependencies
run: |
npm install
sudo apt-get install graphviz xvfb
- name: Lint
run: |
make lint
- name: Test
run: |
KARMA_OPTS="--browsers Firefox" xvfb-run --auto-servernum make -e test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build/
node_modules/
tmp/
/.nyc_output
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

20 changes: 5 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
MOD = dagre

NPM = npm
NYC = nyc
BROWSERIFY = ./node_modules/browserify/bin/cmd.js
ISTANBUL = ./node_modules/istanbul/lib/cli.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

ISTANBUL_OPTS = --dir $(COVERAGE_DIR) --report html
JSHINT_OPTS = --reporter node_modules/jshint-stylish/index.js
MOCHA_OPTS = -R dot

BUILD_DIR = build
COVERAGE_DIR = $(BUILD_DIR)/cov
COVERAGE_DIR = ./.nyc_output
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)
BUILD_FILES = $(addprefix $(BUILD_DIR)/, $(MOD).js $(MOD).min.js)

DIRS = $(BUILD_DIR)

Expand All @@ -41,11 +38,10 @@ $(DIRS):
test: unit-test browser-test

unit-test: $(SRC_FILES) $(TEST_FILES) node_modules | $(BUILD_DIR)
@$(ISTANBUL) cover $(ISTANBUL_OPTS) $(MOCHA) --dir $(COVERAGE_DIR) -- $(MOCHA_OPTS) $(TEST_FILES) || $(MOCHA) $(MOCHA_OPTS) $(TEST_FILES)
@$(NYC) $(MOCHA) --dir $(COVERAGE_DIR) -- $(MOCHA_OPTS) $(TEST_FILES) || $(MOCHA) $(MOCHA_OPTS) $(TEST_FILES)

browser-test: $(BUILD_DIR)/$(MOD).js $(BUILD_DIR)/$(MOD).core.js
browser-test: $(BUILD_DIR)/$(MOD).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 > $@
Expand All @@ -60,12 +56,6 @@ $(BUILD_DIR)/$(MOD).js: index.js $(SRC_FILES) | unit-test
$(BUILD_DIR)/$(MOD).min.js: $(BUILD_DIR)/$(MOD).js
@$(UGLIFY) $< --comments '@license' > $@

$(BUILD_DIR)/$(MOD).core.js: index.js $(SRC_FILES) | unit-test
@$(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
@rm -rf $@
@mkdir -p $@
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# dagre - Graph layout for JavaScript

[![Build Status](https://secure.travis-ci.org/dagrejs/dagre.svg?branch=master)](http://travis-ci.org/dagrejs/dagre)
[![Build Status](https://github.com/dagrejs/dagre/workflows/Build%20Status/badge.svg?branch=master)](https://github.com/dagrejs/dagre/actions?query=workflow%3A%22Build+Status%22)
[![npm](https://img.shields.io/npm/v/dagre.svg)](https://www.npmjs.com/package/dagre)

Dagre is a JavaScript library that makes it easy to lay out directed graphs on
the client-side.

For more details, including examples and configuration options, please see our
[wiki](https://github.com/dagrejs/dagre/wiki).
Dagre is a JavaScript library that makes it easy to lay out directed graphs on the client-side.

For more details, including examples and configuration options, please see our [wiki](https://github.com/dagrejs/dagre/wiki).

There are 2 versions on NPM, but only [the one in the DagreJs org](https://www.npmjs.com/package/@dagrejs/dagre) is receiving updates right now.

## License

dagre is licensed under the terms of the MIT License. See the LICENSE file
for details.
dagre is licensed under the terms of the MIT License. See the LICENSE file for details.
5 changes: 2 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dagre",
"version": "0.8.4",
"version": "1.0.2",
"main": [
"dist/dagre.core.js"
],
Expand All @@ -20,7 +20,6 @@
"test/**"
],
"dependencies": {
"graphlib": "^2.1.7",
"lodash": "^4.17.4"
"@dagrejs/graphlib": "2.1.13"
}
}
Loading

0 comments on commit 26cc748

Please sign in to comment.