npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

grunt-wakanda

v0.1.4

Published

Start Wakanda Server

Downloads

11

Readme

grunt-wakanda

NPM version MIT Licensed

Wakanda® and 4D® are registered trademarks of 4D SAS in France and/or other countries. All other names mentioned may be trademarks or registered trademarks of their respective owners.

Start Wakanda Server

May be considered as a replacement for grunt-contrib-connect. Useful running a Wakanda Solution and its NoSQL databases.

Uses the Wakanda Server installed on the system.

Doesn't have (yet?) a middleware option as grunt-contrib-connect does.

Getting Started

This plugin requires Grunt.

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 grunt-wakanda --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-wakanda');

Or using load-grunt-tasks it could be automatically done by:

require('load-grunt-tasks')(grunt);

The "wakanda" task

Usage Examples

In your project's Gruntfile, add a section named wakanda to the data object passed into grunt.initConfig().

In this example, the default options are used to find and start Wakanda Server. The Wakanda Web Administration panel is opened so you can browse your computer files to load a solution.

grunt.initConfig({
  wakanda: {
    options: { 
      keepalive: true, 
      leavealive: false, 
      open: true
    }
  }
});

Options

Administration options

options.solution

Type: String Default value: ''

A string value that is used to specify the Wakanda Solution to open. If not specified, the default solution embeded in the server is used Should not be used at the same time than option.script.

options.script

Type: String Default value: ''

A string value that is used to specify a JavaScript file to run on Wakanda Server. Should not be used at the same time than option.solution.

options.port

Type: Number Default value: 8080

A number value that is used to specify Wakanda Web Administration panel HTTP port number. Note it is only accessible through HTTP from the local machine. From outside, the HTTPS protocol should be used.

options.ssl

Type: Number Default value: 4433

A number value that is used to specify Wakanda Web Administration panel HTTPS port number.

options.login

Type: String Default value: undefined

The admin login. If specified, a login panel will first need to be filled before accessing to the Web Administration.

options.password

Type: String Default value: undefined

The admin password. If specified, a login panel will first need to be filled before accessing to the Web Administration.

Discovery options

options.discovery

Type: Boolean Default value: true

Specify if the Bonjour discovery service should be activated or not.

Debugger options

options.debugger

Type: String Default value: remote

Specify which wakanda debugger and debugger protocol to activate

  • 'remote': The embedded Web Inspector via the webkit debugger protocol
  • 'wakanda': The Wakanda Studio debugger via the Crossfire debugger protocol
  • 'none': No debugger is activated

Logging facility options

options.syslog

Type: Boolean Default value: false

Forward Wakanda Server's log messages to the Syslog daemon

options.netdump

Type: Boolean Default value: false

Net dump

Utils options

options.wversion

Type: Boolean Default value: false

Returns the Wakanda Server version instead of starting it

options.whelp

Type: Boolean Default value: false

Returns the Wakanda Server native command line help. Mostly used for the development of this task itself in combination of the official documentation

Task options

options.bin

Type: String Default value: ''

Specify the Wakanda Server build to run. If not specified, the default os specific path is used

options.host

Type: String Default value: "127.0.0.1"

The host that is meant to be used by Wakanda Server.

options.wait

Type: Boolean Default value: false

Used to block task execution until the server is started. This option isn't necessary if open is activated (as open is already waiting for the server to be ready).

options.keepalive

Type: Boolean Default value: false

Used to block task execution once the server is started (and once the browser open is 'open' is true)

options.leavealive

Type: Boolean Default value: false

Used to maintain the server started once grunt exit.

options.open

Type: Boolean Default value: false

Used to open the Web Administration page in the browser.

Events

wakandaReady

Emited on grunt.event once the Wakanda HTTP server is ready

wakandaExit

Emited on grunt.event when the Wakanda child process is killed

wakandaExitRequest

Listened on grunt.event to kill the Wakanda child process if still alive

Todo

Unit Tests fix

Need to find out how to make the unit tests work properly. Currently trying to stop the server from an emitted grunt event so it can be restarted with different options from other tests. Any help welcome ;-)

IP address / host

The task could fix the host option default value from the Wakanda server output

watch / reload

For dev mode we should be able to have the solution or the Model reload when they are modified.

So Either:

  • Write a dedicated "friend" wakanda-reload task
  • Handle events such as wakandaReloadModelRequest and wakandaReloadSolutionRequest

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.

Release History

  • v0.1.4: Add support to most the command line options + experimental events
  • v0.1.3: Add the wait option
  • v0.1.2: Start the Wakanda Server and Open Admin page in the browser

References:

License

The MIT License

Copyright (c) 2014 Alexandre Morgaut.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.