@model-w/preset-nuxt3 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env-template ADDED
@@ -0,0 +1,21 @@
1
+ set -a
2
+
3
+ # Base frontend configuration:
4
+ # Frontend desired URL for example "localhost:3000"
5
+ BASE_URL="http://localhost:3000"
6
+
7
+ # Backend URL location for example "localhost:8000"
8
+ API_URL="http://localhost:8000"
9
+
10
+ # Proxy configuration stuff
11
+ BACK_ALIAS="back"
12
+ CMS_ALIAS="cms"
13
+
14
+ # Template config
15
+ NUXT_PUBLIC_SERVER_TEMPLATED_COMPONENTS=true
16
+
17
+ # Site name
18
+ SITE_NAME="Model W"
19
+
20
+ # Sentry configuration dsn url
21
+ SENTRY_DSN="https://<number>.ingest.sentry.io/<number>"
package/README.md ADDED
File without changes
package/nuxt.config.ts ADDED
@@ -0,0 +1,54 @@
1
+ export interface ModelWConfig {
2
+ siteName?: string;
3
+ apiURL?: string;
4
+ sentryDSN?: string;
5
+ ENV?: string;
6
+ charset?: string;
7
+ meta?: Array<any>;
8
+ moduleConfig?: Array<any>;
9
+ backAlias?: string;
10
+ cmsAlias?: string;
11
+ }
12
+
13
+ export function defineModelWConfig(config: ModelWConfig) {
14
+ return defineNuxtConfig({
15
+ app: {
16
+ head: {
17
+ titleTemplate: config.siteName,
18
+ },
19
+ // @ts-ignore
20
+ meta: config.meta,
21
+ },
22
+
23
+ routeRules: {
24
+ '/': {
25
+ prerender: true,
26
+ cors: true
27
+ },
28
+ '/*': {
29
+ cors: true
30
+ }
31
+ },
32
+
33
+ runtimeConfig: {
34
+ apiURL: config.apiURL,
35
+ backAlias: config.backAlias,
36
+ cmsAlias: config.cmsAlias,
37
+ public: {
38
+ sentryDSN: config.sentryDSN,
39
+ serverTemplatedComponents: false,
40
+ },
41
+ ENV: config.ENV,
42
+ },
43
+
44
+ build: {},
45
+
46
+ modules: [
47
+ "nuxt-runtime-compiler",
48
+ "@model-w/axios",
49
+ "@model-w/sentry",
50
+ "@model-w/proxy",
51
+ ...(config.moduleConfig ? config.moduleConfig : []),
52
+ ]
53
+ })
54
+ }
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@model-w/preset-nuxt3",
3
+ "version": "0.1.0",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/ModelW/preset-nuxt3.git"
7
+ },
8
+ "bugs": {
9
+ "url": "https://github.com/ModelW/preset-nuxt3/issues"
10
+ },
11
+ "description": "Preset of Nuxt3 for ModelW",
12
+ "main": "nuxt.config.ts",
13
+ "scripts": {
14
+ "test": "echo \"Error: no test specified\" && exit 1"
15
+ },
16
+ "engines": {
17
+ "node": ">=16.0.0"
18
+ },
19
+ "dependencies": {
20
+ "nuxt": "~3.4.1",
21
+ "@model-w/axios": "~0.3.0",
22
+ "@model-w/proxy": "~0.1.4",
23
+ "@model-w/sentry": "~0.1.1",
24
+ "@vuelidate/core": "~2.0.2",
25
+ "@vuelidate/validators": "~2.0.2",
26
+ "defu": "~6.1.2",
27
+ "jsdom": "~21.1.1",
28
+ "nuxt-runtime-compiler": "~1.2.2",
29
+ "vite-svg-loader": "~4.0.0",
30
+ "vue3-toastify": "~0.1.6",
31
+ "sass": "~1.62.0",
32
+ "sass-loader": "~13.2.2"
33
+ },
34
+ "keywords": [
35
+ "Nuxt3",
36
+ "modelw",
37
+ "model-w",
38
+ "Nuxt3-preset"
39
+ ],
40
+ "author": "Rémy Sanchez (@xowap)",
41
+ "license": "WTFPL",
42
+ "contributors": [
43
+ "Laurent Treguier",
44
+ "Ivan Lorenzo"
45
+ ]
46
+ }