Skip to content

Commit

Permalink
Merge pull request #38 from GrabarzUndPartner/feature/globals
Browse files Browse the repository at this point in the history
Feature/globals
  • Loading branch information
StephanGerbeth authored Nov 4, 2018
2 parents f008ee5 + 1812844 commit 0b5aa7e
Show file tree
Hide file tree
Showing 47 changed files with 2,621 additions and 1,115 deletions.
13 changes: 8 additions & 5 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"presets": [
["vue-app", {
"modules": false,
"useBuiltIns": true,
"debug": true
}]
[
"vue-app",
{
"modules": false,
"useBuiltIns": true,
"debug": true
}
]
]
}
7 changes: 0 additions & 7 deletions .postcssrc

This file was deleted.

25 changes: 25 additions & 0 deletions .postcssrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
plugins: {
'postcss-normalize': {},
'postcss-object-fit-images': {},
'postcss-preset-env': {
stage: 0,
features: {
'nesting-rules': true
},
importFrom: 'src/globals/postcss.js'
},
'@fullhuman/postcss-purgecss': {
content: [
'src/pages/**/*.vue',
'src/layouts/**/*.vue',
'src/components/**/*.vue'
],
whitelist: ['html', 'body'],
whitelistPatterns: [/nuxt-/]
},
'postcss-momentum-scrolling': ['scroll'],
'postcss-pseudo-content-insert': {},
'rucksack-css': {}
}
};
52 changes: 38 additions & 14 deletions env/nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
// process.env.DEBUG = '*';
// process.env.DEBUG = 'webpack-virtual-modules';

const path = require('path');
const webpackPlugins = require('./webpack/plugins');
const webpackModules = require('./webpack/modules');

module.exports = {
dev: process.env.NODE_ENV === 'development',
srcDir: 'src/',
css: [],
env: {},
build: {
analyze: false,
// analyze: {
// analyzerMode: 'static',
// reportFilename: path.resolve('reports/webpack-bundle-analyzer.html'),
// openAnalyzer: false
// },

extend(config) {
webpackPlugins(config.plugins);
webpackModules(config.module);
return config;
}
parallel: true,
transpile: []
},
render: {
http2: { push: true }
},

router: {
base: '/'
},

plugins: [{ src: '@/plugins/intersectionObserver' }],

vendor: ['default-passive-events'],

modules: [
'@/modules/fix/postcss',
'@/modules/fix/image',
'@/modules/virtual',
'@/modules/svg',
'@/modules/webp',
'@/modules/image',
[
'nuxt-i18n',
{
Expand All @@ -42,19 +51,21 @@ module.exports = {
],
defaultLocale: 'de',
strategy: 'prefix_except_default',
seo: true,
vueI18n: {
fallbackLocale: 'de',
messages: {
en: require(path.resolve('src/locales/global/en.json')),
de: require(path.resolve('src/locales/global/de.json'))
en: require(path.resolve('src/globals/locales/en.json')),
de: require(path.resolve('src/globals/locales/de.json'))
}
},
vueI18nLoader: false
vueI18nLoader: true
}
],
[
'@nuxtjs/pwa',
{
dev: process.env.NODE_ENV === 'development',
icon: {
iconSrc: 'src/static/favicon.png',
sizes: [16, 120, 144, 152, 192, 384, 512]
Expand All @@ -79,7 +90,8 @@ module.exports = {
ogImage: true
},
manifest: {
name: 'MANIFEST FOR APP',
name: 'Sample MANIFEST',
short_name: 'Sample',
lang: 'de'
}
}
Expand All @@ -88,6 +100,18 @@ module.exports = {

head: {
meta: [],
link: []
link: [],
script: [
{
src:
'https://cdn.polyfill.io/v2/polyfill.min.js?features=HTMLPictureElement',
defer: true
},
{
innerHTML:
'document.createElement( "picture" );document.createElement( "source" );'
}
],
__dangerouslyDisableSanitizers: ['script']
}
};
18 changes: 0 additions & 18 deletions env/webpack/modules.js

This file was deleted.

15 changes: 0 additions & 15 deletions env/webpack/modules/i18n-loader.js

This file was deleted.

14 changes: 0 additions & 14 deletions env/webpack/modules/postcss-fix-loader.js

This file was deleted.

9 changes: 0 additions & 9 deletions env/webpack/modules/url-loader.js

This file was deleted.

18 changes: 0 additions & 18 deletions env/webpack/plugins.js

This file was deleted.

63 changes: 0 additions & 63 deletions env/webpack/plugins/imagemin.js

This file was deleted.

17 changes: 0 additions & 17 deletions env/webpack/plugins/monitor.js

This file was deleted.

11 changes: 0 additions & 11 deletions env/webpack/plugins/svg-sprite.js

This file was deleted.

49 changes: 0 additions & 49 deletions env/webpack/plugins/virtual-file.js

This file was deleted.

Loading

0 comments on commit 0b5aa7e

Please sign in to comment.