New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grunt-particles

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-particles - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

2

Gruntfile.js

@@ -24,3 +24,3 @@ /*

options: {
runServices: ['svc|pipeline!testService'],
runServices: ['svc|pipeline!testService', 'svc|pipeline!testService2'],
config: {

@@ -27,0 +27,0 @@ appRoot: __dirname,

{
"name": "grunt-particles",
"description": "Invoke Scatter services from Grunt (and dynamically control its configuration)",
"version": "0.1.3",
"version": "0.2.0",
"homepage": "https://github.com/particles/grunt-particles",

@@ -30,3 +30,3 @@ "author": {

"dependencies": {
"particles": "~0.1.3"
"particles": "~0.2.0"
},

@@ -33,0 +33,0 @@ "devDependencies": {

# grunt-particles
Invoke Scatter/Particles services from Grunt (and dynamically control its configuration)
Invoke Scatter/Particles services from Grunt

@@ -10,97 +10,4 @@ [![NPM](https://nodei.co/npm/grunt-particles.png?downloads=true)](https://nodei.co/npm/grunt-particles/)

## Getting Started
This plugin requires Grunt `~0.4.1`
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 install grunt-particles --save-dev
```
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
```js
grunt.loadNpmTasks('grunt-particles');
```
## The "particles" task
### Overview
In your project's Gruntfile, add a section named `scatter` to the data object passed into `grunt.initConfig()`.
```js
grunt.initConfig({
particles: {
options: {
// Task-specific options go here.
}
},
})
```
### Options
#### options.runServices
Type: `Array`
Default value: None (Option Required)
#### options.appRoot
Type: `String`
Default value: None (Option Required)
#### options.configDir
Type: `String`
Default value: `'config'`
#### options.configNamespace
Type: `String`
Default value: `'particles:app'`
## Config parameters
In the context of `options.configNamespace`:
#### particles
Type: `Array`
Default value: `[]`
#### nodeModulesDir
Type: `String`
Default value: `''`
## Usage Examples
```js
grunt.initConfig({
scatter: {
options: {
runServices: "svc|sequence!aService/toRun",
appRoot: __dirname,
configDir: __dirname + "/test/config"
}
}
})
```
```js
{
"particles": {
"app": {
"particles": ["${appRoot}/aParticle/root"]
}
}
}
```
# License
MIT
-----
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/particles/grunt-particles/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

@@ -5,3 +5,3 @@

var path = require('path'),
particles = require('particles');
Particles = require('particles');

@@ -19,6 +19,4 @@ module.exports = function(grunt) {

var options = this.options({
scatterOptions: {},
config: {},
runServices: null,
configNamespace: null
runServices: null
});

@@ -28,3 +26,2 @@

runServices: options.runServices,
configNamespace: options.configNamespace,
config: options.config,

@@ -34,3 +31,4 @@ serviceArgs: [{grunt: grunt}]

particles.run(particlesOptions).then(function() {
var app = new Particles(particlesOptions);
app.run().then(function() {
done();

@@ -37,0 +35,0 @@ }).otherwise(done);

@@ -9,4 +9,4 @@ {

},
"particles": {
"app": {
"containers": {
"default": {
"particles": ["${appRoot}/test/root"]

@@ -13,0 +13,0 @@ }

var self = module.exports = {
__module: {
provides: ["testService"]
provides: ["testService", "testService2"]
},

@@ -9,3 +9,7 @@

self.input = input;
},
testService2: function(input) {
self.input2 = input;
}
};

@@ -34,7 +34,9 @@ 'use strict';

testServiceInvocation: function(test) {
test.expect(2);
test.expect(4);
var input = require('./root/testModule').input;
test.ok(input);
test.ok(input.grunt);
var testModule = require('./root/testModule');
test.ok(testModule.input);
test.ok(testModule.input.grunt);
test.ok(testModule.input2);
test.ok(testModule.input2.grunt);

@@ -41,0 +43,0 @@ test.done();

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc