Skip to content

Commit d190244

Browse files
committed
Initial commit
0 parents  commit d190244

File tree

19 files changed

+7375
-0
lines changed

19 files changed

+7375
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_size = 2
6+
indent_style = space
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
node_modules
2+
dist
3+
.nuxt
4+
coverage
5+
*.log*
6+
.DS_Store
7+
.code
8+
*.iml
9+
package-lock.json
10+
templates/*
11+
sw.js
12+
13+
# Templates
14+
src/templates

.eslintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": [
3+
"@nuxtjs/eslint-config-typescript"
4+
]
5+
}

.github/workflows/ci-dev.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: ci-dev
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
pull_request:
8+
branches:
9+
- dev
10+
11+
jobs:
12+
ci:
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest] # macos-latest, windows-latest
18+
node: [16]
19+
20+
steps:
21+
- uses: actions/setup-node@v2
22+
with:
23+
node-version: ${{ matrix.node }}
24+
25+
- name: Checkout
26+
uses: actions/checkout@master
27+
with:
28+
persist-credentials: false
29+
fetch-depth: 0
30+
31+
- name: Cache
32+
uses: actions/cache@v2
33+
with:
34+
path: node_modules
35+
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
36+
37+
- name: Dependencies
38+
if: steps.cache.outputs.cache-hit != 'true'
39+
run: yarn
40+
41+
- name: Lint
42+
run: yarn lint
43+
44+
- name: Prepare
45+
run: node ./node_modules/playwright/install.js
46+
47+
- name: Test
48+
run: yarn test
49+
50+
- name: Coverage
51+
uses: codecov/codecov-action@v2
52+
53+
- name: Build
54+
run: yarn build
55+
56+
- name: Release Edge
57+
if: github.event_name == 'push'
58+
run: ./scripts/release-edge.sh
59+
env:
60+
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}

.github/workflows/ci.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: ci-main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
ci:
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest] # macos-latest, windows-latest
18+
node: [16]
19+
20+
steps:
21+
- uses: actions/setup-node@v2
22+
with:
23+
node-version: ${{ matrix.node }}
24+
25+
- name: Checkout
26+
uses: actions/checkout@master
27+
with:
28+
persist-credentials: false
29+
fetch-depth: 0
30+
31+
- name: Cache
32+
uses: actions/cache@v2
33+
with:
34+
path: node_modules
35+
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
36+
37+
- name: Dependencies
38+
if: steps.cache.outputs.cache-hit != 'true'
39+
run: yarn
40+
41+
- name: Lint
42+
run: yarn lint
43+
44+
- name: Prepare
45+
run: node ./node_modules/playwright/install.js
46+
47+
- name: Test
48+
run: yarn test
49+
50+
- name: Coverage
51+
uses: codecov/codecov-action@v2
52+
53+
- name: Build
54+
run: yarn build
55+
56+
- name: Version Check
57+
id: check
58+
uses: EndBug/version-check@v2
59+
with:
60+
token: ${{ secrets.GITHUB_TOKEN }}
61+
62+
- name: Release
63+
if: github.event_name == 'push' && steps.check.outputs.changed == 'true'
64+
run: ./scripts/release.sh
65+
env:
66+
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
*.log
3+
.nuxt
4+
nuxt.d.ts
5+
.output
6+
dist

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# @nuxthq/ui
2+
3+
Components library as a Nuxt3 module.
4+
5+
## Installation
6+
7+
```bash
8+
yarn add --dev @nuxthq/ui
9+
```
10+
11+
Register the module in your `nuxt.config.js`:
12+
13+
```js
14+
import { defineNuxtConfig } from 'nuxt3'
15+
16+
export default defineNuxtConfig({
17+
buildModules: [
18+
'@nuxthq/ui'
19+
]
20+
})
21+
```
22+
23+
## Options
24+
25+
- `primary`
26+
27+
Define the primary variant. Defaults to `indigo`.
28+
29+
**Example:**
30+
31+
```js
32+
import { defineNuxtConfig } from 'nuxt3'
33+
34+
export default defineNuxtConfig({
35+
buildModules: [
36+
'@nuxthq/ui'
37+
],
38+
ui: {
39+
primary: 'blue'
40+
}
41+
})
42+
```

build.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export default {
2+
entries: [
3+
'./src/index'
4+
],
5+
declaration: true,
6+
externals: [
7+
'@nuxt/kit'
8+
]
9+
}

example/app.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<template>
2+
<div>
3+
Welcome
4+
<NuButton class="ml-3" variant="primary" icon="heroicons-outline:check-circle">
5+
toto
6+
</NuButton>
7+
</div>
8+
</template>

example/nuxt.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { defineNuxtConfig } from 'nuxt3'
2+
3+
// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
4+
export default defineNuxtConfig({
5+
buildModules: [
6+
['../src', { primary: 'blue', prefix: 'nu' }]
7+
]
8+
})

0 commit comments

Comments
 (0)