Skip to content

Commit

Permalink
maybe??
Browse files Browse the repository at this point in the history
  • Loading branch information
PavolC committed Jun 28, 2022
1 parent eba122f commit 1f36a95
Show file tree
Hide file tree
Showing 2,310 changed files with 11,025 additions and 120,446 deletions.
Binary file removed .DS_Store
Binary file not shown.
5 changes: 5 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
>0.5%
last 2 versions
node 8
not dead
not op_mini all
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
HOST=localhost
PORT=8080
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/build/

# Built files
/es5/
/lib/
/lib-temp/
/dist/
50 changes: 50 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
module.exports = {
globals: {
__VUETIFY_VERSION__: true,
__REQUIRED_VUE__: true,
},
env: {
'jest/globals': true,
},
plugins: [
'jest',
'eslint-plugin-local-rules',
],
extends: ['plugin:jest/recommended'],
rules: {
'vue/html-self-closing': 'off',
'vue/html-closing-bracket-spacing': 'off',
'vue/max-attributes-per-line': ['error', {
singleline: 1,
multiline: {
max: 1,
allowFirstLine: false,
},
}],
'vue/component-definition-name-casing': ['error', 'kebab-case'],
'local-rules/no-render-string-reference': 'error',
'jest/no-disabled-tests': 'off',
'jest/no-large-snapshots': 'warn',
'jest/prefer-spy-on': 'warn',
'jest/prefer-to-be-null': 'warn',
'jest/prefer-to-be-undefined': 'warn',
'jest/prefer-to-contain': 'warn',
'jest/prefer-to-have-length': 'warn',
'jest/no-standalone-expect': 'off',
'jest/no-conditional-expect': 'off',
},
overrides: [
{
files: 'dev/Playground.vue',
rules: {
'max-len': 'off',
},
},
{
files: '**/*.spec.ts',
rules: {
'vue/component-definition-name-casing': 'off',
},
},
],
}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Ignore everything in dev, use git add -f to add new files
/dev/Playground.vue

# Built files
/es5/
/lib/
/lib-temp/
/dist/
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

42 changes: 21 additions & 21 deletions build/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,42 +14,42 @@ const builds = {
mode: 'development',
output: {
filename: 'vuetify.js',
libraryTarget: 'umd',
libraryTarget: 'umd'
},
plugins: [
new MiniCssExtractPlugin({
filename: 'vuetify.css',
}),
],
},
filename: 'vuetify.css'
})
]
}
},
production: {
config: {
mode: 'production',
output: {
filename: 'vuetify.min.js',
libraryTarget: 'umd',
libraryTarget: 'umd'
},
plugins: [
new MiniCssExtractPlugin({
filename: 'vuetify.min.css',
}),
filename: 'vuetify.min.css'
})
],
performance: {
hints: false,
},
hints: false
}
},
env: 'production',
},
env: 'production'
}
}

function genConfig (opts) {
const config = merge({}, base, opts.config)

config.plugins = config.plugins.concat([
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(opts.env || 'development'),
}),
'process.env.NODE_ENV': JSON.stringify(opts.env || 'development')
})
])

