Skip to content
No description, website, or topics provided.
TypeScript Vue JavaScript Other
Branch: master
Clone or download
zegonz and davinov Refactoring :: move scss files into vue files (#440)
* move style and deletion "deleteConfirmationModal.scss"

* move resizable panels style to .vue file

* move dataviewer scss into vue file

* move pipeline styles to pipeline vue file

* move step scss file into vue file

* remove useless main.scss

* move widget-list__container decalration into its own vue file

* move google font import into playground

* move some global style from variables.scss to querybuilder and dataviewer SFC

* move global box-sizing to playground

* fix linter

* Apply suggestions from code review

* move box-sizing declaration to all element from playground to weaverbird css

Co-authored-by: David Nowinsky <david@nowinsky.net>
Latest commit 1f11873 Feb 24, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Doc :: Github pages documentation Oct 19, 2019
.github/ISSUE_TEMPLATE Add issue template for step UI Apr 26, 2019
.storybook Fix trash icon not displaying on ConditionEditor Feb 15, 2020
docs Use new logo in: Feb 20, 2020
playground Refactoring :: move scss files into vue files (#440) Feb 24, 2020
public Use new logo in: Feb 20, 2020
src Refactoring :: move scss files into vue files (#440) Feb 24, 2020
stories Rework integration of links Feb 15, 2020
tests/unit Lint imports Feb 19, 2020
.editorconfig add editor config Feb 13, 2019
.eslintignore [config] extract eslint in its own files Jan 27, 2020
.eslintrc.js [eslint] fix multline UnionTypes handling Feb 6, 2020
.gitignore [git] remove editor/OS-specific paths Dec 4, 2019
.prettierrc.js [eslint] better configuration and use typescript-eslint May 17, 2019
CHANGELOG.md v0.11.0 Feb 12, 2020
LICENSE [pkg] add LICENSE and basic package metadata Sep 16, 2019
README.md Use new logo in: Feb 20, 2020
babel.config.js [tests] welcome back jest Jul 26, 2019
codecov.yml Tech :: Add Coverage (#94) Apr 18, 2019
jest.config.js [jest] include .d.ts in valid extensions Dec 31, 2019
package.json [pkg] remove rollup-plugin-istanbul Feb 19, 2020
rollup.config.js Weaverbird has spoken, let it leave the nest Oct 20, 2019
tsconfig.json [tsconfig] explicitly list included types modules Sep 20, 2019
yarn.lock Bump codecov from 3.6.1 to 3.6.5 Feb 19, 2020

README.md

Codecov Coverage CircleCI

weaverbird

GitHub Logo

General documentation

The project's technical and user documentation is hosted on https://weaverbird.toucantoco.com The documentation's source files can be found in the docs directory.

Project setup

yarn install

Requirement: node > v11

Compiles target library

yarn build-bundle

This will generate an importable JS VisualQueryBuilder library in the dist directory.

Important note: While we do our best to embrace semantic versioning, we do not guarantee full backward compatibility until version 1.0.0 is realeased.

Run your tests

The basic command to run all tests is:

yarn test:unit

You can also use a watcher so that tests rerun automatically on a change:

yarn test:unit --watchAll

To run a single test file:

yarn test:unit path/to/yourfile.ts

Finally, you can deactivate typescript checks to run tests quicker:

yarn test:quick

This can be useful to accelerate your development cycle temporarily when developing a new feature or fixing a bug. Under the hood, this will use the babel-jest transformer on typescript files instead of ts-jest.

Lints and fixes files

yarn lint

Build the documentation

yarn build-doc

This will run typedoc on the src/ directory and generate the corresponding documentation in the dist/docs directory.

Build and Run documentation (local environnement)

The web documentation is powered by Jekyll.

You can find all the sources into the doc-build folder.

To build and locally launch the documentation you need Ruby and gem before starting, then:

# install bundler
gem install bundler

# run jekyll and a local server with dependencies :
bundle exec jekyll serve

how to add doc to jekyll documentation

put your .md file into the docs folder. You can add a folder as well to better organization

into your .md file don't forget to declare this at the beginning of the file :

---
title: your title doc name
permalink: /docs/your-page-doc-name/
---

to finish to get your page into the doc navigation you have to add it in `_data/docs.yml``

example :

- title: Technical documentation
  docs:
  - steps
  - stepforms
  - your-page-doc-name

Run the storybook

Storybook uses the bundled lib, so all showcased components must be in the public API.

In one terminal:

yarn storybook:bundle --watch

In another:

yarn storybook

This will run storybook, displaying the stories (use cases) of UI components.

Stories are defined in the stories/ directory.

Customize configuration

See Configuration Reference.

Usage as library

Without any module bundler

<!-- Import styles -->
<link rel="stylesheet" href="weaverbird/dist/weaverbird.umd.min.js" />

<!-- Import scripts -->
<script src="vue.js"></script>
<script src="weaverbird/dist/weaverbird.umd.min.js"></script>

With an ES module bundler (typically webpack or rollup)

import { Pipeline } from 'weaverbird';

By default, the CommonJS module is imported. If you prefer the ES module version, import dist/weaverbird.esm.js.

Styles

If your module bundler can also import CSS (e.g. via styles-loader):

import 'weaverbird/dist/weaverbird.css';

If you prefer to use Sass, you may import directly the scss:

@import '~weaverbird/src/styles/main';

This example makes use of the ~ syntax from webpack's sass-loader to resolve the imported modules.

API

Modules

See the documentation generated in dist/docs directory

Styles

TODO: document here sass variables that can be overriden

Playground

The /playground directory hosts a demo application with a small server that showcases how to integrate the exported components and API. To run it, just run:

yarn playground

which is basically a shortcut for the following steps:

# build the visual query builder bundle
yarn build-bundle --watch
# run the server and enjoy!
node playground/server.js

Once the server is started, you should be able to open the http://localhost:3000 in your favorite browser and enjoy!

The server.js script reads the playground/playground.config.json config file to know which database should be queried or which http port should be used. If you want to customize these values, either edit this json file or override each available option on the commandline, e.g.

node playground/server.js --dburi mongodb://localhost:27018

You can also customize options through environment variables with the following naming pattern VQB_PLAYGROUND_{OPTION}, e.g.

VQB_PLAYGROUND_DBURI=mongodb://localhost:27018 node playground/server.js

You can use the default test dataset by loading the playground/default-dataset.csv file. To do that, use the following command line:

node playground/server.js --reset

If you want to use a custom CSV file, use the defaultDataset command line option:

node playground/server.js --defaultDataset my-dataset.csv --reset

If you don't have mongodb installed, you can use the --automongo flag from the command line. It will use mongodb-prebuilt to download (the first time) and run mongo 4.0.13 and then listen on the port guessed from the --dburi flag.

mongodb-prebuilt uses mongodb-download internally to download mongodb binaries. Unfortunately, the URLs on https://fastdl.mongodb.org used for these binaries have changed and mongodb-download doesn't seem up-to-date, cf. https://github.com/mongodb-js/mongodb-download/issues/36 and https://github.com/mongodb-js/mongodb-prebuilt/issues/59 To bypass this issue, you can manually specify the download URL by setting the MONGODB_DL_URI environment variable. For instance, you can use the following command line: MONGODB_DL_URI=https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-debian92-4.0.13.tgz node playground/server.js --automongo or MONGODB_DL_URI=https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-4.0.13.tgz node playground/server.js --automongo

You can’t perform that action at this time.