static-dev
v0.0.2
Published
HTML developer template.
Downloads
4
Readme
Getting Started
This plugin requires Grunt ~0.4.0
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install static-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('static-dev');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
staticdev:{
demo:{
src : "src/html/*",
dest : "pages/"
}
},
watch: {
html: {
files: ["src/html/*","src/html/common/*"],
tasks: ['staticdev:demo']
}
}
});
//Making grunt default to force in order not to break the project.
grunt.option('force', true);
//Default task(s).
grunt.registerTask('default', ['staticdev','watch']);
Example
src/html/index.html
<html>
<head></head>
<body>
<!--include common/test.html-->
</body>
</html>
src/common/test.html
test
Output
pages/index.html
<html>
<head></head>
<body>
test
</body>
</html>