mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2024-12-26 22:30:44 -05:00
feat: module added
This commit is contained in:
parent
8d2c9f4bed
commit
051c7e2ad5
5 changed files with 2277 additions and 3 deletions
2231
restaurant/package-lock.json
generated
2231
restaurant/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -4,14 +4,19 @@
|
||||||
"description": "",
|
"description": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"watch": "webpack --watch",
|
||||||
|
"start": "webpack serve --open",
|
||||||
|
"build": "webpack"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"html-webpack-plugin": "^5.5.4",
|
"html-webpack-plugin": "^5.5.4",
|
||||||
|
"inline-source-map": "^0.6.2",
|
||||||
"webpack": "^5.89.0",
|
"webpack": "^5.89.0",
|
||||||
"webpack-cli": "^5.1.4"
|
"webpack-cli": "^5.1.4",
|
||||||
|
"webpack-dev-server": "^4.15.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
function component(){
|
||||||
|
const element = document.createElement('div');
|
||||||
|
|
||||||
|
element.textContent = 'Testing';
|
||||||
|
|
||||||
|
return element;
|
||||||
|
}
|
||||||
|
|
||||||
|
document.body.appendChild(component());
|
9
restaurant/src/menu.js
Normal file
9
restaurant/src/menu.js
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
function menuBar() {
|
||||||
|
const items = [
|
||||||
|
"home",
|
||||||
|
"menu",
|
||||||
|
"contact"
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,2 +1,24 @@
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
mode: 'development',
|
||||||
|
entry: {
|
||||||
|
index: './src/index.js',
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new HtmlWebpackPlugin({
|
||||||
|
title: 'Restaurant - Dev',
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
output: {
|
||||||
|
filename: 'bundle.js',
|
||||||
|
path: path.resolve(__dirname, 'dist'),
|
||||||
|
clean: true,
|
||||||
|
},
|
||||||
|
devtool: 'inline-source-map',
|
||||||
|
devServer: {
|
||||||
|
static: './dist',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue