Skip to content
This repository was archived by the owner on Jan 19, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
env:
es6: true
node: true
mocha: true
extends:
- eslint:recommended
- airbnb-base
- plugin:import/errors
- plugin:import/warnings
rules:
"indent": ["error", 2, "SwitchCase": 1]
"quotes": ["error", "single"]
"quote-props": ["error", "consistent-as-needed"]
"semi": ["error", "always"]
"no-trailing-spaces": ["error", "skipBlankLines": true]
"no-multiple-empty-lines": ["error", "max": 1]
"comma-dangle": ["error", "never"]
"key-spacing": ["error", "mode": "strict"]
"max-len": ["error", 150]
"arrow-parens": ["error", "always"]
"prefer-destructuring": "off"
"function-paren-newline": "off"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
.DS_Store
npm-debug.log
.tmp
/typings/
/dist/
.source.*
test.pid
27 changes: 22 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
language: node_js

sudo: required

before_install:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

cache:
directories:
- node_modules

notifications:
email:
on_success: never
on_failure: change
email: false

node_js:
- "stable"
- "6"
- "8"
- "lts/*"

before_script:
- npm prune
after_script: "npm install coveralls@2 && cat ./coverage/report-lcov/lcov.info | coveralls"

after_script: "npm install coveralls@2 && cat ./coverage/lcov.info | coveralls"
branches:
except:
- /^v\d+\.\d+\.\d+$/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# RAML JavaScript Generator

[![Greenkeeper badge](https://badges.greenkeeper.io/mulesoft-labs/raml-javascript-generator.svg)](https://greenkeeper.io/)

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Build status][travis-image]][travis-url]
Expand Down
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-angular']
}
9 changes: 9 additions & 0 deletions greenkeeper.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"groups": {
"default": {
"packages": [
"package.json"
]
}
}
}
5 changes: 5 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module 'raml-generator' {
export type Api = any;
export type GeneratorResult = any;
export function generator(options: any): any;
}
47 changes: 47 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
const istanbul = require('browserify-istanbul');

module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['browserify', 'mocha'],
files: [
'test/specs/*test.js'
],
browserify: {
debug: true,
ignore: [],
transform: [istanbul({
ignore: ['test/**', '**/node_modules/**']
})],
extensions: ['.js']
},
customLaunchers: {
Chrome_headless: {
base: 'Chrome',
flags: ['--no-sanbox']
}
},
preprocessors: {
'test/specs/*test.js': ['browserify']
},
reporters: ['progress', 'istanbul'],
istanbulReporter: {
dir : 'coverage/',
reporters: [
// reporters not supporting the `file` property
{ type: 'html', subdir: 'report-html' },
{ type: 'lcov', subdir: 'report-lcov' },
// reporters supporting the `file` property, use `subdir` to directly
// output them in the `dir` directory
{ type: 'cobertura', subdir: '.', file: 'cobertura.txt' },
{ type: 'lcovonly', subdir: '.', file: 'report-lcovonly.txt' },
{ type: 'teamcity', subdir: '.', file: 'teamcity.txt' },
{ type: 'text', subdir: '.', file: 'text.txt' },
{ type: 'text-summary', subdir: '.', file: 'text-summary.txt' },
]
},
autoWatch: false,
browsers: ['Chrome_headless'],
singleRun: true,
})
}
Loading