Skip to content

Commit 2338a57

Browse files
committed
Merge branch 'tailwind'
2 parents cf94811 + 5d60b65 commit 2338a57

14 files changed

+10580
-2663
lines changed

Diff for: .gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.nuxt
2+
node_modules
3+
sw.js
4+
.env

Diff for: assets/css/main.scss

-13
This file was deleted.

Diff for: commitlint.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional']
3+
}

Diff for: jsconfig.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": ".",
4+
"paths": {
5+
"~/*": ["./*"],
6+
"@/*": ["./*"],
7+
"~~/*": ["./*"],
8+
"@@/*": ["./*"]
9+
}
10+
},
11+
"exclude": ["node_modules", ".nuxt", "dist"]
12+
}

Diff for: layouts/default.vue

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
<template>
2-
<vf-o-layout>
3-
<nuxt />
4-
</vf-o-layout>
5-
</template>
2+
<nuxt />
3+
</template>

Diff for: layouts/error.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<template>
2-
<vf-t-error />
3-
</template>
2+
<vf-t-common-error />
3+
</template>

Diff for: locales/Readme.md

100755100644
File mode changed.

Diff for: nuxt.config.js

+55-21
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
1-
require('dotenv').config()
2-
const LodashModuleReplacementPlugin = require('lodash-webpack-plugin')
1+
require("dotenv").config();
2+
const LodashModuleReplacementPlugin = require("lodash-webpack-plugin");
3+
const isDev = process.env.NODE_ENV === "development";
4+
5+
const modules = [];
6+
7+
if (!isDev) {
8+
modules.push("@nuxtjs/pwa");
9+
}
310

411
export default {
5-
mode: 'universal',
12+
ssr: false,
13+
target: isDev ? "server" : "static",
14+
// modern: 'client',
615
env: {
716
FEATURED_PRODUCT: process.env.FEATURED_PRODUCT
817
},
918
generate: {
1019
concurrency: 5,
11-
subFolders: false
20+
subFolders: false,
21+
crawler: true,
1222
},
1323
head: {
1424
title: 'vuefront',
@@ -17,36 +27,60 @@ export default {
1727
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
1828
{ hid: 'description', name: 'description', content: 'VueFront' }
1929
],
20-
link: [{
30+
link: [
31+
{
2132
rel: 'icon',
2233
type: 'image/png',
23-
href: process.env.BASE_URL+'favicon.ico'
24-
}],
34+
href: '/favicon.png'
35+
}
36+
],
2537
script: []
2638
},
2739
loading: { color: '#3B8070' },
2840
modules: [
29-
'@nuxtjs/pwa',
3041
'@nuxtjs/dotenv',
3142
'vuefront-nuxt',
32-
'cookie-universal-nuxt'
43+
...modules,
3344
],
34-
pwa: {
35-
icon: {},
36-
manifest: {
37-
name: 'VueFront'
38-
},
39-
},
40-
router: {
41-
base: process.env.BASE_URL
42-
},
45+
buildModules: [
46+
// https://go.nuxtjs.dev/eslint
47+
['@nuxtjs/eslint-module', { fix: true }],
48+
// https://go.nuxtjs.dev/stylelint
49+
['@nuxtjs/stylelint-module', {fix: true}]
50+
// '@aceforth/nuxt-optimized-images',
51+
],
52+
// optimizedImages: {
53+
// optimizeImages: true,
54+
// optimizeImagesInDev: true
55+
// },
4356
build: {
4457
babel: {
45-
plugins: ['lodash']
58+
plugins: ['lodash', 'preval' , "@babel/plugin-proposal-optional-chaining"]
4659
},
4760
extractCSS: true,
48-
plugins: [new LodashModuleReplacementPlugin({
61+
splitChunks: {
62+
layouts: true,
63+
pages: true,
64+
commons: true
65+
},
66+
postcss: {
67+
preset: {
68+
features: {
69+
// Fixes: https://github.com/tailwindcss/tailwindcss/issues/1190#issuecomment-546621554
70+
'focus-within-pseudo-class': false
71+
}
72+
},
73+
plugins: {
74+
tailwindcss: {}
75+
}
76+
},
77+
transpile: ["@vuefront/checkout-app"],
78+
extractCSS: !isDev,
79+
corejs: 2,
80+
plugins: [
81+
new LodashModuleReplacementPlugin({
4982
shorthands: true
50-
})]
83+
})
84+
]
5185
}
5286
}

Diff for: package.json

