Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

added basic setup instructions #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 58 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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: {
}
}
```