From 3b5b14865a5612cdf6b2b4223dc6137e5b8e8d59 Mon Sep 17 00:00:00 2001 From: Egor Fedoseev <7858573+egor-progger@users.noreply.github.com> Date: Fri, 22 Mar 2024 23:03:43 +0300 Subject: [PATCH] documentation: add quick start, add publish command to package.json (#18) Co-authored-by: Egor Fedoseev <7858573+anarendil@users.noreply.github.com> --- .npmignore | 1 + README.md | 33 +++++++++++++++++++++++++++++---- package.json | 5 +++-- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/.npmignore b/.npmignore index f6671bd..93e680d 100644 --- a/.npmignore +++ b/.npmignore @@ -2,6 +2,7 @@ .eslintrc.json .prettierignore .prettierrc +.github build LICENSE package* diff --git a/README.md b/README.md index 3d869f5..b250e9b 100644 --- a/README.md +++ b/README.md @@ -3,18 +3,43 @@ PointlineJS is an SVG based JS library for drawing tree diagrams. It relies on Treant-JS, Raphael for handling SVG and animations, JQuery. -For Docs, Examples, and everything else see: /_ TODO _/ +# Quick start -# Compile +1. clone repository with command: + +``` +$ git clone https://github.com/egor-progger/pointlinejs-quick-start +``` + +2. to run this example you need to install some dependencies: + +``` +$ cd pointlinejs-quick-start +$ npm install +``` + +3. start local web-server: + +``` +$ run npx webpack serve +``` + +4. open in browser address http://localhost:9001 + +For Docs, Examples, and everything else see: /_ TODO create gitbut io pages _/ + +# Development + +## How to compile sources `npx webpack --config webpack.config.js` -# Dev-server +## How to run dev-server for debugging 1. `npm run start` 2. open `http://localhost:9000/documentation/` in browser -# Build package for import from tarball locally +## How to build package for import from tarball locally 1. `npm run pack` 2. copy pointlinejs-[package version].tgz to your other project. diff --git a/package.json b/package.json index f1e72b8..dd4f854 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pointlinejs", - "version": "0.1.17", + "version": "0.1.18", "description": "JavaScipt library for visualization of tree diagrams", "directories": { "example": "examples" @@ -20,7 +20,8 @@ "pack": "npm run clean && npm run build && npm run copy-css-to-es && npm run copy-css-to-lib && npm pack", "copy-css-to-es": "copyfiles -u 5 src/pointlinejs/vendor/treant/styles/Treant.css dist/es/pointlinejs/vendor/treant/styles", "copy-css-to-lib": "copyfiles -u 5 src/pointlinejs/vendor/treant/styles/Treant.css dist/lib/pointlinejs/vendor/treant/styles", - "clean": "rimraf dist/" + "clean": "rimraf dist/", + "publish": "npm run clean && npm run build && npm run copy-css-to-es && npm run copy-css-to-lib && npm publish --access public" }, "keywords": [ "pointlinejs",