Git Product home page Git Product logo

alio's Introduction

internet person, books, etymology-curious, barfly

Tell me if I ever did a thing.

alio's People

Contributors

dependabot[bot] avatar estrattonbailey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

alio's Issues

should allow for user-land presets

If a user passes in a full path, should try to resolve that after the @alio scope, then fail. Should also allow a node module instance here.

presets.map(p => {
try {
const preset = require(path.join(cwd, './node_modules', `@alio/preset-${p}`))
preset()(wc, args)
} catch (e) {
log.hydrate({
configError: [
`cannot find '${p}' preset, please make sure it's installed`
]
})()
}
})

map return value only, do side-effects in separate loop

Just a code quality thing

const configs = confs
.map(conf => {
if (conf.reload) {
conf.__port = port++
conf.banner = conf.banner || ''
conf.banner += clientReloader(conf.__port)
}
return conf
})
.map(conf => mergeConfig(conf, true))
.map(([ conf, wc ]) => {
if (conf.modify) conf.modify(wc)
return [ conf, wc ]
})
.map(([ conf, wc ]) => {
const hash = Object.keys(wc.entry).join(':')
if (conf.reload) {
servers[hash] = require('http').createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' })
res.write('socket running...')
res.end()
}).listen(conf.__port)
sockets[hash] = require('socket.io')(servers[hash], {
serveClient: false
})
}
process.env.DEBUG && console.log(JSON.stringify(wc, null, ' '))
return wc
})

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.