Giter VIP home page Giter VIP logo

Comments (8)

toddself avatar toddself commented on May 17, 2024 1

to summarize from irc: i'm not sure bankai needs a plugin system. Sometimes bloat on a developer tool is OK since it takes away the paralysis of choice (eg: standard, tap). Install size is partially irrelevant (or you wouldn't use it, or you can install it globally), and if you aren't using something that comes with it, you're not increasing my cognitive load for using the product (again, tap comes with a TON of shit I couldn't care less about but I don't really care...)

from bankai.

yoshuawuyts avatar yoshuawuyts commented on May 17, 2024

Another cool plugin idea: https://github.com/mafintosh/browser-sync-stream - goes esp. well with offline apps I think

from bankai.

yoshuawuyts avatar yoshuawuyts commented on May 17, 2024

And more codesplitting stuff https://github.com/GoogleChrome/preload-webpack-plugin

from bankai.

yoshuawuyts avatar yoshuawuyts commented on May 17, 2024

I'm sensing https://github.com/yoshuawuyts/nanostack might be a good option to add - but yeah unsure

from bankai.

yoshuawuyts avatar yoshuawuyts commented on May 17, 2024

Can't help but have the feeling we're recreating gulp; but this my best guess at doing a plugin system ghmmm

// single input with transform
var bankai = require('bankai')
var assets = bankai('index.js')
assets.transform(purifyCss()) // optimizes CSS based on HTML, JS
var b = assets.bundle()

b.js().pipe(process.stdout)
b.css().pipe(process.stdout)
b.html().pipe(process.stdout)

// multi JS input
//
// if there's multiple files of the same type, you need to specify which stream
// you're creating
var bankai = require('bankai')
var assets = bankai(['index.js', 'outdex.js'])
assets.transform()
var b = assets.bundle()

b.js('index').pipe(process.stdout)
b.js('outdex').pipe(process.stdout)
b.js('common').pipe(process.stdout)
b.css().pipe(process.stdout)
b.html().pipe(process.stdout)

// render JS to HTML
// is a plugin b/c it needs to change single HTML file to multiple HTML files.
// We wanna copy the labeled-stream-splicer approach browserify has (TBI, lots
// of details here)
var bankai = require('bankai')
var assets = bankai('index.js')
assets.plugin(renderHTMLOnServerSomehow())
var b = assets.bundle()

b.js().pipe(process.stdout)
b.css().pipe(process.stdout)
b.html('/').pipe(process.stdout)
b.html('/mainView').pipe(process.stdout)
b.html('/:otherView').pipe(process.stdout)
b.html('/:and/:another/:one').pipe(process.stdout)

from bankai.

okdistribute avatar okdistribute commented on May 17, 2024

What is the purpose behind b.html('/mainView').pipe(process.stdout)? This is a router?

from bankai.

yoshuawuyts avatar yoshuawuyts commented on May 17, 2024

@Karissa it's to select one of many files - in this case renderHTMLOnServerSomehow() creates a file for each route passed, which is then added to html.

from bankai.

yoshuawuyts avatar yoshuawuyts commented on May 17, 2024

very good point - closing for now!

from bankai.

Related Issues (20)

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.