Skip to content

Commit

Permalink
Change name to be consistant with project repo name "ldworkbench" -> …
Browse files Browse the repository at this point in the history
…"ld-workbench"
  • Loading branch information
mightymax committed Dec 4, 2023
1 parent 3159e0e commit 215de97
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 13 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish package to GitHub Packages
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://npm.pkg.github.com'
# Defaults to the user or organization that owns the workflow file
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,13 @@ Both commands should print the version to your terminal. For Node.js we recommen
The quickest way to get started with LDWorkbench is to follow these instruction:

```bash
mkdir ldworkbench
cd ldworkbench
npm i git+https://github.com/netwerk-digitaal-erfgoed/ld-workbench.git
npx ldworkbench --init
npx ld-workbench --init
```

Your workbench is now ready for use. An example workbench is provided, run it with this command:

```bash
npx ldworkbench
npx ld-workbench
```

### Configuring a workbench pipeline
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "ldworkbench",
"name": "ld-workbench",
"type": "module",
"bin": {
"ldworkbench": "dist/main.js"
"ld-workbench": "dist/main.js"
},
"version": "0.0.1",
"description": "LDWorkbench is a Linked Data Transformation tool designed to use only SPARQL as transformation language.",
Expand All @@ -12,8 +12,8 @@
"prepare": "husky install",
"build": "npx tsc",
"dev": "npx tsc --watch --preserveWatchOutput",
"ldworkbench": "node dist/main",
"ldworkbench:example": "node dist/main --configDir static",
"ld-workbench": "node dist/main",
"ld-workbench:example": "node dist/main --configDir static",
"util:lint": "ESLINT_STRICT=true ESLINT_EXPENSIVE=true eslint --ext .tsx --ext .ts ./src",
"util:json-schema-to-typescript": "npx json2ts -i ./static/ld-workbench.schema.json -o src/lib/LDWorkbenchConfiguration.d.ts"
},
Expand Down
2 changes: 1 addition & 1 deletion src/cliArgs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if (cliArgs.init !== undefined) {
}
try {
init()
console.log(chalk.green('A boilerplate LDWorkbech has been created. You can now run a project using `npx ldworkbench`.'))
console.log(chalk.green('A boilerplate LDWorkbech has been created. You can now run a project using `npx ld-workbench`.'))
} catch(e) {
error(e as Error)
}
Expand Down
4 changes: 2 additions & 2 deletions src/utils/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function init(): void {

const yamlSchemasSettings = {
"yaml.schemas": {
"node_modules/ldworkbench/static/ld-workbench.schema.json": [
"node_modules/ld-workbench/static/ld-workbench.schema.json": [
"pipelines/configurations/**/*.yml",
"static/example/*.yml",
],
Expand Down Expand Up @@ -52,7 +52,7 @@ export default function init(): void {
if (!Object.hasOwn(settings, 'yaml.schemas')) {
settings['yaml.schemas'] = yamlSchemasSettings['yaml.schemas']
} else {
settings['yaml.schemas']["node_modules/ldworkbench/static/ld-workbench.schema.json"] = yamlSchemasSettings['yaml.schemas']["node_modules/ldworkbench/static/ld-workbench.schema.json"]
settings['yaml.schemas']["node_modules/ld-workbench/static/ld-workbench.schema.json"] = yamlSchemasSettings['yaml.schemas']["node_modules/ld-workbench/static/ld-workbench.schema.json"]
}
fs.writeFileSync(settingsFile, JSON.stringify(yamlSchemasSettings, undefined, 2))
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/loadPipelines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function loadPipelines (configDirOrFile: string): Map<string, LDW
const pipelines = new Map<string, LDWorkbenchConfiguration>()

if (!fs.existsSync(configDirOrFile))
throw new Error(`Configuration directory/file ${chalk.italic(configDirOrFile)} could not be found.\nIf this is your first run of LDWorkbench, you might want to use \`npx ldworkbench --init\` to setup an example workbench project.`)
throw new Error(`Configuration directory/file ${chalk.italic(configDirOrFile)} could not be found.\nIf this is your first run of LDWorkbench, you might want to use \`npx ld-workbench --init\` to setup an example workbench project.`)

const files: string[] = []
if (fs.lstatSync(configDirOrFile).isDirectory()) {
Expand Down

0 comments on commit 215de97

Please sign in to comment.