+37-13
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,53 @@
11
{
22
"name": "vuefront-starter-kit",
3-
"description": "My terrific VueFront App",
4-
"version": "0.1.0",
3+
"description": "VueFront App",
4+
"version": "0.1.1",
55
"author": "dmitriyzhuk",
66
"private": true,
77
"scripts": {
8-
"dev": "nuxt dev -o",
8+
"dev": "nuxt dev",
99
"build": "nuxt build",
1010
"start": "nuxt start",
1111
"generate": "nuxt generate",
12-
"analyze": "nuxt build --analyze"
12+
"analyze": "nuxt build --analyze",
13+
"lint:js": "eslint --ext .js,.vue --ignore-path .gitignore .",
14+
"lint:style": "stylelint **/*.{vue,css} --ignore-path .gitignore",
15+
"lint": "yarn lint:js && yarn lint:style"
16+
},
17+
"lint-staged": {
18+
"*.{js,vue}": "eslint",
19+
"*.{css,vue}": "stylelint"
1320
},
1421
"dependencies": {
15-
"@nuxtjs/dotenv": "^1.4.0",
16-
"@nuxtjs/pwa": "^3.0.0-beta.16",
17-
"cookie-universal-nuxt": "^2.0.17",
18-
"nuxt": "2.9.1",
19-
"vuefront-nuxt": "^0.2.3"
22+
"@aceforth/nuxt-optimized-images": "^1.4.0",
23+
"@nuxtjs/dotenv": "^1.4.1",
24+
"@nuxtjs/pwa": "^3.3.5",
25+
"cookie-universal-nuxt": "^2.1.5",
26+
"nuxt": "2.15.7",
27+
"nuxt-compress": "^5.0.0",
28+
"vuefront-nuxt": "0.3.68"
2029
},
2130
"devDependencies": {
22-
"@babel/runtime-corejs2": "^7.7.6",
31+
"@babel/runtime-corejs2": "^7.14.8",
32+
"@commitlint/cli": "^12.1.4",
33+
"@commitlint/config-conventional": "^12.1.4",
34+
"@nuxtjs/eslint-config": "^6.0.1",
35+
"@nuxtjs/eslint-module": "^3.0.2",
36+
"@nuxtjs/stylelint-module": "^4.0.0",
37+
"babel-eslint": "^10.1.0",
2338
"babel-plugin-lodash": "^3.3.4",
39+
"babel-plugin-preval": "^5.0.0",
2440
"core-js": "2",
25-
"lodash-webpack-plugin": "^0.11.5",
26-
"node-sass": "^4.12.0",
27-
"sass-loader": "^7.3.1"
41+
"eslint": "^7.31.0",
42+
"eslint-plugin-nuxt": "^2.0.0",
43+
"husky": "^7.0.1",
44+
"lint-staged": "^11.0.1",
45+
"lodash-webpack-plugin": "^0.11.6",
46+
"node-sass": "^4.13.1",
47+
"sass-loader": "^8.0.2",
48+
"stylelint": "^13.13.1",
49+
"stylelint-config-prettier": "^8.0.2",
50+
"stylelint-config-standard": "^22.0.0",
51+
"stylelint-scss": "^3.19.0"
2852
}
2953
}

Diff for: static/favicon.png

4.07 KB
Loading

Diff for: stylelint.config.js

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
module.exports = {
2+
extends: ["stylelint-config-standard", "stylelint-config-prettier"],
3+
plugins: ["stylelint-scss"],
4+
// add your custom config here
5+
// https://stylelint.io/user-guide/configuration
6+
rules: {
7+
"at-rule-no-unknown": [
8+
true,
9+
{
10+
ignoreAtRules: [
11+
"tailwind",
12+
"apply",
13+
"variants",
14+
"responsive",
15+
"screen",
16+
],
17+
},
18+
],
19+
"scss/at-rule-no-unknown": [
20+
true,
21+
{
22+
ignoreAtRules: [
23+
"tailwind",
24+
"apply",
25+
"variants",
26+
"responsive",
27+
"screen",
28+
],
29+
},
30+
],
31+
"declaration-block-trailing-semicolon": null,
32+
"no-descending-specificity": null,
33+
},
34+
};

Diff for: tailwind.config.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
purge: [],
3+
darkMode: false, // or 'media' or 'class'
4+
theme: {
5+
extend: {},
6+
},
7+
variants: {
8+
extend: {},
9+
},
10+
plugins: [
11+
require('@tailwindcss/forms'),
12+
require('vuefront/tailwind/plugin.js')
13+
],
14+
}

Diff for: vuefront.config.js

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
export default {
2-
logo: require('~/assets/img/logo_header.svg'),
3-
footerLogo: require('~/assets/img/logo_footer.svg'),
2+
app: [],
3+
// app: ['@vuefront/checkout-app'],
4+
image: {
5+
logo: {
6+
path: '~/assets/img/logo_header.svg'
7+
},
8+
footerLogo: {
9+
path: '~/assets/img/logo_footer.svg'
10+
},
11+
},
412
layouts: {
513
'*': {
614
headerMenu: [
@@ -17,7 +25,8 @@ export default {
1725
[
1826
'ExtraLinks',
1927
{
20-
links: [{
28+
links: [
29+
{
2130
to: '/store/special',
2231
text: 'Special'
2332
},
@@ -61,7 +70,8 @@ export default {
6170
},
6271
'/store/category*': {
6372
columnLeft: [
64-
'StoreCategory', [
73+
'StoreCategory',
74+
[
6575
'LatestProduct',
6676
{
6777
column: true
@@ -72,7 +82,8 @@ export default {
7282
'/blog/category*': {
7383
columnRight: [
7484
'Search',
75-
'BlogCategory', [
85+
'BlogCategory',
86+
[
7687
'LatestPost',
7788
{
7889
column: true

0 commit comments

Comments
 (0)