Comments (5)
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.
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.
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.
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 itmeta
?- 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 needprependMeta
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.
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)
- Adding <base href="/"> HOT 1
- CLI interface HOT 1
- Stream: PassThrough? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simple-html-index.