if (opts.env) {
Expand All @@ -61,27 +61,27 @@ function genConfig (opts) {
* Released under the MIT License.
*/ `,
raw: true,
entryOnly: true,
}),
entryOnly: true
})
])
config.optimization = {
minimizer: [
new TerserPlugin({
cache: true,
parallel: true,
sourceMap: true,
sourceMap: true
}),
new OptimizeCssAssetsPlugin({
assetNameRegExp: /\.css$/g,
cssProcessor: require('cssnano'),
cssProcessorOptions: {
discardComments: { removeAll: true },
postcssZindex: false,
reduceIdents: false,
reduceIdents: false
},
canPrint: false,
}),
],
canPrint: false
})
]
}
}

Expand Down
40 changes: 20 additions & 20 deletions build/webpack.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ const isProd = process.env.NODE_ENV === 'production'
const extractCSS = isProd || process.env.TARGET === 'development'

exports.happyThreadPool = HappyPack.ThreadPool({
size: Math.min(os.cpus().length, 4),
size: Math.min(os.cpus().length, 4)
})

const cssLoaders = [
// https://github.com/webpack-contrib/mini-css-extract-plugin#user-content-advanced-configuration-example
// TODO: remove style-loader: https://github.com/webpack-contrib/mini-css-extract-plugin/issues/34
extractCSS ? MiniCssExtractPlugin.loader : 'style-loader',
{ loader: 'css-loader', options: { sourceMap: !isProd } },
{ loader: 'postcss-loader', options: { sourceMap: !isProd } },
{ loader: 'postcss-loader', options: { sourceMap: !isProd } }
]

const sassLoaders = [
Expand All @@ -27,10 +27,10 @@ const sassLoaders = [
options: {
implementation: require('sass'),
sassOptions: {
indentedSyntax: true,
},
},
},
indentedSyntax: true
}
}
}
]

const scssLoaders = [
Expand All @@ -40,41 +40,41 @@ const scssLoaders = [
options: {
implementation: require('sass'),
sassOptions: {
indentedSyntax: false,
},
},
},
indentedSyntax: false
}
}
}
]

const plugins = [
new FriendlyErrorsWebpackPlugin({
clearConsole: true,
}),
clearConsole: true
})
]

exports.config = {
mode: isProd ? 'production' : 'development',
resolve: {
extensions: ['*', '.js', '.json', '.vue', '.ts'],
extensions: ['*', '.js', '.json', '.vue', '.ts']
},
node: {
fs: 'empty',
fs: 'empty'
},
module: {
rules: [
{
test: /\.sass$/,
use: sassLoaders,
use: sassLoaders
},
{
test: /\.scss$/,
use: scssLoaders,
},
],
use: scssLoaders
}
]
},
plugins,
performance: {
hints: false,
hints: false
},
stats: { children: false },
stats: { children: false }
}
55 changes: 28 additions & 27 deletions build/webpack.dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ module.exports = merge(baseWebpackConfig, {
filename: '[name].js',
path: resolve('../dev'),
publicPath: '/dev/',
library: 'Vuetify',
library: 'Vuetify'
},
resolve: {
alias: {
vuetify: resolve('../src'),
vue$: 'vue/dist/vue.esm.js',
},
vue$: 'vue/dist/vue.esm.js'
}
},
module: {
rules: [
Expand All @@ -31,26 +31,26 @@ module.exports = merge(baseWebpackConfig, {
loader: 'vue-loader',
options: {
compilerOptions: {
modules: [VuetifyProgressiveModule],
},
},
modules: [VuetifyProgressiveModule]
}
}
},
{
test: /\.ts$/,
use: 'happypack/loader?id=ts',
exclude: /node_modules/,
exclude: /node_modules/
},
{
test: /\.js$/,
use: 'happypack/loader?id=js',
exclude: /node_modules/,
exclude: /node_modules/
},
{
test: /\.css$/,
use: [
'style-loader',
'css-loader',
],
'css-loader'
]
},
{
test: /\.(png|jpe?g|gif|svg|eot|ttf|woff|woff2)$/,
Expand All @@ -62,33 +62,33 @@ module.exports = merge(baseWebpackConfig, {
'vuetify-loader/progressive-loader',
{
loader: 'url-loader',
options: { limit: 8000 },
},
],
options: { limit: 8000 }
}
]
},
{
loader: 'url-loader',
options: {
limit: 10000,
name: 'img/[name].[hash:7].[ext]',
},
},
],
},
],
name: 'img/[name].[hash:7].[ext]'
}
}
]
}
]
},
devServer: {
contentBase: resolve('../dev'),
publicPath: '/dev/',
host: process.env.HOST || 'localhost',
port: process.env.PORT || '8080',
disableHostCheck: true,
disableHostCheck: true
},
plugins: [
new VueLoaderPlugin(),
new ForkTsCheckerWebpackPlugin({
checkSyntacticErrors: true,
tsconfig: resolve('../tsconfig.json'),
tsconfig: resolve('../tsconfig.json')
}),
new HappyPack({
id: 'ts',
Expand All @@ -99,15 +99,16 @@ module.exports = merge(baseWebpackConfig, {
loader: 'ts-loader',
options: {
appendTsSuffixTo: [/\.vue$/],
happyPackMode: true,
},
happyPackMode: true
}
},
],
'eslint-loader?cache=true?emitWarning=true'
]
}),
new HappyPack({
id: 'js',
threadPool: happyThreadPool,
loaders: ['babel-loader'],
}),
],
loaders: ['babel-loader', 'eslint-loader?cache=true?emitWarning=true']
})
]
})
Loading

0 comments on commit 1f36a95

Please sign in to comment.