Skip to content

Commit dd54a03

Browse files
committed
Initial commit
0 parents  commit dd54a03

File tree

15 files changed

+3476
-0
lines changed

15 files changed

+3476
-0
lines changed

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
permissions:
10+
actions: read
11+
contents: read
12+
13+
jobs:
14+
main:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
filter: tree:0
20+
fetch-depth: 0
21+
22+
- uses: pnpm/action-setup@v4
23+
name: Install pnpm
24+
with:
25+
version: 9.8.0
26+
run_install: false
27+
28+
# This enables task distribution via Nx Cloud
29+
# Run this command as early as possible, before dependencies are installed
30+
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
31+
# Uncomment this line to enable task distribution
32+
# - run: pnpm dlx nx start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build"
33+
34+
# Cache node_modules
35+
- uses: actions/setup-node@v4
36+
with:
37+
node-version: 20
38+
cache: 'pnpm'
39+
40+
- run: pnpm install --frozen-lockfile
41+
42+
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
43+
# - run: pnpm exec nx-cloud record -- echo Hello World
44+
- run: pnpm exec nx run-many -t lint test build
45+
# Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci
46+
- run: pnpm exec nx fix-ci
47+
if: always()

.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# See https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
2+
3+
# compiled output
4+
dist
5+
tmp
6+
out-tsc
7+
8+
# dependencies
9+
node_modules
10+
11+
# IDEs and editors
12+
/.idea
13+
.project
14+
.classpath
15+
.c9/
16+
*.launch
17+
.settings/
18+
*.sublime-workspace
19+
20+
# IDE - VSCode
21+
.vscode/*
22+
!.vscode/settings.json
23+
!.vscode/tasks.json
24+
!.vscode/launch.json
25+
!.vscode/extensions.json
26+
27+
# misc
28+
/.sass-cache
29+
/connect.lock
30+
/coverage
31+
/libpeerconnection.log
32+
npm-debug.log
33+
yarn-error.log
34+
testem.log
35+
/typings
36+
37+
# System Files
38+
.DS_Store
39+
Thumbs.db
40+
41+
.nx/cache
42+
.nx/workspace-data
43+
.cursor/rules/nx-rules.mdc
44+
.github/instructions/nx.instructions.md

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
strict-peer-dependencies=false
2+
auto-install-peers=true

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Add files here to ignore them from prettier formatting
2+
/dist
3+
/coverage
4+
/.nx/cache
5+
/.nx/workspace-data

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["nrwl.angular-console", "esbenp.prettier-vscode"]
3+
}

README.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# c2pa-js-v2
2+
3+
<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a>
4+
5+
✨ Your new, shiny [Nx workspace](https://nx.dev) is almost ready ✨.
6+
7+
[Learn more about this workspace setup and its capabilities](https://nx.dev/nx-api/js?utm_source=nx_project&amp;utm_medium=readme&amp;utm_campaign=nx_projects) or run `npx nx graph` to visually explore what was created. Now, let's get you up to speed!
8+
9+
## Finish your CI setup
10+
11+
[Click here to finish setting up your workspace!](https://cloud.nx.app/connect/bVlw6mlCBn)
12+
13+
14+
## Generate a library
15+
16+
```sh
17+
npx nx g @nx/js:lib packages/pkg1 --publishable --importPath=@my-org/pkg1
18+
```
19+
20+
## Run tasks
21+
22+
To build the library use:
23+
24+
```sh
25+
npx nx build pkg1
26+
```
27+
28+
To run any task with Nx use:
29+
30+
```sh
31+
npx nx <target> <project-name>
32+
```
33+
34+
These targets are either [inferred automatically](https://nx.dev/concepts/inferred-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) or defined in the `project.json` or `package.json` files.
35+
36+
[More about running tasks in the docs &raquo;](https://nx.dev/features/run-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
37+
38+
## Versioning and releasing
39+
40+
To version and release the library use
41+
42+
```
43+
npx nx release
44+
```
45+
46+
Pass `--dry-run` to see what would happen without actually releasing the library.
47+
48+
[Learn more about Nx release &raquo;](https://nx.dev/features/manage-releases?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
49+
50+
## Keep TypeScript project references up to date
51+
52+
Nx automatically updates TypeScript [project references](https://www.typescriptlang.org/docs/handbook/project-references.html) in `tsconfig.json` files to ensure they remain accurate based on your project dependencies (`import` or `require` statements). This sync is automatically done when running tasks such as `build` or `typecheck`, which require updated references to function correctly.
53+
54+
To manually trigger the process to sync the project graph dependencies information to the TypeScript project references, run the following command:
55+
56+
```sh
57+
npx nx sync
58+
```
59+
60+
You can enforce that the TypeScript project references are always in the correct state when running in CI by adding a step to your CI job configuration that runs the following command:
61+
62+
```sh
63+
npx nx sync:check
64+
```
65+
66+
[Learn more about nx sync](https://nx.dev/reference/nx-commands#sync)
67+
68+
69+
[Learn more about Nx on CI](https://nx.dev/ci/intro/ci-with-nx#ready-get-started-with-your-provider?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
70+
71+
## Install Nx Console
72+
73+
Nx Console is an editor extension that enriches your developer experience. It lets you run tasks, generate code, and improves code autocompletion in your IDE. It is available for VSCode and IntelliJ.
74+
75+
[Install Nx Console &raquo;](https://nx.dev/getting-started/editor-setup?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
76+
77+
## Useful links
78+
79+
Learn more:
80+
81+
- [Learn more about this workspace setup](https://nx.dev/nx-api/js?utm_source=nx_project&amp;utm_medium=readme&amp;utm_campaign=nx_projects)
82+
- [Learn about Nx on CI](https://nx.dev/ci/intro/ci-with-nx?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
83+
- [Releasing Packages with Nx release](https://nx.dev/features/manage-releases?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
84+
- [What are Nx plugins?](https://nx.dev/concepts/nx-plugins?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
85+
86+
And join the Nx community:
87+
- [Discord](https://go.nx.dev/community)
88+
- [Follow us on X](https://twitter.com/nxdevtools) or [LinkedIn](https://www.linkedin.com/company/nrwl)
89+
- [Our Youtube channel](https://www.youtube.com/@nxdevtools)
90+
- [Our blog](https://nx.dev/blog?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)

error.log

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
fatal: not a git repository (or any of the parent directories): .git

nx.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"$schema": "./node_modules/nx/schemas/nx-schema.json",
3+
"namedInputs": {
4+
"default": ["{projectRoot}/**/*", "sharedGlobals"],
5+
"production": ["default"],
6+
"sharedGlobals": ["{workspaceRoot}/.github/workflows/ci.yml"]
7+
},
8+
"nxCloudId": "6881413b0e4a9139ff67b78b",
9+
"plugins": [
10+
{
11+
"plugin": "@nx/js/typescript",
12+
"options": {
13+
"typecheck": {
14+
"targetName": "typecheck"
15+
},
16+
"build": {
17+
"targetName": "build",
18+
"configName": "tsconfig.lib.json",
19+
"buildDepsName": "build-deps",
20+
"watchDepsName": "watch-deps"
21+
}
22+
}
23+
}
24+
]
25+
}

package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "@c2pa-js-v2/source",
3+
"version": "0.0.0",
4+
"license": "MIT",
5+
"scripts": {},
6+
"private": true,
7+
"dependencies": {},
8+
"devDependencies": {
9+
"@nx/js": "21.3.5",
10+
"@swc-node/register": "~1.9.1",
11+
"@swc/core": "~1.5.7",
12+
"@swc/helpers": "~0.5.11",
13+
"nx": "21.3.5",
14+
"prettier": "^2.6.2",
15+
"tslib": "^2.3.0",
16+
"typescript": "~5.8.2"
17+
}
18+
}

0 commit comments

Comments
 (0)