ember-cli-headroom
v0.0.4
Published
An ember-cli addon for adding content to the head of index.html
Downloads
55
Readme
ember-cli-headroom
Often you may need to add content to the head of an ember-cli app. For example:
<link rel="dns-prefetch" href="//google.com">
<link rel="prefetch" href="//google.com/index.html">
<link rel="prerender" href="//google.com/index.html">
<meta name="google-site-verification" content="+nxGUDJ4QpAZ5l9Bsjdi102tLVC21AIh5d1Nl23908vVuFHs34="/>
<title>Hey this is staging man</title>
This addon make it easy for you to do this, and to change the content based on environment. First install the addon:
npm install --save-dev ember-cli-headroom
And add a configuration file:
// config/head-content.js
module.exports = function(env, config) {
var headContent = [
'<meta name="always there">'
];
if (env === 'production') {
headContent.push('<link rel="dns-prefetch" href="//eager-beaver.com">');
}
return config;
}
And you're off!
Developing this addon
git clone
this repositorynpm install
bower install
Running
ember server
- Visit your app at http://localhost:4200.
Running Tests
ember test
ember test --server
Building
ember build
For more information on using ember-cli, visit http://www.ember-cli.com/.
ember-cli-headroom was authored by 201 Created. We build ambitious applications for ambitious clients.