Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/djanta/grunt-djantajs-compiler
.djanta-rc grunt resource compiler
https://github.com/djanta/grunt-djantajs-compiler
bundle compilier djanta-rc generator grunt manifest-files
Last synced: about 1 month ago
JSON representation
.djanta-rc grunt resource compiler
- Host: GitHub
- URL: https://github.com/djanta/grunt-djantajs-compiler
- Owner: djanta
- License: mit
- Created: 2017-12-04T15:27:58.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-04T22:47:19.000Z (8 months ago)
- Last Synced: 2024-05-04T23:27:34.753Z (8 months ago)
- Topics: bundle, compilier, djanta-rc, generator, grunt, manifest-files
- Language: JavaScript
- Homepage: https://djantajs.io
- Size: 76.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# grunt-djantajs-compiler
[![npm](https://img.shields.io/npm/v/grunt-djantajs-compiler.svg?style=flat)](https://www.npmjs.com/package/grunt-djantajs-compiler)
[![npm downloads](https://img.shields.io/npm/dw/grunt-djantajs-compiler.svg?style=flat)](https://www.npmjs.com/package/grunt-djantajs-compiler)
[![Travis](https://img.shields.io/travis/djanta/grunt-djantajs-compiler/master.svg?style=flat)](https://travis-ci.org/djanta/grunt-djantajs-compiler)
[![Maintainability](https://api.codeclimate.com/v1/badges/e993001806df976e7459/maintainability)](https://codeclimate.com/github/djanta/grunt-djantajs-compiler/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/e993001806df976e7459/test_coverage)](https://codeclimate.com/github/djanta/grunt-djantajs-compiler/test_coverage)
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg?style=flat)](https://gitter.im/djantajs/djantajs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)> djanta-rc grunt resource compiler
## Getting Started
This plugin requires Grunt `~0.4.5`If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
```shell
npm i grunt-djantajs-compiler --save-dev[-D]
```Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
```js
grunt.loadNpmTasks('grunt-djantajs-compiler');
```## The "bundlerc" task
### Overview
In your project's Gruntfile, add a section named `bundlerc` to the data object passed into `grunt.initConfig()`.```js
grunt.initConfig({
bundlerc: {
options: {
// Task-specific options go here.
pattern: '**/*.js',
excludes: [
'node_modules/**/*',
'Grunt*.js',
'grunt-*/**',
'test/**/*',
'tests/**/*',
'Gulp*.js',
'gulp-*/**',
'example*/**/*',
]
},
// The specific task name goes here...
default: {
project: {
// Target-specific file lists and/or options go here.
src: 'Here is the place you define your project root absolute path' // path.resolve(__dirname, 'test', 'project')
}
}
}
});
```
### Options#### options.pattern
Type: `String`
**required**: `false`
Default value: `'**/*.js'`A string value that is used as a regex to filter all file your script file candidate for introspection.
#### options.excludes
Type: `Array`
**required**: `false`
Default value: `[]`An array value that is used to exclude an unnecessary resource which we do want to introspect for annotation detection purposes.
### Tasks
In your specifi grunt task section, you'll have to define the most important configuration section as follow#### project.src
Type: `String`
**required**: `true`
Default value: ``A string value or file descriptor that must point to your project root absolute path. This's where the annotation scanning will start at
### Usage Examples
#### Default Options
In this example, the default options are used to do something with whatever. So if the `testing` file has the content `Testing` and the `123` file had the content `1 2 3`, the generated result would be `Testing, 1 2 3.````js
grunt.initConfig({
bundlerc: {
options: {
pattern: '**/*.js',
excludes: [
'node_modules/**/*',
'Grunt*.js',
'grunt-*/**',
'test/**/*',
'tests/**/*',
'Gulp*.js',
'gulp-*/**',
'example*/**/*',
]
},
compile: {
project: {
src: path.resolve(__dirname, 'test', 'project')
}
}
}
});
```
## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).