-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nuxt3-ts-scss): added nuxt starter
added base config for nuxt without autoumports with ts scss linters viewport mixins and base hooks
- Loading branch information
1 parent
f818d35
commit f69ba71
Showing
29 changed files
with
17,238 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
NUXT_PUBLIC_API_BASE_URL="https://your-api.ru/" | ||
NUXT_PUBLIC_API_DOMAIN="your-api.ru" | ||
NUXT_PUBLICK_BASE_APP_URL="http://localhost:3000" |
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,27 @@ | ||
dist | ||
node_modules | ||
.output | ||
.nuxt | ||
.storybook | ||
storybook-static | ||
.github | ||
coverage | ||
*.log | ||
nuxt.d.ts | ||
.output | ||
.DS_Store | ||
.vscode | ||
.md | ||
package.json | ||
package-lock.json | ||
babel.config.js | ||
graphql | ||
types.ts | ||
generated | ||
components.d.ts | ||
icons.d.ts | ||
auto.d.ts | ||
src-tauri | ||
auto-imports.d.ts | ||
components.d.ts | ||
dist |
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,67 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
node: true, | ||
}, | ||
parser: 'vue-eslint-parser', | ||
parserOptions: { | ||
parser: '@typescript-eslint/parser', | ||
}, | ||
extends: ['@vue/eslint-config-airbnb', '@nuxtjs/eslint-config-typescript', 'plugin:prettier/recommended', 'prettier'], | ||
plugins: ['simple-import-sort'], | ||
rules: { | ||
'vue/multi-word-component-names': 'off', | ||
'vue/camelcase': 'off', | ||
'consistent-return': 'off', | ||
'import/no-extraneous-dependencies': 'off', | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }], | ||
'vue/require-default-prop': 'off', | ||
'vue/no-setup-props-destructure': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/consistent-type-imports': 'error', | ||
'import/extensions': 'off', | ||
'import/no-unresolved': 'off', | ||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
camelcase: 'off', | ||
'vuejs-accessibility/click-events-have-key-events': 'off', | ||
'vuejs-accessibility/form-control-has-label': 'off', | ||
'import/prefer-default-export': 'off', | ||
'linebreak-style': ['error', 'unix'], | ||
'vue/component-tags-order': [ | ||
'error', | ||
{ | ||
order: ['script', 'template', 'style'], | ||
}, | ||
], | ||
'import/no-cycle': 'off', | ||
'no-prototype-builtins': 'off', | ||
'vuejs-accessibility/label-has-for': 'off', | ||
'simple-import-sort/imports': [ | ||
'error', | ||
{ | ||
groups: [ | ||
// Node.js builtins. You could also generate this regex if you use a `.js` config. | ||
// For example: `^(${require("module").builtinModules.join("|")})(/|$)` | ||
[ | ||
'^(assert|buffer|child_process|cluster|console|constants|crypto|dgram|dns|domain|events|fs|http|https|module|net|os|path|punycode|querystring|readline|repl|stream|string_decoder|sys|timers|tls|tty|url|util|vm|zlib|freelist|v8|process|async_hooks|http2|perf_hooks)(/.*|$)', | ||
], | ||
// Packages. `react` related packages come first. | ||
['^vue', '^~?\\w', '^#imports', '^#components'], | ||
// Internal packages. | ||
['^(~|~company|~ui|components|utils|config|vendored-lib)(/.*|$)'], | ||
// Side effect imports. | ||
['^\\u0000'], | ||
// Parent imports. Put `..` last. | ||
['^\\.\\.(?!/?$)', '^\\.\\./?$'], | ||
// Other relative imports. Put same-folder imports and `.` last. | ||
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'], | ||
// Style imports. | ||
['^.+\\.s?css$'], | ||
], | ||
}, | ||
], | ||
}, | ||
}; |
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,24 @@ | ||
# Nuxt dev/build outputs | ||
.output | ||
.data | ||
.nuxt | ||
.nitro | ||
.cache | ||
dist | ||
|
||
# Node dependencies | ||
node_modules | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
||
# Misc | ||
.DS_Store | ||
.fleet | ||
.idea | ||
|
||
# Local env files | ||
# .env | ||
# .env.* | ||
!.env.example |
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,15 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/prettierrc", | ||
"arrowParens": "always", | ||
"bracketSpacing": true, | ||
"endOfLine": "lf", | ||
"jsxBracketSameLine": false, | ||
"jsxSingleQuote": false, | ||
"printWidth": 120, | ||
"proseWrap": "preserve", | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"useTabs": false | ||
} |
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,75 @@ | ||
# Nuxt 3 Minimal Starter | ||
|
||
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. | ||
|
||
## Setup | ||
|
||
Make sure to install the dependencies: | ||
|
||
```bash | ||
# npm | ||
npm install | ||
|
||
# pnpm | ||
pnpm install | ||
|
||
# yarn | ||
yarn install | ||
|
||
# bun | ||
bun install | ||
``` | ||
|
||
## Development Server | ||
|
||
Start the development server on `http://localhost:3000`: | ||
|
||
```bash | ||
# npm | ||
npm run dev | ||
|
||
# pnpm | ||
pnpm run dev | ||
|
||
# yarn | ||
yarn dev | ||
|
||
# bun | ||
bun run dev | ||
``` | ||
|
||
## Production | ||
|
||
Build the application for production: | ||
|
||
```bash | ||
# npm | ||
npm run build | ||
|
||
# pnpm | ||
pnpm run build | ||
|
||
# yarn | ||
yarn build | ||
|
||
# bun | ||
bun run build | ||
``` | ||
|
||
Locally preview production build: | ||
|
||
```bash | ||
# npm | ||
npm run preview | ||
|
||
# pnpm | ||
pnpm run preview | ||
|
||
# yarn | ||
yarn preview | ||
|
||
# bun | ||
bun run preview | ||
``` | ||
|
||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. |
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,5 @@ | ||
<template> | ||
<div> | ||
<NuxtWelcome /> | ||
</div> | ||
</template> |
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,103 @@ | ||
// https://nuxt.com/docs/api/configuration/nuxt-config | ||
export default defineNuxtConfig({ | ||
devtools: { enabled: true }, | ||
imports: { | ||
autoImport: false, | ||
}, | ||
features: { | ||
inlineStyles: false, | ||
}, | ||
srcDir: 'src', | ||
css: ['@/assets/styles/global.scss'], | ||
vite: { | ||
css: { | ||
preprocessorOptions: { | ||
scss: { | ||
additionalData: ` | ||
@import "@/assets/styles/variables.scss"; | ||
@import "@/assets/styles/mixins.scss"; | ||
`, | ||
}, | ||
}, | ||
}, | ||
}, | ||
components: [ | ||
{ | ||
path: '~/components', | ||
pathPrefix: false, | ||
extensions: ['.ts'], | ||
}, | ||
], | ||
modules: [ | ||
'@nuxtjs/google-fonts', | ||
'@pinia/nuxt', | ||
'nuxt-viewport', | ||
'@nuxt/image', | ||
'nuxt-svgo', | ||
'@vueuse/nuxt', | ||
'@vueuse/nuxt', | ||
'nuxt-schema-org', | ||
'nuxt-simple-sitemap', | ||
], | ||
googleFonts: { | ||
overwriting: true, | ||
preload: true, | ||
families: { | ||
Roboto: [100, 400, 500, 700], | ||
download: true, | ||
}, | ||
subsets: ['cyrillic', 'latin'], | ||
}, | ||
image: { | ||
domains: [process.env.NUXT_PUBLIC_API_DOMAIN as string], | ||
format: ['webp', 'jpg', 'png'], | ||
}, | ||
svgo: { | ||
autoImportPath: './assets/icons/', | ||
componentPrefix: 'Ic', | ||
svgoConfig: { | ||
multipass: true, | ||
plugins: [ | ||
{ | ||
name: 'preset-default', | ||
params: { | ||
overrides: { | ||
// or disable plugins | ||
removeDoctype: false, | ||
removeViewBox: false, | ||
cleanupIds: false, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
viewport: { | ||
breakpoints: { | ||
mobile: 768, | ||
tabletSmall: 769, | ||
tablet: 1024, | ||
desktop: 1025, | ||
}, | ||
cookie: { | ||
name: 'viewport', | ||
}, | ||
defaultBreakpoints: { | ||
mobile: 'mobile', | ||
tabletSmall: 'tabletSmall', | ||
tablet: 'tablet', | ||
desktop: 'desktop', | ||
}, | ||
fallbackBreakpoint: 'desktop', | ||
}, | ||
site: { | ||
url: process.env.NUXT_PUBLICK_BASE_APP_URL, | ||
name: process.env.NUXT_PUBLICK_BASE_APP_URL, | ||
}, | ||
runtimeConfig: { | ||
public: { | ||
apiBaseUrl: process.env.NUXT_PUBLIC_API_BASE_URL, | ||
baseURL: process.env.NUXT_PUBLICK_BASE_APP_URL, | ||
}, | ||
}, | ||
}); |
Oops, something went wrong.