-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e04c14b
commit 25856d1
Showing
7 changed files
with
125 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import { createApp } from "vue"; | ||
// import Iconify from "@oktaytest/vue"; | ||
import Iconify from "@oktaytest/vue"; | ||
|
||
import App from "./App.vue"; | ||
|
||
import "./style.css"; | ||
|
||
const app = createApp(App); | ||
|
||
// app.use(Iconify); | ||
app.use(Iconify); | ||
|
||
app.mount("#app"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules | ||
.pnp | ||
.pnp.js | ||
|
||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# build | ||
dist | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# turbo | ||
.turbo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "@oktaytest/nuxt", | ||
"version": "0.0.109", | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"exports": { | ||
".": { | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.js" | ||
} | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"scripts": { | ||
"build": "tsup", | ||
"dev": "tsup --watch", | ||
"clean": "rm -rf dist" | ||
}, | ||
"devDependencies": { | ||
"@oktaytest/typescript-config": "*", | ||
"tsup": "^8.0.1", | ||
"typescript": "^5.3.3" | ||
}, | ||
"dependencies": { | ||
"@nuxt/kit": "^3.11.2", | ||
"@oktaytest/core": "*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { addComponent, defineNuxtModule } from "@nuxt/kit"; | ||
import { | ||
getIconsFilePath, | ||
getResolveAlias, | ||
loadIcons, | ||
type IconifyOptions, | ||
} from "@oktaytest/core"; | ||
|
||
const defaultOptions: IconifyOptions = { | ||
icons: [], | ||
type: "esm", | ||
}; | ||
|
||
export default defineNuxtModule<IconifyOptions>({ | ||
meta: { | ||
name: "nuxt-iconify", | ||
configKey: "iconify", | ||
}, | ||
defaults: defaultOptions, | ||
async setup(options, nuxt) { | ||
addComponent({ | ||
name: "Iconify", | ||
export: "Iconify", | ||
filePath: "@oktaytest/vue", | ||
}); | ||
|
||
const alias = getResolveAlias(); | ||
|
||
nuxt.options.alias = { | ||
...nuxt.options.alias, | ||
[alias]: getIconsFilePath(options), | ||
}; | ||
|
||
nuxt.addHooks({ | ||
"app:resolve": async () => { | ||
await loadIcons(options); | ||
}, | ||
}); | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "@oktaytest/typescript-config/react-native-library", | ||
"include": ["."], | ||
"exclude": ["dist", "build", "node_modules"], | ||
"compilerOptions": { | ||
"strict": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { defineConfig, Options } from "tsup"; | ||
|
||
export default defineConfig((options: Options) => ({ | ||
entry: { | ||
index: "src/index.ts", | ||
}, | ||
clean: true, | ||
format: ["cjs", "esm"], | ||
externals: ["@nuxt/schema"], | ||
dts: true, | ||
...options, | ||
})); |