From a530dd2c21dd4199fe543fea3f5f737b5315c469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20S=C3=A1nchez=20Villaf=C3=A1n?= Date: Tue, 31 Oct 2023 09:10:52 -0600 Subject: [PATCH 1/4] doc: add contribution instructions --- CONTRIBUTING.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 637430b..2e80ae4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,6 +31,41 @@ git commit --signoff Only pull requests from committers that can be verified as having signed the OCA can be accepted. +## Getting Started + +1. Open a terminal window +2. Clone the repository +3. Change into the cloned repository directory +4. Install dependencies by running + + ```bash + npm install + ``` + +## Building Locally + +Once you have set up the project, you can build the library by executing: + +```bash +npm run build +``` + +## Running Tests + +Once you have set up the project, you can run the test suite by executing: + +```bash +npm run test +``` + +## Running the Example CLI + +Once you have built the library, you can run the example CLI by executing: + +```bash +npm run example-cli +``` + ## Pull request process 1. Ensure there is an issue created to track and discuss the fix or enhancement From 7f216f2561324b17ea27d2be50bdc5f58ec26d6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20S=C3=A1nchez=20Villaf=C3=A1n?= Date: Tue, 31 Oct 2023 09:12:40 -0600 Subject: [PATCH 2/4] doc: update README --- README.md | 50 +++++++++----------------------------------------- 1 file changed, 9 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 8411c6e..6388b93 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,7 @@ ## Table of Contents - [Overview](#overview) -- [Installation](#installation) -- [Building Locally](#building-locally) -- [Running Tests](#running-tests) -- [Running the Example CLI](#running-the-example-cli) +- [Install](#install) - [Translating Quick SQL into Oracle SQL Data Definition Language (DDL)](#translating-quick-sql-into-oracle-sql-data-definition-language-ddl) - [DDL NodeJS ECMA Script Module (ESM) Example](#ddl-nodejs-ecma-script-module-esm-example) - [DDL NodeJS Common JS (CJS) Example](#ddl-nodejs-common-js-cjs-example) @@ -34,39 +31,10 @@ module that can be used as seen in the example below: ![Quick ERD](./assets/quick-erd-dark.png) -## Installation - -1. Open a terminal window -2. Clone the repository -3. Change into the cloned repository directory -4. Install dependencies by running - - ```bash - npm install - ``` - -## Building Locally - -Once you have set up the project, you can build the library by executing: +## Install ```bash -npm run build -``` - -## Running Tests - -Once you have set up the project, you can run the test suite by executing: - -```bash -npm run test -``` - -## Running the Example CLI - -Once you have built the library, you can run the example CLI by executing: - -```bash -npm run example-cli -- ./test/department_employees.quicksql +npm install @oracle/quicksql ``` ## Translating Quick SQL into Oracle SQL Data Definition Language (DDL) @@ -81,12 +49,12 @@ See below for examples of how to use this library. ### DDL NodeJS ECMA Script Module (ESM) Example ```js -import quickSQL from "./dist/quick-sql.js"; +import { toDDL } from "@oracle/quicksql"; import fs from "fs"; try { const text = fs.readFileSync( './test/department_employees.quicksql' ); - console.log( quickSQL.toDDL( text.toString() ) ); + console.log( toDDL( text.toString() ) ); } catch( e ) { console.error( e ); }; @@ -95,12 +63,12 @@ try { ### DDL NodeJS Common JS (CJS) Example ```js -const quickSQL = require( "./dist/quick-sql.umd.cjs" ); +const { toDDL } = require( "@oracle/quicksql" ); const fs = require( "fs" ); try { const text = fs.readFileSync( './test/department_employees.quicksql' ); - console.log( quickSQL.toDDL( text.toString() ) ); + console.log( toDDL( text.toString() ) ); } catch( e ) { console.error( e ); }; @@ -110,8 +78,8 @@ try { ```html