Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Thumbs.db
.vscode

/log
/vendor

package-lock.json
yarn.lock
Expand Down
Empty file added dist/editor.css
Empty file.
Empty file added dist/editor.js
Empty file.
7 changes: 7 additions & 0 deletions dist/editor.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*!*********************************!*\
!*** ./src/assets/js/script.js ***!
\*********************************/

/*!**********************************!*\
!*** ./src/assets/css/style.css ***!
\**********************************/
29 changes: 29 additions & 0 deletions dist/main.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions dist/main.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/*!**************************************!*\
!*** ./src/js/material-dashboard.js ***!
\**************************************/
1 change: 1 addition & 0 deletions dist/main.js.map

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "laravel-generator-ui",
"description": "Laravel Generator UI",
"main": "index.js",
"keywords": [
"laravel",
"generator",
"ui"
],
"license": "Apache-2.0",
"repository": "git@github.com:tanhongit/laravel-generator-ui.git",
"authors": [
{
"name": "Tan Nguyen",
"email": "tannp27@gmail.com",
"homepage": "https://tanhongit.com"
}
],
"dependencies": {
"acorn": "^8.8.2",
"mini-css-extract-plugin": "^2.7.3",
"postcss": "^8.4.21",
"style-loader": "^3.3.1",
"svgo-loader": "^4.0.0"
},
"devDependencies": {
"@babel/core": "^7.21.0",
"@babel/preset-env": "^7.20.2",
"autoprefixer": "^10.4.14",
"eslint-parser": "^8.0.11",
"babel-loader": "^9.1.2",
"css-loader": "^6.7.3",
"css-minimizer-webpack-plugin": "^4.2.2",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.7.0",
"eslint-webpack-plugin": "^4.0.0",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "^4.2.1",
"expose-loader": "^4.1.0",
"postcss-loader": "^7.0.2",
"prettier": "^2.8.4",
"sass": "^1.42.1",
"sass-loader": "^12.1.0",
"stylelint": "^13.13.1",
"stylelint-declaration-use-variable": "^1.7.3",
"stylelint-prettier": "^1.2.0",
"stylelint-webpack-plugin": "^4.1.0",
"webpack": "^5.76.1",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.11.1",
"terser-webpack-plugin": "^5.3.7"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "webpack -w --mode development",
"dev": "webpack --mode development --watch",
"build": "webpack --mode production"
},
"browserslist": [
"last 2 versions",
"ie >= 11"
]
}
Empty file added src/assets/css/style.css
Empty file.
Empty file added src/assets/js/script.js
Empty file.
87 changes: 87 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
const TerserPlugin = require("terser-webpack-plugin");

const config = {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build dist folder

entry: {
main: [
"./src/js/material-dashboard.js",
],
editor: {
import: [
// CSS
'./src/assets/css/style.css',

// JS
'./src/assets/js/script.js',
]
}
},
output: {
filename: "[name].js",
},
module: {
rules: [
{
test: /\.css$/,
use: [
{
loader: MiniCssExtractPlugin.loader,
options: {
publicPath: "",
},
},
{
loader: "css-loader",
},
{
loader: "postcss-loader",
},
],
},
{
test: /\.svg/,
type: "asset",
parser: {
dataUrlCondition: {
maxSize: 8192
}
},
use: 'svgo-loader'
},
{
test: /\.png|jpg|gif/,
type: "asset/resource",
},
],
},
externals: {
jquery: 'jQuery',
},
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
parallel: true,
terserOptions: {
ecma: 6,
},
}),
new CssMinimizerPlugin()],
},

plugins: [
/*new StylelintPlugin({
files: ["./!**!/!*.{scss,sass}"],
fix: true,
}),*/
new MiniCssExtractPlugin(),
],
};
module.exports = (env, argv) => {
argv.mode === "development"
? (config.devtool = "eval-cheap-module-source-map")
: (config.devtool = "source-map");

return config;
};