forked from bnb/bitandbang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.js
executable file
·46 lines (40 loc) · 1.63 KB
/
build.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
'use strict'
// Pull in our modules
const chalk = require('chalk')
const boxen = require('boxen')
const fs = require('fs')
const path = require('path')
// Define options for Boxen
const options = {
padding: 1,
margin: 1,
borderStyle: 'round'
}
// Text + chalk definitions
const mainColor = '#7C16F5'
const data = {
ascii: chalk.white(`
______ ______ _____ ______ ______ ______ __ __
/\\ ___\\ /\\ __ \\ /\\ __-. /\\ ___\\ /\\ ___\\ /\\ __ \\ /\\ "-.\\ \\
\\ \\ \\____ \\ \\ \\/\\ \\ \\ \\ \\/\\ \\ \\ \\ __\\ \\ \\ \\____ \\ \\ \\/\\ \\ \\ \\ \\-. \\
\\ \\_____\\ \\ \\_____\\ \\ \\____- \\ \\_____\\ \\ \\_____\\ \\ \\_____\\ \\ \\_\\\\"\\_\\
\\/_____/ \\/_____/ \\/____/ \\/_____/ \\/_____/ \\/_____/ \\/_/ \\/_/ `),
name: chalk.hex(mainColor).inverse('Codecon Summit'),
date: chalk.white('06 e 07 de setembro'),
address: chalk.white('Expoville - Joinville, SC'),
subscribe: chalk.white('Inscreva-se em:'),
link: chalk.underline.white('https://codecon.dev/summit'),
}
// Actual strings we're going to output
const newline = '\n'
const ascii = `${data.ascii}`
const heading = ` ${data.name} ${data.date}`
const address = `${data.address}`
const subscribe = `${data.subscribe} ${data.link}`
// Put all our output together into a single variable so we can use boxen effectively
const output = ascii + newline + newline +
heading +
newline + newline +
address + newline +
subscribe + newline
fs.writeFileSync(path.join(__dirname, 'bin/output'), chalk.hex(mainColor)(boxen(output, options)))