forked from epicmaxco/vuestic-ui
-
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.
- Loading branch information
Showing
18 changed files
with
20,661 additions
and
837 deletions.
There are no files selected for viewing
File renamed without changes.
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
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
// @ts-nocheck | ||
import Vue from 'vue' | ||
import VuesticPlugin from '../../ui/src/components/vuestic-plugin' | ||
import { VuesticPlugin } from 'vuestic-ui' | ||
|
||
console.log('VuesticPlugin', VuesticPlugin) | ||
|
||
Vue.use(VuesticPlugin) |
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
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,13 @@ | ||
/src/ | ||
.browserslistrc | ||
.eslintrc.js | ||
.eslintignore | ||
.stylelintrc.js | ||
dist/report.html | ||
yarn-error.log | ||
babel.config.js | ||
jest.config.js | ||
postcss.config.js | ||
vue.config.js | ||
build | ||
|
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,57 @@ | ||
import type { Configuration } from 'webpack' | ||
const webpack = require('webpack') | ||
const TerserPlugin = require('terser-webpack-plugin') | ||
const MiniCssExtractPlugin = require('mini-css-extract-plugin') | ||
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin') | ||
const { merge } = require('webpack-merge') | ||
const base = require('./webpack.prod.config') | ||
const version = process.env.VERSION || require('../package.json').version | ||
const isProd = process.env.NODE_ENV === 'production' | ||
|
||
module.exports = merge(base, { | ||
mode: 'production', | ||
output: { | ||
filename: 'vuestic-ui.min.js', | ||
libraryTarget: 'umd', | ||
}, | ||
plugins: [ | ||
new MiniCssExtractPlugin({ | ||
filename: 'vuestic-ui.min.css', | ||
}), | ||
new webpack.DefinePlugin({ | ||
'process.env.NODE_ENV': JSON.stringify('production'), | ||
}), | ||
], | ||
performance: { | ||
hints: false, | ||
}, | ||
optimization: { | ||
minimizer: [ | ||
// new TerserPlugin({ | ||
// cache: true, | ||
// parallel: true, | ||
// sourceMap: true, | ||
// }), | ||
new OptimizeCssAssetsPlugin({ | ||
assetNameRegExp: /\.css$/g, | ||
cssProcessor: require('cssnano'), | ||
cssProcessorOptions: { | ||
discardComments: { removeAll: true }, | ||
postcssZindex: false, | ||
reduceIdents: false, | ||
}, | ||
canPrint: false, | ||
}), | ||
|
||
// new webpack.BannerPlugin({ | ||
// banner: `/*! | ||
// * Vuestic v${version} | ||
// * Forged by John Leider | ||
// * Released under the MIT License. | ||
// */ `, | ||
// raw: true, | ||
// entryOnly: true, | ||
// }), | ||
], | ||
}, | ||
} as Configuration) |
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,51 @@ | ||
import type { Configuration } from 'webpack' | ||
|
||
require('dotenv').config() | ||
|
||
const MiniCssExtractPlugin = require('mini-css-extract-plugin') | ||
const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin') | ||
|
||
const scssLoaders = [ | ||
// 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 | ||
MiniCssExtractPlugin.loader, | ||
{ loader: 'css-loader', options: { sourceMap: false } }, | ||
{ loader: 'postcss-loader', options: { sourceMap: false } }, | ||
{ | ||
loader: 'sass-loader', | ||
options: { | ||
implementation: require('sass'), | ||
sassOptions: { | ||
indentedSyntax: false, | ||
}, | ||
}, | ||
}, | ||
] | ||
|
||
const plugins: Configuration['plugins'] = [ | ||
new FriendlyErrorsWebpackPlugin({ | ||
clearConsole: true, | ||
}), | ||
] | ||
|
||
module.exports = { | ||
resolve: { | ||
extensions: ['*', '.js', '.json', '.vue', '.ts'], | ||
}, | ||
// node: { | ||
// fs: false | ||
// }, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.scss$/, | ||
use: scssLoaders, | ||
}, | ||
], | ||
}, | ||
plugins, | ||
performance: { | ||
hints: false, | ||
}, | ||
stats: { children: false }, | ||
} as Configuration |
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,105 @@ | ||
import { Configuration } from 'webpack' | ||
|
||
const VueLoaderPlugin = require('vue-loader/lib/plugin') | ||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') | ||
|
||
const { merge } = require('webpack-merge') | ||
const baseWebpackConfig = require('./webpack.base.config') | ||
|
||
const resolve = (file: string) => require('path').resolve(__dirname, file) | ||
|
||
module.exports = merge(baseWebpackConfig, { | ||
entry: { | ||
app: './src/main.ts', | ||
}, | ||
output: { | ||
path: resolve('../dist'), | ||
publicPath: '/dist/', | ||
library: 'VuesticUI', | ||
libraryTarget: 'umd', | ||
libraryExport: 'default', | ||
// See https://github.com/webpack/webpack/issues/6522 | ||
globalObject: 'typeof self !== \'undefined\' ? self : this', | ||
}, | ||
externals: { | ||
vue: { | ||
commonjs: 'vue', | ||
commonjs2: 'vue', | ||
amd: 'vue', | ||
root: 'Vue', | ||
}, | ||
}, | ||
module: { | ||
rules: [ | ||
{ test: /\.m?js/, resolve: { fullySpecified: false } }, | ||
{ | ||
test: /\.js?$/, | ||
exclude: file => ( | ||
/node_modules/.test(file) && | ||
!/\.vue\.js/.test(file) | ||
), | ||
loader: 'babel-loader', | ||
// use: { | ||
// loader: 'babel-loader', | ||
// options: { | ||
// presets: [ | ||
// ['@babel/preset-env', { targets: 'defaults' }] | ||
// ] | ||
// } | ||
// } | ||
}, | ||
{ | ||
test: /\.css$/, | ||
use: [ | ||
'vue-style-loader', | ||
'css-loader', | ||
], | ||
}, | ||
// { | ||
// test: /\.scss$/, | ||
// use: [ | ||
// 'vue-style-loader', | ||
// 'css-loader', | ||
// 'sass-loader', | ||
// ], | ||
// }, | ||
{ | ||
test: /\.vue$/, | ||
loader: 'vue-loader', | ||
options: { | ||
loaders: { | ||
scss: 'vue-style-loader!css-loader!sass-loader', | ||
}, | ||
// other vue-loader options go here | ||
}, | ||
}, | ||
{ | ||
test: /\.tsx?$/, | ||
loader: 'ts-loader', | ||
exclude: /node_modules/, | ||
options: { | ||
appendTsSuffixTo: [/\.vue$/], | ||
}, | ||
}, | ||
{ | ||
test: /\.(png|jpg|gif|svg)$/, | ||
loader: 'file-loader', | ||
options: { | ||
name: '[name].[ext]?[hash]', | ||
}, | ||
}, | ||
], | ||
}, | ||
resolve: { | ||
extensions: ['.ts', '.js', '.vue', '.json'], | ||
alias: { | ||
vue$: 'vue/dist/vue.esm.js', | ||
}, | ||
}, | ||
plugins: [ | ||
new VueLoaderPlugin(), | ||
// new BundleAnalyzerPlugin({ | ||
// analyzerMode: 'static' | ||
// }), | ||
], | ||
} as Configuration) |
Oops, something went wrong.