How to use __dirname method in ladle

Best JavaScript code snippet using ladle

test-x1-index.js

Source:test-x1-index.js Github

copy

Full Screen

1/* eslint-disable brace-style */2/* eslint-disable no-path-concat */3'use strict';4var fs = require('fs');5var path = require('path');6var windows = process.platform === 'win32';7var theRequireContentA = './test-z-asset-A.css';8var theRequireContentB = 'test-z-asset-B.css';9function firstLowerCase (s) {10 return s.slice(0, 1).toLowerCase() + s.slice(1);11}12function firstUpperCase (s) {13 return s.slice(0, 1).toUpperCase() + s.slice(1);14}15console.log([16 fs.readFileSync(path.join(__dirname, theRequireContentA)),17 fs.readFileSync(__dirname + path.sep + theRequireContentB),18 fs.readFileSync(__dirname + '/' + theRequireContentB),19 windows ? fs.readFileSync(__dirname + '/\\' + theRequireContentB) : '',20 windows ? fs.readFileSync(__dirname + '\\' + theRequireContentB) : '',21 windows ? fs.readFileSync(__dirname + '\\/' + theRequireContentB) : '',22 fs.readFileSync(firstLowerCase(path.join(__dirname, theRequireContentA))),23 fs.readFileSync(firstLowerCase(__dirname + path.sep + theRequireContentB)),24 fs.readFileSync(firstLowerCase(__dirname + '/' + theRequireContentB)),25 windows ? fs.readFileSync(firstLowerCase(__dirname + '/\\' + theRequireContentB)) : '',26 windows ? fs.readFileSync(firstLowerCase(__dirname + '\\' + theRequireContentB)) : '',27 windows ? fs.readFileSync(firstLowerCase(__dirname + '\\/' + theRequireContentB)) : '',28 fs.readFileSync(firstUpperCase(path.join(__dirname, theRequireContentA))),29 fs.readFileSync(firstUpperCase(__dirname + path.sep + theRequireContentB)),30 fs.readFileSync(firstUpperCase(__dirname + '/' + theRequireContentB)),31 windows ? fs.readFileSync(firstUpperCase(__dirname + '/\\' + theRequireContentB)) : '',32 windows ? fs.readFileSync(firstUpperCase(__dirname + '\\' + theRequireContentB)) : '',33 windows ? fs.readFileSync(firstUpperCase(__dirname + '\\/' + theRequireContentB)) : '',34 //35 fs.readdirSync(__dirname).length > 0,36 fs.readdirSync(path.dirname(__dirname)).length > 0,37 fs.readdirSync(path.dirname(path.dirname(__dirname))).length > 0,38 fs.readdirSync(firstLowerCase(__dirname)).length > 0,39 fs.readdirSync(firstLowerCase(path.dirname(__dirname))).length > 0,40 fs.readdirSync(firstLowerCase(path.dirname(path.dirname(__dirname)))).length > 0,41 fs.readdirSync(firstUpperCase(__dirname)).length > 0,42 fs.readdirSync(firstUpperCase(path.dirname(__dirname))).length > 0,43 fs.readdirSync(firstUpperCase(path.dirname(path.dirname(__dirname)))).length > 0,44 //45 fs.existsSync(path.join(__dirname, theRequireContentA)),46 fs.existsSync(__dirname + path.sep + theRequireContentB),47 fs.existsSync(__dirname + '/' + theRequireContentB),48 windows ? fs.existsSync(__dirname + '/\\' + theRequireContentB) : '',49 windows ? fs.existsSync(__dirname + '\\' + theRequireContentB) : '',50 windows ? fs.existsSync(__dirname + '\\/' + theRequireContentB) : '',51 fs.existsSync(firstLowerCase(path.join(__dirname, theRequireContentA))),52 fs.existsSync(firstLowerCase(__dirname + path.sep + theRequireContentB)),53 fs.existsSync(firstLowerCase(__dirname + '/' + theRequireContentB)),54 windows ? fs.existsSync(firstLowerCase(__dirname + '/\\' + theRequireContentB)) : '',55 windows ? fs.existsSync(firstLowerCase(__dirname + '\\' + theRequireContentB)) : '',56 windows ? fs.existsSync(firstLowerCase(__dirname + '\\/' + theRequireContentB)) : '',57 fs.existsSync(firstUpperCase(path.join(__dirname, theRequireContentA))),58 fs.existsSync(firstUpperCase(__dirname + path.sep + theRequireContentB)),59 fs.existsSync(firstUpperCase(__dirname + '/' + theRequireContentB)),60 windows ? fs.existsSync(firstUpperCase(__dirname + '/\\' + theRequireContentB)) : '',61 windows ? fs.existsSync(firstUpperCase(__dirname + '\\' + theRequireContentB)) : '',62 windows ? fs.existsSync(firstUpperCase(__dirname + '\\/' + theRequireContentB)) : '',63 //64 fs.existsSync(path.join(__dirname, theRequireContentA + '-no-such')),65 fs.existsSync(__dirname + path.sep + theRequireContentB + '-no-such'),66 fs.existsSync(__dirname + '/' + theRequireContentB + '-no-such'),67 windows ? fs.existsSync(__dirname + '/\\' + theRequireContentB + '-no-such') : '',68 windows ? fs.existsSync(__dirname + '\\' + theRequireContentB + '-no-such') : '',69 windows ? fs.existsSync(__dirname + '\\/' + theRequireContentB + '-no-such') : '',70 fs.existsSync(firstLowerCase(path.join(__dirname, theRequireContentA + '-no-such'))),71 fs.existsSync(firstLowerCase(__dirname + path.sep + theRequireContentB + '-no-such')),72 fs.existsSync(firstLowerCase(__dirname + '/' + theRequireContentB + '-no-such')),73 windows ? fs.existsSync(firstLowerCase(__dirname + '/\\' + theRequireContentB + '-no-such')) : '',74 windows ? fs.existsSync(firstLowerCase(__dirname + '\\' + theRequireContentB + '-no-such')) : '',75 windows ? fs.existsSync(firstLowerCase(__dirname + '\\/' + theRequireContentB + '-no-such')) : '',76 fs.existsSync(firstUpperCase(path.join(__dirname, theRequireContentA + '-no-such'))),77 fs.existsSync(firstUpperCase(__dirname + path.sep + theRequireContentB + '-no-such')),78 fs.existsSync(firstUpperCase(__dirname + '/' + theRequireContentB + '-no-such')),79 windows ? fs.existsSync(firstUpperCase(__dirname + '/\\' + theRequireContentB + '-no-such')) : '',80 windows ? fs.existsSync(firstUpperCase(__dirname + '\\' + theRequireContentB + '-no-such')) : '',81 windows ? fs.existsSync(firstUpperCase(__dirname + '\\/' + theRequireContentB + '-no-such')) : '',82 //83 fs.accessSync(path.join(__dirname, theRequireContentA)),84 fs.accessSync(__dirname + path.sep + theRequireContentB),85 fs.accessSync(__dirname + '/' + theRequireContentB),86 windows ? fs.accessSync(__dirname + '/\\' + theRequireContentB) : '',87 windows ? fs.accessSync(__dirname + '\\' + theRequireContentB) : '',88 windows ? fs.accessSync(__dirname + '\\/' + theRequireContentB) : '',89 fs.accessSync(firstLowerCase(path.join(__dirname, theRequireContentA))),90 fs.accessSync(firstLowerCase(__dirname + path.sep + theRequireContentB)),91 fs.accessSync(firstLowerCase(__dirname + '/' + theRequireContentB)),92 windows ? fs.accessSync(firstLowerCase(__dirname + '/\\' + theRequireContentB)) : '',93 windows ? fs.accessSync(firstLowerCase(__dirname + '\\' + theRequireContentB)) : '',94 windows ? fs.accessSync(firstLowerCase(__dirname + '\\/' + theRequireContentB)) : '',95 fs.accessSync(firstUpperCase(path.join(__dirname, theRequireContentA))),96 fs.accessSync(firstUpperCase(__dirname + path.sep + theRequireContentB)),97 fs.accessSync(firstUpperCase(__dirname + '/' + theRequireContentB)),98 windows ? fs.accessSync(firstUpperCase(__dirname + '/\\' + theRequireContentB)) : '',99 windows ? fs.accessSync(firstUpperCase(__dirname + '\\' + theRequireContentB)) : '',100 windows ? fs.accessSync(firstUpperCase(__dirname + '\\/' + theRequireContentB)) : '',101 //102 fs.statSync(path.join(__dirname, theRequireContentA)).mode,103 fs.statSync(__dirname + path.sep + theRequireContentB).mode,104 fs.statSync(__dirname + '/' + theRequireContentB).mode,105 windows ? fs.statSync(__dirname + '/\\' + theRequireContentB).mode : '',106 windows ? fs.statSync(__dirname + '\\' + theRequireContentB).mode : '',107 windows ? fs.statSync(__dirname + '\\/' + theRequireContentB).mode : '',108 fs.statSync(firstLowerCase(path.join(__dirname, theRequireContentA))).mode,109 fs.statSync(firstLowerCase(__dirname + path.sep + theRequireContentB)).mode,110 fs.statSync(firstLowerCase(__dirname + '/' + theRequireContentB)).mode,111 windows ? fs.statSync(firstLowerCase(__dirname + '/\\' + theRequireContentB)).mode : '',112 windows ? fs.statSync(firstLowerCase(__dirname + '\\' + theRequireContentB)).mode : '',113 windows ? fs.statSync(firstLowerCase(__dirname + '\\/' + theRequireContentB)).mode : '',114 fs.statSync(firstUpperCase(path.join(__dirname, theRequireContentA))).mode,115 fs.statSync(firstUpperCase(__dirname + path.sep + theRequireContentB)).mode,116 fs.statSync(firstUpperCase(__dirname + '/' + theRequireContentB)).mode,117 windows ? fs.statSync(firstUpperCase(__dirname + '/\\' + theRequireContentB)).mode : '',118 windows ? fs.statSync(firstUpperCase(__dirname + '\\' + theRequireContentB)).mode : '',119 windows ? fs.statSync(firstUpperCase(__dirname + '\\/' + theRequireContentB)).mode : '',120 //121 fs.statSync(path.join(__dirname, theRequireContentA)).birthtime.getYear(),122 fs.statSync(__dirname + path.sep + theRequireContentB).birthtime.getYear(),123 fs.statSync(__dirname + '/' + theRequireContentB).birthtime.getYear(),124 windows ? fs.statSync(__dirname + '/\\' + theRequireContentB).birthtime.getYear() : '',125 windows ? fs.statSync(__dirname + '\\' + theRequireContentB).birthtime.getYear() : '',126 windows ? fs.statSync(__dirname + '\\/' + theRequireContentB).birthtime.getYear() : '',127 fs.statSync(firstLowerCase(path.join(__dirname, theRequireContentA))).birthtime.getYear(),128 fs.statSync(firstLowerCase(__dirname + path.sep + theRequireContentB)).birthtime.getYear(),129 fs.statSync(firstLowerCase(__dirname + '/' + theRequireContentB)).birthtime.getYear(),130 windows ? fs.statSync(firstLowerCase(__dirname + '/\\' + theRequireContentB)).birthtime.getYear() : '',131 windows ? fs.statSync(firstLowerCase(__dirname + '\\' + theRequireContentB)).birthtime.getYear() : '',132 windows ? fs.statSync(firstLowerCase(__dirname + '\\/' + theRequireContentB)).birthtime.getYear() : '',133 fs.statSync(firstUpperCase(path.join(__dirname, theRequireContentA))).birthtime.getYear(),134 fs.statSync(firstUpperCase(__dirname + path.sep + theRequireContentB)).birthtime.getYear(),135 fs.statSync(firstUpperCase(__dirname + '/' + theRequireContentB)).birthtime.getYear(),136 windows ? fs.statSync(firstUpperCase(__dirname + '/\\' + theRequireContentB)).birthtime.getYear() : '',137 windows ? fs.statSync(firstUpperCase(__dirname + '\\' + theRequireContentB)).birthtime.getYear() : '',138 windows ? fs.statSync(firstUpperCase(__dirname + '\\/' + theRequireContentB)).birthtime.getYear() : '',139 //140 fs.statSync(path.join(__dirname, theRequireContentA)).isFile(),141 fs.statSync(__dirname + path.sep + theRequireContentB).isFile(),142 fs.statSync(__dirname + '/' + theRequireContentB).isFile(),143 windows ? fs.statSync(__dirname + '/\\' + theRequireContentB).isFile() : '',144 windows ? fs.statSync(__dirname + '\\' + theRequireContentB).isFile() : '',145 windows ? fs.statSync(__dirname + '\\/' + theRequireContentB).isFile() : '',146 fs.statSync(firstLowerCase(path.join(__dirname, theRequireContentA))).isFile(),147 fs.statSync(firstLowerCase(__dirname + path.sep + theRequireContentB)).isFile(),148 fs.statSync(firstLowerCase(__dirname + '/' + theRequireContentB)).isFile(),149 windows ? fs.statSync(firstLowerCase(__dirname + '/\\' + theRequireContentB)).isFile() : '',150 windows ? fs.statSync(firstLowerCase(__dirname + '\\' + theRequireContentB)).isFile() : '',151 windows ? fs.statSync(firstLowerCase(__dirname + '\\/' + theRequireContentB)).isFile() : '',152 fs.statSync(firstUpperCase(path.join(__dirname, theRequireContentA))).isFile(),153 fs.statSync(firstUpperCase(__dirname + path.sep + theRequireContentB)).isFile(),154 fs.statSync(firstUpperCase(__dirname + '/' + theRequireContentB)).isFile(),155 windows ? fs.statSync(firstUpperCase(__dirname + '/\\' + theRequireContentB)).isFile() : '',156 windows ? fs.statSync(firstUpperCase(__dirname + '\\' + theRequireContentB)).isFile() : '',157 windows ? fs.statSync(firstUpperCase(__dirname + '\\/' + theRequireContentB)).isFile() : '',158 //159 fs.statSync(path.join(__dirname, theRequireContentA)).isDirectory(),160 fs.statSync(__dirname + path.sep + theRequireContentB).isDirectory(),161 fs.statSync(__dirname + '/' + theRequireContentB).isDirectory(),162 windows ? fs.statSync(__dirname + '/\\' + theRequireContentB).isDirectory() : '',163 windows ? fs.statSync(__dirname + '\\' + theRequireContentB).isDirectory() : '',164 windows ? fs.statSync(__dirname + '\\/' + theRequireContentB).isDirectory() : '',165 fs.statSync(firstLowerCase(path.join(__dirname, theRequireContentA))).isDirectory(),166 fs.statSync(firstLowerCase(__dirname + path.sep + theRequireContentB)).isDirectory(),167 fs.statSync(firstLowerCase(__dirname + '/' + theRequireContentB)).isDirectory(),168 windows ? fs.statSync(firstLowerCase(__dirname + '/\\' + theRequireContentB)).isDirectory() : '',169 windows ? fs.statSync(firstLowerCase(__dirname + '\\' + theRequireContentB)).isDirectory() : '',170 windows ? fs.statSync(firstLowerCase(__dirname + '\\/' + theRequireContentB)).isDirectory() : '',171 fs.statSync(firstUpperCase(path.join(__dirname, theRequireContentA))).isDirectory(),172 fs.statSync(firstUpperCase(__dirname + path.sep + theRequireContentB)).isDirectory(),173 fs.statSync(firstUpperCase(__dirname + '/' + theRequireContentB)).isDirectory(),174 windows ? fs.statSync(firstUpperCase(__dirname + '/\\' + theRequireContentB)).isDirectory() : '',175 windows ? fs.statSync(firstUpperCase(__dirname + '\\' + theRequireContentB)).isDirectory() : '',176 windows ? fs.statSync(firstUpperCase(__dirname + '\\/' + theRequireContentB)).isDirectory() : '',177 //178 fs.lstatSync(path.join(__dirname, theRequireContentA)).mode,179 fs.lstatSync(__dirname + path.sep + theRequireContentB).mode,180 fs.lstatSync(__dirname + '/' + theRequireContentB).mode,181 windows ? fs.lstatSync(__dirname + '/\\' + theRequireContentB).mode : '',182 windows ? fs.lstatSync(__dirname + '\\' + theRequireContentB).mode : '',183 windows ? fs.lstatSync(__dirname + '\\/' + theRequireContentB).mode : '',184 fs.lstatSync(firstLowerCase(path.join(__dirname, theRequireContentA))).mode,185 fs.lstatSync(firstLowerCase(__dirname + path.sep + theRequireContentB)).mode,186 fs.lstatSync(firstLowerCase(__dirname + '/' + theRequireContentB)).mode,187 windows ? fs.lstatSync(firstLowerCase(__dirname + '/\\' + theRequireContentB)).mode : '',188 windows ? fs.lstatSync(firstLowerCase(__dirname + '\\' + theRequireContentB)).mode : '',189 windows ? fs.lstatSync(firstLowerCase(__dirname + '\\/' + theRequireContentB)).mode : '',190 fs.lstatSync(firstUpperCase(path.join(__dirname, theRequireContentA))).mode,191 fs.lstatSync(firstUpperCase(__dirname + path.sep + theRequireContentB)).mode,192 fs.lstatSync(firstUpperCase(__dirname + '/' + theRequireContentB)).mode,193 windows ? fs.lstatSync(firstUpperCase(__dirname + '/\\' + theRequireContentB)).mode : '',194 windows ? fs.lstatSync(firstUpperCase(__dirname + '\\' + theRequireContentB)).mode : '',195 windows ? fs.lstatSync(firstUpperCase(__dirname + '\\/' + theRequireContentB)).mode : '',196 //197 fs.realpathSync(path.join(__dirname, theRequireContentA)).mode,198 fs.realpathSync(__dirname + path.sep + theRequireContentB).mode,199 fs.realpathSync(__dirname + '/' + theRequireContentB).mode,200 windows ? fs.realpathSync(__dirname + '/\\' + theRequireContentB).mode : '',201 windows ? fs.realpathSync(__dirname + '\\' + theRequireContentB).mode : '',202 windows ? fs.realpathSync(__dirname + '\\/' + theRequireContentB).mode : '',203 fs.realpathSync(firstLowerCase(path.join(__dirname, theRequireContentA))).mode,204 fs.realpathSync(firstLowerCase(__dirname + path.sep + theRequireContentB)).mode,205 fs.realpathSync(firstLowerCase(__dirname + '/' + theRequireContentB)).mode,206 windows ? fs.realpathSync(firstLowerCase(__dirname + '/\\' + theRequireContentB)).mode : '',207 windows ? fs.realpathSync(firstLowerCase(__dirname + '\\' + theRequireContentB)).mode : '',208 windows ? fs.realpathSync(firstLowerCase(__dirname + '\\/' + theRequireContentB)).mode : '',209 fs.realpathSync(firstUpperCase(path.join(__dirname, theRequireContentA))).mode,210 fs.realpathSync(firstUpperCase(__dirname + path.sep + theRequireContentB)).mode,211 fs.realpathSync(firstUpperCase(__dirname + '/' + theRequireContentB)).mode,212 windows ? fs.realpathSync(firstUpperCase(__dirname + '/\\' + theRequireContentB)).mode : '',213 windows ? fs.realpathSync(firstUpperCase(__dirname + '\\' + theRequireContentB)).mode : '',214 windows ? fs.realpathSync(firstUpperCase(__dirname + '\\/' + theRequireContentB)).mode : ''...

Full Screen

Full Screen

index.ts

Source:index.ts Github

copy

Full Screen

1import { loadQueryFile } from "../utils";2export const queries = {3 blocks: {4 common: loadQueryFile(__dirname, "./blocks/common.sql"),5 count: loadQueryFile(__dirname, "./blocks/count.sql"),6 delete: loadQueryFile(__dirname, "./blocks/delete.sql"),7 findById: loadQueryFile(__dirname, "./blocks/find-by-id.sql"),8 findByHeight: loadQueryFile(__dirname, "./blocks/find-by-height.sql"),9 headers: loadQueryFile(__dirname, "./blocks/headers.sql"),10 heightRange: loadQueryFile(__dirname, "./blocks/height-range.sql"),11 latest: loadQueryFile(__dirname, "./blocks/latest.sql"),12 recent: loadQueryFile(__dirname, "./blocks/recent.sql"),13 statistics: loadQueryFile(__dirname, "./blocks/statistics.sql"),14 top: loadQueryFile(__dirname, "./blocks/top.sql"),15 },16 migrations: {17 create: loadQueryFile(__dirname, "./migrations/create.sql"),18 find: loadQueryFile(__dirname, "./migrations/find.sql"),19 },20 rounds: {21 delete: loadQueryFile(__dirname, "./rounds/delete.sql"),22 find: loadQueryFile(__dirname, "./rounds/find.sql"),23 },24 spv: {25 blockRewards: loadQueryFile(__dirname, "./spv/block-rewards.sql"),26 delegates: loadQueryFile(__dirname, "./spv/delegates.sql"),27 delegatesForgedBlocks: loadQueryFile(__dirname, "./spv/delegates-forged-blocks.sql"),28 delegatesRanks: loadQueryFile(__dirname, "./spv/delegates-ranks.sql"),29 lastForgedBlocks: loadQueryFile(__dirname, "./spv/last-forged-blocks.sql"),30 multiSignatures: loadQueryFile(__dirname, "./spv/multi-signatures.sql"),31 receivedTransactions: loadQueryFile(__dirname, "./spv/received-transactions.sql"),32 secondSignatures: loadQueryFile(__dirname, "./spv/second-signatures.sql"),33 sentTransactions: loadQueryFile(__dirname, "./spv/sent-transactions.sql"),34 votes: loadQueryFile(__dirname, "./spv/votes.sql"),35 },36 transactions: {37 findByBlock: loadQueryFile(__dirname, "./transactions/find-by-block.sql"),38 latestByBlock: loadQueryFile(__dirname, "./transactions/latest-by-block.sql"),39 latestByBlocks: loadQueryFile(__dirname, "./transactions/latest-by-blocks.sql"),40 statistics: loadQueryFile(__dirname, "./transactions/statistics.sql"),41 forged: loadQueryFile(__dirname, "./transactions/forged.sql"),42 findById: loadQueryFile(__dirname, "./transactions/find-by-id.sql"),43 deleteByBlock: loadQueryFile(__dirname, "./transactions/delete-by-block.sql"),44 },45 wallets: {46 all: loadQueryFile(__dirname, "./wallets/all.sql"),47 findByAddress: loadQueryFile(__dirname, "./wallets/find-by-address.sql"),48 findNegativeBalances: loadQueryFile(__dirname, "./wallets/find-negative-balances.sql"),49 findNegativeVoteBalances: loadQueryFile(__dirname, "./wallets/find-negative-vote-balances.sql"),50 },...

Full Screen

Full Screen

base.js

Source:base.js Github

copy

Full Screen

1/**2 * Created by Lxg on 2017/5/11.3 */4let path = require('path');5let webpack = require('webpack');6let CopyWebpackPlugin = require('copy-webpack-plugin');7let baseConfig = {8 entry: {9 index: './src/index.js'10 },11 output: {12 path: path.resolve(__dirname, '../dist'),13 filename: '[name].js',14 },15 resolve: {16 extensions: ['.js'],17 alias: {18 'src': path.resolve(__dirname, '../src'),19 'assets': path.resolve(__dirname, '../src/assets'),20 'components': path.resolve(__dirname, '../src/components'),21 'modules': path.resolve(__dirname, '../src/modules'),22 '/static': path.resolve(__dirname, '../static')23 }24 },25 module: {26 loaders: [27 {28 test: /\.html$/,29 loader: 'html-loader'30 },31 {32 test: /\.js$/,33 loader: 'babel-loader?presets[]=es2015',34 exclude: /node_modules/35 },36 {37 test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,38 loader: 'url-loader?limit=8192&name=../dist/images/[name].[hash:7].[ext]'39 },40 {41 test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,42 loader: 'url-loader?limit=8192&name=../dist/fonts/[name].[hash:7].[ext]'43 },44 {45 test: /\.css$/,46 loader: 'style-loader!css-loader',47 },48 {49 test: /\.less$/,50 loader: 'style-loader!css-loader!less-loader'51 }52 ]53 },54 plugins: [55 new CopyWebpackPlugin([56 {57 context: path.resolve(__dirname, '../src/assets/lib'),58 from: '**/*',59 to: path.resolve(__dirname, '../dist/assets/lib')60 },61 {62 context: path.resolve(__dirname, '../src/assets/fonts'),63 from: '**/*',64 to: path.resolve(__dirname, '../dist/assets/fonts')65 },66 {67 context: path.resolve(__dirname, '../src'),68 from: '**/*.html',69 to: path.resolve(__dirname, '../dist')70 },71 {72 context: path.resolve(__dirname, '../src'),73 from: '**/*.jpg',74 to: path.resolve(__dirname, '../dist')75 },76 {77 context: path.resolve(__dirname, '../src'),78 from: '**/*.png',79 to: path.resolve(__dirname, '../dist')80 },81 {82 context: path.resolve(__dirname, '../src'),83 from: '**/*.gif',84 to: path.resolve(__dirname, '../dist')85 },86 {87 context: path.resolve(__dirname, '../src'),88 from: '**/*.jpeg',89 to: path.resolve(__dirname, '../dist')90 },91 {92 context: path.resolve(__dirname, '../src'),93 from: '**/*.svg',94 to: path.resolve(__dirname, '../dist')95 }96 ])97 ]98};...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1console.log('Hello World');2console.log(__dirname);3console.log('Hello World');4console.log(__filename);5console.log('Hello World');6setTimeout(function() {7 console.log('I will execute after 3 seconds');8}, 3000);9console.log('Hello World');10setInterval(function() {11 console.log('I will execute after every 3 seconds');12}, 3000);13console.log('Hello World');14var time = setTimeout(function() {15 console.log('I will execute after 3 seconds');16}, 3000);17clearTimeout(time);18console.log('Hello World');19var time = setInterval(function() {20 console.log('I will execute after every 3 seconds');21}, 3000);22clearInterval(time);23console.log('Hello World');24console.log(__dirname);25console.log(__filename);26console.log('I will execute after every 3 seconds');27console.log('Hello World');28console.error('This is an error message');29console.log('Hello World');30console.warn('This is a warning message');31console.log('Hello World');32console.info('This is an information message');33console.log('Hello World');34console.time('Time Taken');35console.log('I will execute in 3 seconds');36console.timeEnd('Time Taken');37console.log('Hello World');38console.table(['John', 'James', 'David', 'Mark']);39console.log('Hello World');40console.assert(1 === 2, 'One

Full Screen

Using AI Code Generation

copy

Full Screen

1var path = require('path');2var ladle = require('ladle');3var client = ladle.createClient({port: 6379, host: 'localhost'});4var filename = path.join(__dirname, 'test.txt');5client.set('test', filename, function(err, res){6 if (err) throw err;7 client.get('test', function(err, res){8 if (err) throw err;9 console.log(res);10 });11});

Full Screen

Using AI Code Generation

copy

Full Screen

1var path = require('path');2console.log(path.join(__dirname, 'test.js'));3var path = require('path');4console.log(path.join(process.cwd(), 'test.js'));5var path = require('path');6console.log(path.join(process.env.PWD, 'test.js'));7var path = require('path');8console.log(path.join(process.mainModule.filename, 'test.js'));9var path = require('path');10console.log(path.join(process.mainModule.paths, 'test.js'));11var path = require('path');12console.log(path.join(process.mainModule.require, 'test.js'));13var path = require('path');14console.log(path.join(process.mainModule.load, 'test.js'));15var path = require('path');16console.log(path.join(process.mainModule.id, 'test.js'));17var path = require('path');18console.log(path.join(process.mainModule.children, 'test.js'));19var path = require('path');20console.log(path.join(process.mainModule.exports, 'test.js'));

Full Screen

Using AI Code Generation

copy

Full Screen

1var ladle = require('./ladle.js');2console.log(ladle.getDirName());3var ladle = require('./ladle.js');4console.log(ladle.getDirName());5var ladle = require('./ladle.js');6console.log(ladle.getDirName());7var ladle = require('./ladle.js');8console.log(ladle.getDirName());9var ladle = require('./ladle.js');10console.log(ladle.getDirName());11var ladle = require('./ladle.js');12console.log(ladle.getDirName());13var ladle = require('./ladle.js');14console.log(ladle.getDirName());15var ladle = require('./ladle.js');16console.log(ladle.getDirName());

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run ladle automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful