Before acting

This commit is contained in:
2024-09-10 12:06:27 +02:00
parent 0c681bf4ff
commit e2892bad0b
91 changed files with 50 additions and 28293 deletions

View File

@@ -1 +1,2 @@
// Empty JS for your own code to be here
// Empty JS for your own code to be here

View File

@@ -5,83 +5,14 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 4, from LayoutIt!</title>
<title>Test</title>
<meta name="description" content="Source code generated using layoutit.com">
<meta name="author" content="LayoutIt!">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<meta name="author" content="SN">
<script src="js/bundle2.js"></script>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h3 class="text-center text-primary">
h3. Lorem ipsum dolor sit amet.
</h3>
</div>
</div>
<div class="row">
<div class="col-md-12">
<ul class="nav">
<li class="nav-item">
<a class="nav-link active" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Profile</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#">Messages</a>
</li>
<li class="nav-item dropdown ml-md-auto">
<a class="nav-link dropdown-toggle" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown">Dropdown link</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="#">Action</a> <a class="dropdown-item" href="#">Another action</a> <a class="dropdown-item" href="#">Something else here</a>
<div class="dropdown-divider">
</div> <a class="dropdown-item" href="#">Separated link</a>
</div>
</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-md-12">
<a id="modal-130270" href="#modal-container-130270" role="button" class="btn" data-toggle="modal">Launch demo modal</a>
<div class="modal fade" id="modal-container-130270" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="myModalLabel">
Modal title
</h5>
<button type="button" class="close" data-dismiss="modal">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">
Save changes
</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">
Close
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<a href='#' onClick='window.Launch();'>Bouton</a>
</body>
</html>

View File

