diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 637430b..e25efb5 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 -- ./test/department_employees.quicksql +``` + ## Pull request process 1. Ensure there is an issue created to track and discuss the fix or enhancement diff --git a/README.md b/README.md index 9d3c33f..b6a117f 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,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) @@ -36,39 +33,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) @@ -83,12 +51,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 ); }; @@ -97,12 +65,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 ); }; @@ -112,8 +80,8 @@ try { ```html