@solfacil/plasma-utils
- π Nuxt 3 - Compatible with Nuxt 3 - π BUN - A fast JavaScript all-in-one toolkit (runtime, bundler, test runner, package manager). - π Keycloak integration. - β‘οΈ Vite - Instant HMR.
1,739
| Install | |
|---|---|
npm install @solfacil/plasma-utils@0.5.1 |
|
| Latest Version: | 0.5.1 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Apr 11, 2025 |
| Links: | npm |
Maintainer: solfacil-dev
Utility library of Plasma Template
Features
- π Nuxt 3 - Compatible with Nuxt 3
- π BUN - A fast JavaScript all-in-one toolkit (runtime, bundler, test runner, package manager).
- π Keycloak integration.
- β‘οΈ Vite - Instant HMR.
- π¦ Multiples connections for Graphql and Rest APIs.
- πͺ Change environments on runtime.
- π Utilities loading, env, storage, etc.
- π¦Ύ TypeScript, of course.
IDE
We recommend using VS Code with Volar to get the best experience (You might want to disable Vetur if you have it).
Try it now!
Plasma requires Node >= 16.17.0
Quick start
# Clone the repository
git clone https://github.com/solfacil/plasma-utils
# Install dependencies
bun i
# Start development playground
bun dev
# Build for production
bun build:lib:ts
# Publish to npm
npm publish
How to use
Vue 3
import plasma from '@solfacil/plasma-utils';
import App from './App.vue'
const plasmaOptions = {
configuration: {
enableKeycloak: false,
hostProduction: 'https://my-host.com',
hostStaging: 'https://my-host.com'
},
connections: {
graphql: {
default: {
dev: {
url: 'https://rickandmortyapi.com/graphql'
},
prod: {
url: 'https://rickandmortyapi.com/graphql'
},
stg: {
url: 'https://rickandmortyapi.com/graphql'
}
}
},
rest: {
rickmorty: {
dev: {
url: 'https://rickandmortyapi.com/api'
},
prod: {
url: 'https://rickandmortyapi.com/api'
},
stg: {
url: 'https://rickandmortyapi.com/api'
}
}
},
keycloak: {
dev: {
url: 'https://my-keycloak.com',
realm: 'General',
client_id: 'ecommerce'
},
prod: {
url: 'https://my-keycloak.com',
realm: 'General',
client_id: 'ecommerce'
},
stg: {
url: 'https://my-keycloak.com',
realm: 'General',
client_id: 'ecommerce'
}
}
}
};
createApp(App)
.use(plasma, plasmaOptions)
.mount('#app');
Nuxt 3
import plasma from '@solfacil/plasma-utils';
export default defineNuxtPlugin(({ vueApp }) => {
const config = useRuntimeConfig().public;
vueApp.use(plasma, {
configuration: {
enableKeycloak: false,
hostProduction: config.HOST_PRODUCTION,
hostStaging: config.HOST_STAGING
},
connections: {
graphql: {
default: {
dev: {
url: 'https://rickandmortyapi.com/graphql'
},
prod: {
url: 'https://rickandmortyapi.com/graphql'
},
stg: {
url: 'https://rickandmortyapi.com/graphql'
}
}
},
rest: {
rickmorty: {
dev: {
url: 'https://rickandmortyapi.com/api'
},
prod: {
url: 'https://rickandmortyapi.com/api'
},
stg: {
url: 'https://rickandmortyapi.com/api'
}
}
},
keycloak: {
dev: {
url: 'https://my-keycloak.com',
realm: 'General',
client_id: 'ecommerce'
},
prod: {
url: 'https://my-keycloak.com',
realm: 'General',
client_id: 'ecommerce'
},
stg: {
url: 'https://my-keycloak.com',
realm: 'General',
client_id: 'ecommerce'
}
}
}
});
});
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.5.1 | ^3.3.10 | MIT | |
| 0.5.0 | ^3.3.10 | MIT | |
| 0.4.18 | ^3.3.10 | MIT | |
| 0.4.17 | ^3.3.10 | MIT | |
| 0.4.16 | ^3.3.10 | MIT | |
| 0.4.15 | ^3.3.10 | MIT | |
| 0.4.13 | ^3.3.10 | MIT | |
| 0.4.12 | ^3.3.10 | MIT | |
| 0.4.11 | ^3.3.10 | MIT | |
| 0.4.10 | ^3.3.10 | MIT | |
| 0.4.9 | ^3.3.10 | MIT | |
| 0.4.8 | ^3.3.10 | MIT | |
| 0.4.7 | ^3.3.10 | MIT | |
| 0.4.6 | ^3.3.10 | MIT | |
| 0.4.5 | ^3.3.10 | MIT | |
| 0.4.4 | ^3.3.10 | MIT | |
| 0.4.3 | ^3.3.10 | MIT | |
| 0.4.2 | ^3.3.10 | MIT | |
| 0.4.1 | ^3.3.10 | MIT | |
| 0.4.0 | ^3.3.10 | MIT | |
| 0.3.0 | ^3.3.10 | MIT | |
| 0.2.1 | ^3.3.10 | MIT | |
| 0.2.0 | ^3.3.10 | MIT | |
| 0.1.4 | ^3.3.10 | MIT | |
| 0.1.3 | ^3.3.10 | MIT | |
| 0.1.2 | ^3.3.10 | MIT | |
| 0.1.0 | ^3.3.10 | MIT |
Pre-releases (1)
| Version | Released | Vue | License |
|---|---|---|---|
| 0.5.2-rc1 | ^3.3.10 | MIT |