@@ -1,365 +0,0 @@
/**
* loadMain is the main page load
*/
function loadMain()
{
var token;
token = getCookie('aduc');
if( token == "" )
{
console.log('No cookie defined');
displayLogin();
} else {
console.log("Cookie "+token);
}
}
/**
* setCookie : set a cookie
*
* @param {*} cname Cookie's name to set
* @param {*} cvalue Cookie's value
* @param {*} timeOut Cookie's expiration in seconds
*/
function setCookie(cname, cvalue, timeOut)
{
var d = new Date();
d.setTime(d.getTime() + (timeOut*1000));
var expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
/**
* getCookie get cookie's content
*
* @param {*} cname Cookie's name
* @returns
*/
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
/**
*
* @param {*} cname
*/
function delCookie( cname )
{
document.cookie = cname + "=;expires=Thu, 01 Jan 1970 00:00:01 GMT";
}
/**
* displayLogin : display login screen
*/
function displayLogin()
{
$('#popup-header').html("<h5>Login</h5>");
$('#popup-body').html(getLoginForm());
$('#popup-footer').css('display','block');
$('#popup-footer').html(getLoginFooter());
$('#popup').modal('show');
}
/**
*
* @returns string
*/
function getLoginForm()
{
var ret;
ret = "<div class='form-group'>\n";
ret += " <label for='sInputEmail'>Account (email form)</label>\n";
ret += " <div class='fx-relay-email-input-wrapper'>\n";
ret += " <input type='email' class='form-control' id='sInputEmail' />\n";
ret += " </div>\n";
ret += "</div>";
ret += "<div class='form-group'>\n";
ret += " <label for='sInputPassword'>Password</label>\n";
ret += " <input type='password' class='form-control' id='sInputPassword' />\n";
ret += "</div>";
return ret;
}
/**
*
* @returns
*/
function getLoginFooter()
{
var ret='';
ret += '<button type="button" class="btn btn-primary" onClick="tryConnect();" id="cnxButton">Connect</button>';
ret += "<div class='alert alert-danger' style='display: none; margin-top: 5px' id='loginAlert'>";
ret += "<h4>Compte ou login invalide</h4></div>";
return ret;
}
/**
*
* @returns
*/
function tryConnect()
{
var sEmail, sPassword, sAction;
// $('#cnxButton').fadeOut();
console.log('try to connect');
sEmail = document.getElementById("sInputEmail").value;
sPassword = document.getElementById("sInputPassword").value;
if( sPassword == "" ){
return;
}
if( sEmail == "" ){
return;
}
var oData = { Action: 'validLogin', Email: ""+sEmail, Password: ""+sPassword };
// Ask server
$.post("src/ajax.php",oData, function (data, status){
if( status != "success"){
alert('error');
}
if( data.Errno == -1){
//$('#loginAlert').css('display','block');
$('#loginAlert').fadeIn();
setTimeout( function() {$('#loginAlert').fadeOut();} ,3000);
} else {
$('#popup').modal('hide');
$('#navbar').css('display','flex');
$('#jsTree').css('display','block');
initJsTree();
$("#jsTree").on('select_node.jstree', function(e,data){
//alert('Selected');
//var id = $("#jsTree").jstree(true).get_node($(this)).id;
var id = atob(data.node.id);
console.log("ID : "+ id);
console.log("Type : "+ data.node.type);
switch( data.node.type )
{
case 'root':
displayRoot();
break;
}
});
}
});
}
/**
* Exit program (logout)
*
*/
function Quit()
{
delCookie("aduc");
document.location = "/index.php";
}
function doLdap()
{
document.location = "/ldap.php";
}
function doRedis()
{
document.location = "/redis.php";
}
/**
* initJsTree
*/
function initJsTree()
{
$('#jsTree')
.jstree({
'core' : {
"check_callback" : true,
'data' : {
'url' : 'src/ajax.php?Action=get_node',
'data' : function (node) {
console.log(node.id);
return { 'id' : node.id };
}
},
"themes" : {
"variant" : "large"
}
},
'contextmenu' : {
'items' : function(node) {
return contextMenu(node);
}
},
"types" : {
"#" : {
"max_children" : 1,
"max_depth" : 4,
"valid_children" : ["root"]
},
"root" : {
"icon" : "./src/assets/global.png",
"valid_children" : ["default"]
},
"Organizational-Unit" : {
"icon" : "./src/assets/folder-blue.png",
"valid_children" : ["default","file"]
},
"Container" : {
"icon" : "./src/assets/folder-blue.png"
},
"Builtin-Domain" : {
"icon" : "./src/assets/folder-blue.png",
"valid_children" : []
},
"Foreign-Security-Principal" : {
"icon" : "./src/assets/key.png"
},
"Group": {
"icon" : "./src/assets/users-icon.png",
},
"Computer": {
"icon" : "./src/assets/computer.png",
},
"Person": {
"icon" : "./src/assets/User.png"
},
"Physical-Location": {
"icon" : "./src/assets/building.png"
},
},
"plugins" : ["contextmenu","dnd","search","types"]
});
}
/**
* contextMenu
*/
function contextMenu(node)
{
console.log(node);
var tmp = $.jstree.defaults.contextmenu.items();
console.log(tmp);
delete tmp.create.action;
switch(node.type)
{
case 'root':
var tmp;
tmp = {
"create": {
"label": "Nouvelle entité",
"action": function(data){
console.log(data);
addEntity();
}
}
}
return tmp;
}
if(node.type === "demo") {
tmp = { 'create': {
"label": "Ajouter"
}};
return tmp;
}
tmp.create.label = "Ajouter";
tmp.create.submenu = {
"create_folder" : {
"separator_after" : true,
"label" : "Utilisateur",
"action" : function (data) {
// console.log(data);
alert('Ajout user');
}
},
"create_file" : {
"label" : "Machine",
"action" : function (data) {
alert('Machine');
}
}
};
return tmp;
}
// https://www.jstree.com/demo/
/**
* addEntity
*/
function addEntity()
{
alert("Ajout d'une entité");
}
/**
* displayRoot : display root screen
*/
function displayRoot()
{
var Header='';
Header = "<h5 class='modal-title' id='popup-title'>Root</h5>";
Header += "<button type='button' class='close' data-dismiss='modal'>";
Header += "<span aria-hidden='true'>×</span>";
Header += "</button>";
$('#popup-header').html(Header);
$('#popup-body').html(getRootForm());
$('#popup-footer').css('display','block');
$('#popup-footer').html(getRootFooter());
$('#popup').modal('show');
}
/**
*
* @returns
*/
function getRootFooter()
{
var ret='';
ret += '<button type="button" class="btn btn-primary" onClick="SaveRoot();" id="cnxButton">Save</button>';
return ret;
}
/**
*
* @returns string
*/
function getRootForm()
{
var ret;
ret = "<div class='form-group'>\n";
ret += " <label for='sInputEmail'>Account (email form)</label>\n";
ret += " <div class='fx-relay-email-input-wrapper'>\n";
ret += " <input type='email' class='form-control' id='sInputEmail' />\n";
ret += " </div>\n";
ret += "</div>";
ret += "<div class='form-group'>\n";
ret += " <label for='sInputPassword'>Password</label>\n";
ret += " <input type='password' class='form-control' id='sInputPassword' />\n";
ret += "</div>";
return ret;
}

View File

@@ -39,12 +39,9 @@
<meta http-equiv="expires" content="0">
<script src="vendor/components/jqueryui/jquery-ui.js"></script>
<!-- <script src="https://kit.fontawesome.com/c9a8327197.js" crossorigin="anonymous"></script> -->
<script src="src/javascript/main.js"></script>
{* <link href="src/css/contextMenu.css" rel="stylesheet" type="text/css" /> *}
<script src="js/bundle.js"></script>
<script src="js/scripts.js"></script>
{* <script src="src/app.js"></script> *}
<link href="src/css/contextFonts.css" rel="stylesheet" type="text/css" />
</head>

View File

@@ -1,6 +1,6 @@
{include file='header.smarty'}
<body onLoad='loadMain();'>
<body onLoad='window.loadMain();'>
<div class="container-fluid">
<div class="row">
@@ -16,13 +16,13 @@
<ul class="nav" id="navbar" style="display: none"> <!-- display: flex -->
<li class="nav-item"><a class="nav-link" href="#" onClick='Quit();' id='Logout'>D&eacute;connection</a></li>
<li class="nav-item">
<a class="nav-link" href="#">Profile</a>
<a class="nav-link" href="#" onClick='loadMain();'>Profile</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#">Messages</a>
</li>
<li class="nav-item dropdown ml-md-auto">
<a class="nav-link dropdown-toggle" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown">Dropdown link</a>
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown">Dropdown link</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="#">Action</a> <a class="dropdown-item" href="#">Another action</a> <a class="dropdown-item" href="#">Something else here</a>
<div class="dropdown-divider">

Submodule Sources/webAduc/www/src/tmp/jstree-php-demos deleted from 35dcdd7a4f

View File

@@ -1,90 +0,0 @@
<?php
/* Smarty version 3.1.39, created on 2021-03-19 10:53:34
from '/var/www/html/src/templates/header.smarty' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.39',
'unifunc' => 'content_605482aea0d219_05324795',
'has_nocache_code' => false,
'file_dependency' =>
array (
'18b287ea8111ec650808fcf2a53c64382bec01db' =>
array (
0 => '/var/www/html/src/templates/header.smarty',
1 => 1616151208,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_605482aea0d219_05324795 (Smarty_Internal_Template $_smarty_tpl) {
?><!DOCTYPE html>
<html lang="fr">
<head>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- favicon -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<title><?php echo $_smarty_tpl->tpl_vars['Title']->value;?>
</title>
<!-- Style -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- Javascript -->
<?php echo '<script'; ?>
src="js/jquery.min.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
src="js/bootstrap.min.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
src="js/scripts.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
src="js/jstree.min.js"><?php echo '</script'; ?>
>
<link href="css/jstree.min.css" rel="stylesheet">
<link href="src/css/style.css" rel="stylesheet">
<meta name="generator" content="Hand Made" >
<meta name="author" content="Serge NOEL" >
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8">
<meta http-equiv="expires" content="0">
<?php echo '<script'; ?>
src="vendor/components/jqueryui/jquery-ui.js"><?php echo '</script'; ?>
>
<!-- <?php echo '<script'; ?>
src="https://kit.fontawesome.com/c9a8327197.js" crossorigin="anonymous"><?php echo '</script'; ?>
> -->
<?php echo '<script'; ?>
src="src/javascript/main.js"><?php echo '</script'; ?>
>
<link href="src/css/contextFonts.css" rel="stylesheet" type="text/css" />
</head><?php }
}

View File

@@ -1,103 +0,0 @@
<?php
/* Smarty version 3.1.39, created on 2021-03-16 14:51:07
from '/var/www/html/src/templates/login.smarty' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.39',
'unifunc' => 'content_6050c5db7141d3_53029972',
'has_nocache_code' => false,
'file_dependency' =>
array (
'67f35703943bebaeb4ff84b4beabe1bba1b1e700' =>
array (
0 => '/var/www/html/src/templates/login.smarty',
1 => 1613681193,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_6050c5db7141d3_53029972 (Smarty_Internal_Template $_smarty_tpl) {
?><!DOCTYPE html>
<html lang="fr">
<head>
<!-- favicon -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo $_smarty_tpl->tpl_vars['Title']->value;?>
</title>
<meta name="description" content="Gestion annuaire">
<meta name="author" content="Serge NOEL">
<link href="vendor/twbs/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<?php echo '<script'; ?>
src="vendor/components/jquery/jquery.js" type="text/javascript"><?php echo '</script'; ?>
>
<link href="src/css/login.css" rel="stylesheet">
</head>
<?php if ((isset($_smarty_tpl->tpl_vars['error']->value))) {?>
<body onload="onLoad();">
<?php } else { ?>
<body >
<?php }?>
<div class="container">
<div style="float: left"></div>
<div id="loginbox" class="mainbox col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3">
<div class="panel panel-default panel-login">
<div class="panel-heading">
<h2 class="panel-title text-center">AD Access</h2>
</div>
<div class="panel-body" >
<form name="form" id="form" class="form-horizontal" enctype="multipart/form-data" method="POST" action='index.php'>
<img src="src/assets/Favicon.png" class="logo" alt="Logo">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input name="sLogin" id="sLogin" type="text" class="form-control" value="" placeholder="User">
</div>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="sPassword" type="password" class="form-control" name="sPassword" placeholder="Password">
</div>
<div class="form-group">
<!-- Button -->
<div class="col-sm-12 controls">
<button type="submit" href="#" class="btn btn-primary pull-right"><i class="glyphicon glyphicon-log-in"></i> Log in</button>
</div>
</div>
<input type='hidden' id='Action' name='Action' value='tryLogin' />
</form>
</div>
</div>
</div>
<?php if ((isset($_smarty_tpl->tpl_vars['error']->value))) {?>
<div class="col-md-12">&nbsp;</div>
<div class="col-md-12" id='bAlert'>
<div class="alert alert-dismissable alert-danger">
<h4><?php echo $_smarty_tpl->tpl_vars['error']->value;?>
</h4>
</div>
</div>
<?php }?>
</div>
<?php echo '<script'; ?>
type='text/javascript'>
<?php echo '</script'; ?>
>
</body>
</html><?php }
}

View File

@@ -1,28 +0,0 @@
<?php
/* Smarty version 3.1.39, created on 2021-03-16 14:53:59
from '/var/www/html/src/templates/footer.smarty' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.39',
'unifunc' => 'content_6050c6872dd538_14018225',
'has_nocache_code' => false,
'file_dependency' =>
array (
'91e36af2f79b43b7dd543e53cf49767e090eab17' =>
array (
0 => '/var/www/html/src/templates/footer.smarty',
1 => 1613299086,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_6050c6872dd538_14018225 (Smarty_Internal_Template $_smarty_tpl) {
?>
</body>
</html><?php }
}

View File

@@ -1,150 +0,0 @@
<?php
/* Smarty version 3.1.39, created on 2021-03-19 11:18:17
from '/var/www/html/src/templates/main.smarty' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.39',
'unifunc' => 'content_6054887911bbe2_81020750',
'has_nocache_code' => false,
'file_dependency' =>
array (
'e7a5f2111aabf5c11bacdc23864f165ab8fd0aa0' =>
array (
0 => '/var/www/html/src/templates/main.smarty',
1 => 1616152674,
2 => 'file',
),
),
'includes' =>
array (
'file:header.smarty' => 1,
),
),false)) {
function content_6054887911bbe2_81020750 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_subTemplateRender('file:header.smarty', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>
<body onLoad='loadMain();'>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h3 class="text-center text-primary">
<?php echo $_smarty_tpl->tpl_vars['Title']->value;?>
</h3>
</div>
</div>
<!-- Navbar -->
<div class="row">
<div class="col-md-12">
<ul class="nav" id="navbar" style="display: none"> <!-- display: flex -->
<li class="nav-item"><a class="nav-link" href="#" onClick='Quit();' id='Logout'>D&eacute;connection</a></li>
<li class="nav-item">
<a class="nav-link" href="#">Profile</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#">Messages</a>
</li>
<li class="nav-item dropdown ml-md-auto">
<a class="nav-link dropdown-toggle" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown">Dropdown link</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="#">Action</a> <a class="dropdown-item" href="#">Another action</a> <a class="dropdown-item" href="#">Something else here</a>
<div class="dropdown-divider">
</div> <a class="dropdown-item" href="#">Separated link</a>
</div>
</li>
</ul>
</div>
</div>
<!-- Main content -->
<div class="col-md-12" id='jsTree' style="display: none;"></div>
<div class="row">
<div class="col-md-12">
<!-- Boîte modale de type Popup -->
<div class="modal fade" id="popup" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header" id="popup-header">
<h5 class="modal-title" id="popup-title"></h5>
<button type="button" class="close" data-dismiss="modal">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body" id="popup-body">
</div>
<div class="modal-footer" id="popup-footer">
</div>
</div>
</div>
</div>
<!-- /Boîte modale de type Popup -->
<!-- Boîte d'affichage d'erreur -->
<div class="col-md-12">&nbsp;</div>
<div class="col-md-12" id='bAlert' style='display: none'>
<div class="alert alert-dismissable alert-danger">
<h4 id='alertMsg'>ERREUR:</h4>
</div>
</div>
<!-- /Boîte d'affichage d'erreur -->
</div>
</div>
</div>
</body>
</html>
<?php }
}

0
Sources/webAduc/www/vendor/components/jqueryui/jquery-ui.min.js vendored Normal file → Executable file
View File

0
Sources/webAduc/www/vendor/components/jqueryui/ui/.jshintrc vendored Executable file → Normal file
View File

View File

@@ -1,23 +1,34 @@
// webpack.config.js
// // webpack.config.js
'use strict';
// 'use strict';
const path = require( 'path' );
// const path = require( 'path' );
module.exports = {
// https://webpack.js.org/configuration/entry-context/
entry: './www/src/app.js',
// module.exports = {
// // https://webpack.js.org/configuration/entry-context/
// entry: './www/src/app.js',
// https://webpack.js.org/configuration/output/
output: {
path: path.resolve( __dirname, './www/assets/js' ),
filename: 'bundle.js'
},
// // https://webpack.js.org/configuration/output/
// output: {
// path: path.join(__dirname, "./www/js"),
// // path: path.resolve( './www/js' ),
// filename: 'bundle.js'
// },
// Useful for debugging.
devtool: 'source-map',
// By default webpack logs warnings if the bundle is bigger than 200kb.
performance: { hints: false }
}
// // Useful for debugging.
// devtool: 'source-map',
// // By default webpack logs warnings if the bundle is bigger than 200kb.
// performance: { hints: false }
// }
const path = require('path');
module.exports = {
entry: './src/app.js',
output: {
path: path.resolve(__dirname, './js'),
filename: 'bundle.js',
},
};