Skip to content

Commit 78d2f0f

Browse files
authored
Merge pull request #1 from primno/doc
Publish package to npm
2 parents ac05670 + 8c6fc1d commit 78d2f0f

52 files changed

Lines changed: 1032 additions & 2762 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
pull_request:
8+
branches: [ main ]
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: '18.x'
24+
25+
- name: Install dependencies and build
26+
run: |
27+
npm ci
28+
npm run build

.github/workflows/publish.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Publish Core
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
publish-npm:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-node@v3
13+
with:
14+
node-version: 18
15+
registry-url: https://registry.npmjs.org/
16+
- run: npm ci
17+
- run: npm run build
18+
- run: npm publish
19+
env:
20+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ node_modules/
2121
.pnp.*
2222

2323
# Primno CLI
24-
dist/tsc.js
24+
dist/tsc.mjs
2525
build/
2626
.nyc_output
2727
.cache

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# .npmrc
2+
engine-strict=true

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Primno
3+
Copyright (c) 2023 Xavier Monin
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
# Primno CLI
22

3-
Primno CLI is used to manage Primno project from the command line.
3+
[![npm](https://img.shields.io/npm/v/@primno/cli.svg)](https://www.npmjs.com/package/@primno/cli)
4+
[![npm](https://img.shields.io/npm/l/@primno/cli.svg)](https://github.com/primno/cli/blob/main/LICENSE)
5+
![build](https://img.shields.io/github/actions/workflow/status/primno/cli/build.yml)
6+
7+
Primno CLI is a command-line interface tool for initializing, building, and deploying Primno projects from a command shell.
8+
9+
> **Important**
10+
> primno is in beta stage and subject to change.
11+
12+
## Documentation
13+
14+
The documentation can be found on [https://primno.io](https://primno.io).
15+
16+
- [Getting Started](https://primno.io/docs/getting-started)
17+
- [Guides](https://primno.io/docs/guides)
18+
- [API Reference](https://primno.io/docs/api-reference)
419

520
## Commands
621

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env node
22

3-
require('./tsc.js');
3+
import './tsc.mjs';

dist/schema/primno.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@
3131
"build": {
3232
"$ref": "#/definitions/Build"
3333
},
34-
"environnement": {
34+
"environment": {
3535
"type": "array",
3636
"items": {
37-
"$ref": "#/definitions/Environnement"
37+
"$ref": "#/definitions/Environment"
3838
}
3939
}
4040
},
4141
"required": [
4242
"build",
4343
"distDir",
4444
"entryPointDir",
45-
"environnement",
45+
"environment",
4646
"name",
4747
"serve",
4848
"sourceRoot",
@@ -54,7 +54,7 @@
5454
"type": "object",
5555
"additionalProperties": false,
5656
"properties": {
57-
"environnement": {
57+
"environment": {
5858
"type": "string"
5959
},
6060
"entryPoint": {
@@ -66,11 +66,11 @@
6666
},
6767
"required": [
6868
"entryPoint",
69-
"environnement"
69+
"environment"
7070
],
7171
"title": "Build"
7272
},
73-
"Environnement": {
73+
"Environment": {
7474
"type": "object",
7575
"additionalProperties": false,
7676
"properties": {
@@ -89,7 +89,7 @@
8989
"name",
9090
"production"
9191
],
92-
"title": "Environnement"
92+
"title": "Environment"
9393
},
9494
"Serve": {
9595
"type": "object",

dist/template/new/.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Node.js
2+
node_modules/
3+
4+
# VSCode
5+
.vscode/
6+
7+
# Primno
8+
.cache
9+
dist
10+
build
11+
primno.env.json

dist/template/new/.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# .npmrc
2+
engine-strict=true

0 commit comments

Comments
 (0)