diff --git a/README.md b/README.md index 27fcf1d..b2f0621 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,60 @@ # grunt-mntyjs [![Dependency Status](https://www.versioneye.com/nodejs/grunt-mntyjs/0.1.0/badge.svg)](https://www.versioneye.com/nodejs/grunt-mntyjs/0.1.0) -> Grunt plugin to build your mnty.js project +> Grunt plugin to build your mntyjs project + +Visit the [mntyjs page] (https://github.com/bitExpert/mntyjs) for further information + +## Project Setup + + - install grunt-cli ```npm install -g grunt-cli``` + - install grunt-mntyjs ```npm install bitexpert/mntyjs --save-dev``` + +Create a basic grunt file +```js + module.exports = function (grunt) { + 'use strict'; + + grunt.loadNpmTasks('grunt-mntyjs'); + + grunt.initConfig({ + mntyjs: { + files: ['path/to/html/files/**/*.html'], + options: { + baseUrl: './', + deps: ['bower_components/mntyjs/dist/mnty.js'], + loadFrom: 'relative/path/to/plugin/folder/', + mountPoint: 'mount', + out: 'path/to/production/file/main.js' + } + } + }); + + grunt.registerTask('build', [ + 'mntyjs' + ]); + }; +``` + +The mntyjs task will find all used plugins (in the file urls) and it's dependencies. + + +## Building the project + +Run ```grunt build``` to build the production file. + +## Troubleshooting + +If paths cannot be resolved due the usage of a config file. It is possible to add +the path and shim config directly to the options. + +```js + options: { + paths: { + #the path has to be relative from the grunt file + 'bar': 'bower_components/foo/bar' + } + shim: { + } + } +``` +