Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

raml-1-parser

Package Overview
Dependencies
Maintainers
2
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raml-1-parser

RAML 1.0 parser

  • 0.1.0-beta.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9K
decreased by-11.14%
Maintainers
2
Weekly downloads
 
Created
Source

RAML 1.0 JS Parser (beta)

See http://raml.org for more information about RAML.

This parser is at a beta state of development, as part of the API Workbench development cycle (http://apiworkbench.com).

Installation

npm install raml-1-parser

node node_modules/raml-1-parser/test/test01.js  //synchronously loads XKCD API from local file system and prints its JSON representation
node node_modules/raml-1-parser/test/testAsync01.js  //asynchronously loads XKCD API from local file system and prints its JSON representation
node node_modules/raml-1-parser/test/test02.js  //synchronously loads XKCD API from github and prints its JSON representation
node node_modules/raml-1-parser/test/testAsync02.js  //asynchronously loads XKCD API from github and prints its JSON representation


Usage

  • For parser usage example refer to node_modules/raml-1-parser/test/test.js
  • For asynchrounous usage example refer to node_modules/raml-1-parser/test/testAsync.js

Parser documentation: https://raml-org.github.io/raml-js-parser-2/

Getting started guide: https://github.com/raml-org/raml-js-parser-2/blob/master/documentation/GettingStarted.md

Packaging for Web

In order to use your parser dependent code on web you may call the web-tools/webPackage.js script for your code in order to construct a Webpack bundle. The script accepts following command line parameters:

  • -srcPath(required) Absolute or relative path to JS file using the parser and which, in turn, is used by the HTML page
  • -dstPath(required) Path to the resulting bundle
  • -uglify If present, the resulting bundle is subjected to optimization

The script requires following modules: webpack and mkdir. These may be installed locally:

npm install webpack
npm install mkdirp

or globally (in this case the should be linked to the project)

npm install webpack -g
npm install json-loader -g
npm install mkdirp -g
npm link webpack
npm link mkdirp
npm link json-loader

Example can be found at examples/web-example. In order to regenerate example bundle, run

node ./web-tools/webPackage.js -srcPath ./examples/web-example/page.js -dstPath ./examples/web-example/bundle/bundle.js

from the raml-1-parser node module root.

Keywords

FAQs

Package last updated on 08 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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