1.0.3 • Published 9 years ago
inject-files v1.0.3
inject-files
install
$ npm install inject-files --save-dev
usage
var injectFiles = require('inject-files');
injectFiles({
'input': 'full-path/filename.ext',
'output': 'full-path/filename.ext',
'timer': true
});
API
injectFiles(input, output, timer);
input
Type: string
name of input file, including relative-path and extension
output
Type: string
name of output file, including relative-path and extension
timer
Type: boolean
log the time taken to inject files
insert markers
Just insert a <<marker>>
in your code
in your HTML
<head>
<title>example</title>
<style>
<<styles/style.css>>
</style>
</head>
<body>
<p>hello world</p>
<script>
<<scripts/script.js>>
</script>
</body>
in your CSS
element {
style: beautiful-styles;
}
<<more-styles.css>>
in your JavaScript
function greeter() {
console.log('Hello World');
}
<<more-functions.js>>
related
inject-files-cli - CLI for this module
GitHub: inject-files-cli
npm: inject-files-cli
inject-dev-server - dev server using the inject-files API
GitHub: inject-dev-server
npm: inject-dev-server