Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
feat(raml1&refactor): Raml 1.0 Support and Refactor (#19)
Browse files Browse the repository at this point in the history
* feat(raml1&refactor): Raml 1.0 Support and Refactor

Changes on generator design and generated code.
Also test strategies and update of raml parser
  • Loading branch information
nachoesmite authored May 4, 2018
1 parent 4f2d0c6 commit 59ed6e8
Show file tree
Hide file tree
Showing 47 changed files with 10,582 additions and 1,129 deletions.
20 changes: 20 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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"]
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+$/
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ var output = jsGenerator(/* api, data */)

## License


Apache License 2.0

[npm-image]: https://img.shields.io/npm/v/raml-javascript-generator.svg?style=flat
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']
}
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

0 comments on commit 59ed6e8

Please sign in to comment.