Git Product home page Git Product logo

Comments (5)

yoshuawuyts avatar yoshuawuyts commented on June 15, 2024

I think simple-html-index should remain as simple as possible. You can customize / add any tags you want using hyperstream:

const hyperstream = require('hyperstream')
const html = require('simple-html-index')

const htmls = html({ entry: 'static/bundle.js' })
const hs = hyperstream({
  head: { _appendHtml: '<meta name="viewport" content="something">' }
})

htmls.pipe(hs).pipe(process.stdout)

Cheers! ✨

from simple-html-index.

mattdesl avatar mattdesl commented on June 15, 2024

Yup agree with Yoshua.

👍

Sent from my iPhone

On Sep 22, 2015, at 3:54 AM, Yoshua Wuyts [email protected] wrote:

I think simple-html-index should remain as simple as possible. You can customize / add any tags you want using hyperstream:

const hyperstream = require('hyperstream')
const html = require('simple-html-index')

const htmls = html({ entry: 'static/bundle.js' })
const hs = hyperstream({
head: { _appendHtml: '' }
})

htmls.pipe(hs).pipe(process.stdout)
Cheers!


Reply to this email directly or view it on GitHub.

from simple-html-index.

tunnckoCore avatar tunnckoCore commented on June 15, 2024

Mm nope, noticed that example in readme. But don't like the ides to use whole new module for just one or two tags. This community love to do the things in the hard and wrong way.

Cheers.

from simple-html-index.

mattdesl avatar mattdesl commented on June 15, 2024

Sorry you feel that way.

This module is intentionally simple; trying to support every use case will increase the potential for bugs in modules and tools that have come to depend on simple-html-index. It increases API surface area and opens new problems:

  • custom tells the reader nothing - why not call it meta?
  • does specifying meta replace the existing meta charset tag?
  • does it append to head, or prepend? should we call it appendMeta for clarity, and if so, do we need prependMeta for parity?

It's trivial to publish another module that behaves differently and better suits your application's needs. It's also very easy to use hyperstream - just an extra few lines of code.

from simple-html-index.

tunnckoCore avatar tunnckoCore commented on June 15, 2024

Yea, that's why i said "something like". And it will remain simple with one more thing.
I understand it's intentional and love this simplicity.

It's trivial to publish another module that behaves differently and better suits your application's needs.

Yea, but we should always try to suggest to already existing ones.

custom tells the reader nothing - why not call it meta?

Make sense, cuz it would be for description, viewport and canonical only. And these are good things to have.

from simple-html-index.

Related Issues (4)

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.