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

raml-1-parser

v1.1.67

Published

DEPRECATION NOTICE: please note that this parser is now deprecated, please use [webapi-parser](https://github.com/raml-org/webapi-parser) instead.

Downloads

74,672

Readme

DEPRECATION NOTICE: please note that this parser is now deprecated, please use webapi-parser instead.

—-

RAML 1.0 JS Parser

Build Status Greenkeeper badge

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

This parser supports both RAML 0.8 and 1.0.

Quick start

Install the parser: npm install raml-1-parser

Create new file test.js with the following code:

var raml = require("raml-1-parser");
var apiJSON = raml.load(ramlFileName);
console.log(JSON.stringify(apiJSON, null, 2));

where ramlFileName is a path to RAML file.

Run the test: node ./test.js

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/test01.js
  • For asynchrounous usage example refer to node_modules/raml-1-parser/test/testAsync01.js

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

Parser JSON output schema: https://github.com/raml-org/raml-js-parser-2/blob/master/tckJsonSchema/tckJsonSchema.json

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

High-level usage example: https://github.com/raml-org/raml-js-parser-2/blob/master/examples/highlevel-AST-usage/tutorial.md

Validation plugins usage example: https://github.com/raml-org/raml-js-parser-2/blob/master/examples/validationPlugins

Creating standalone browser package

Clone repository: git clone https://github.com/raml-org/raml-js-parser-2.git

Install modules: npm install

Build : npm run build

Generate browser package: npm run generateBrowserVersion, this will generate the package in browserVersion folder.

To generate debug-friendly browser package: npm run generateBrowserVersionDev

Setting up parser development environment

Clone repositories:

  • git clone https://github.com/mulesoft-labs/yaml-ast-parser.git
  • git clone https://github.com/mulesoft-labs/ts-model.git
  • git clone https://github.com/mulesoft-labs/ts-structure-parser.git
  • git clone https://github.com/raml-org/raml-typesystem.git
  • git clone https://github.com/raml-org/raml-definition-system.git
  • git clone https://github.com/raml-org/raml-js-parser-2.git

For each repository, preserving the order:

  • Install modules: npm install
  • Set up npm link: npm link

For each repository, preserving the order:

  • Open dependencies: cd node_modules
  • For each module <module_name> in node_modules belonging to the list above: rm -rf <module_name>
  • For each module <module_name> in node_modules belonging to the list above: npm link <module_name>

For each repository, preserving the order:

  • Build : npm run build

How to test: gulp test

Launching TCK tests

Execute npm run tck in the commend line. The script clones the master branch of the TCK repository to the TCK subfolder of the project and executes all the tests. The report file is TCK/report.json.

Contributing

If you are interested in contributing some code to this project, thanks! Please first read and accept the Contributors Agreement.

To discuss this project, please use its github issues or the RAML forum.