emb-script

0.0.1 • Public • Published

emb-script

embed external script to HTML

Installation

$ npm install emb-script

Usage

in.html

<!DOCTYPE html>
<html>
  <body>
    <script type="text/javascript" src="script.js"></script>
  </body>
</html>

script.js

console.log('foo');

and

var emb = require('emb-script');
emb('in.html', function(err, out) {
  console.log(out);
});

outputs

<!DOCTYPE html>
<html>
  <body>
    <script type="text/javascript">
console.log('foo');
</script>
  </body>
</html>

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i emb-script

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • hitsujiwool