mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-10 19:06:34 +03:00
chore: organize config files
This commit is contained in:
parent
5e5db72ea4
commit
6d423df2e9
|
@ -25,11 +25,6 @@ addons:
|
||||||
sauce_connect: true
|
sauce_connect: true
|
||||||
cache: yarn
|
cache: yarn
|
||||||
before_install: if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi
|
before_install: if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi
|
||||||
before_script:
|
|
||||||
- npm run e2e-server > /dev/null & # kill e2e server
|
|
||||||
- sleep 3 # give server time to start
|
|
||||||
after_script:
|
|
||||||
- kill %1 # kill e2e server
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- if [[ ! -z "$TRAVIS_TAG" ]]; then npm run build:prod; fi
|
- if [[ ! -z "$TRAVIS_TAG" ]]; then npm run build:prod; fi
|
||||||
deploy:
|
deploy:
|
||||||
|
|
|
@ -8,6 +8,10 @@ function isPR() {
|
||||||
return process.env.TRAVIS_PULL_REQUEST && process.env.TRAVIS_PULL_REQUEST !== 'false';
|
return process.env.TRAVIS_PULL_REQUEST && process.env.TRAVIS_PULL_REQUEST !== 'false';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isCI() {
|
||||||
|
return !!process.env.CI;
|
||||||
|
}
|
||||||
|
|
||||||
if (process.env.JOB === 'e2e-guru') {
|
if (process.env.JOB === 'e2e-guru') {
|
||||||
if (isPR()) {
|
if (isPR()) {
|
||||||
console.log('Skiping E2E tests on PR');
|
console.log('Skiping E2E tests on PR');
|
||||||
|
@ -20,6 +24,10 @@ if (process.env.JOB === 'e2e-guru') {
|
||||||
console.log('Skiping E2E tests on PR');
|
console.log('Skiping E2E tests on PR');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!isCI()) {
|
||||||
|
console.log('Skiping E2E tests locally. Use `npm run e2e` to run');
|
||||||
|
return;
|
||||||
|
}
|
||||||
console.log('Starting Basic E2E');
|
console.log('Starting Basic E2E');
|
||||||
exec('npm run e2e');
|
exec('npm run e2e');
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ module.exports = webpackMerge(commonConfig({
|
||||||
{
|
{
|
||||||
test: /\.ts$/,
|
test: /\.ts$/,
|
||||||
use: [
|
use: [
|
||||||
'awesome-typescript-loader?{configFileName: "tsconfig.webpack.json"}',
|
'awesome-typescript-loader',
|
||||||
'angular2-template-loader',
|
'angular2-template-loader',
|
||||||
],
|
],
|
||||||
exclude: [/\.(spec|e2e)\.ts$/]
|
exclude: [/\.(spec|e2e)\.ts$/]
|
||||||
|
|
|
@ -37,7 +37,7 @@ const config = webpackMerge(commonConfig({
|
||||||
{
|
{
|
||||||
test: /\.ts$/,
|
test: /\.ts$/,
|
||||||
use: [
|
use: [
|
||||||
'awesome-typescript-loader?{configFileName: "tsconfig.webpack.json"}',
|
'awesome-typescript-loader',
|
||||||
'angular2-template-loader',
|
'angular2-template-loader',
|
||||||
],
|
],
|
||||||
exclude: [/\.(spec|e2e)\.ts$/]
|
exclude: [/\.(spec|e2e)\.ts$/]
|
||||||
|
@ -60,7 +60,7 @@ const config = webpackMerge(commonConfig({
|
||||||
},
|
},
|
||||||
sourceMap: true
|
sourceMap: true
|
||||||
}),
|
}),
|
||||||
// new webpack.optimize.ModuleConcatenationPlugin(),
|
new webpack.optimize.ModuleConcatenationPlugin(),
|
||||||
new webpack.BannerPlugin(BANNER)
|
new webpack.BannerPlugin(BANNER)
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -27,12 +27,6 @@ module.exports = webpackMerge(commonConfig({
|
||||||
exclude: [/\.(spec|e2e)\.ts$/]
|
exclude: [/\.(spec|e2e)\.ts$/]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Instruments JS files with Istanbul for subsequent code coverage reporting.
|
|
||||||
* Instrument only testing sources.
|
|
||||||
*
|
|
||||||
* See: https://github.com/deepsweet/istanbul-instrumenter-loader
|
|
||||||
*/
|
|
||||||
enforce: 'post',
|
enforce: 'post',
|
||||||
test: /\.(js|ts)$/, loader: 'istanbul-instrumenter-loader',
|
test: /\.(js|ts)$/, loader: 'istanbul-instrumenter-loader',
|
||||||
include: root('lib'),
|
include: root('lib'),
|
||||||
|
|
93
package.json
93
package.json
|
@ -10,32 +10,35 @@
|
||||||
"node": ">=6.9",
|
"node": ">=6.9",
|
||||||
"npm": ">=3.0.0"
|
"npm": ">=3.0.0"
|
||||||
},
|
},
|
||||||
"main": "dist/redoc-module.js",
|
"main": "dist/redoc.module.js",
|
||||||
|
"module": "dist/redoc.module.js",
|
||||||
|
"types": "dist/redoc.module.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run lint && node ./build/run_tests.js",
|
|
||||||
"branch-release": "git reset --hard && branch-release",
|
|
||||||
"lint": "tslint -e \"lib/**/*{ngfactory|css.shim}.ts\" lib/**/*.ts",
|
|
||||||
"unit": "karma start",
|
|
||||||
"e2e": "npm run build:prod && npm run e2e-copy && npm run webdriver && protractor",
|
|
||||||
"deploy": "node ./build/prepare_deploy.js && deploy-to-gh-pages --update demo",
|
|
||||||
"ngc": "ngc -p tsconfig.webpack.json",
|
|
||||||
"clean:dist": "npm run rimraf -- dist/",
|
|
||||||
"clean:aot": "npm run rimraf -- .tmp compiled lib/**/*.css",
|
|
||||||
"rimraf": "rimraf",
|
|
||||||
"webpack:prod": "webpack --config build/webpack.prod.js --profile --bail",
|
|
||||||
"build:sass": "node-sass -q -o lib lib",
|
|
||||||
"build:prod": "npm run clean:aot && npm run build:sass && npm run ngc && npm run webpack:prod",
|
|
||||||
"build-dist": "npm run build:prod",
|
|
||||||
"stats": "webpack --config build/webpack.prod.js --json > stats.json",
|
|
||||||
"start": "webpack-dev-server --config build/webpack.dev.js --content-base demo",
|
"start": "webpack-dev-server --config build/webpack.dev.js --content-base demo",
|
||||||
|
"start:prod": "NODE_ENV=production npm start",
|
||||||
|
"test": "npm run lint && node ./build/run_tests.js",
|
||||||
|
"lint": "tslint --type-check -e \"lib/**/*{ngfactory|css.shim}.ts\" lib/**/*.ts",
|
||||||
|
"unit": "karma start",
|
||||||
|
"pree2e": "npm run build:prod && npm run e2e-copy",
|
||||||
|
"e2e": "run-p -r protractor e2e-server",
|
||||||
|
"protractor": "protractor",
|
||||||
|
"preprotractor": "npm run webdriver",
|
||||||
"e2e-server": "http-server -p 3000 tests/e2e",
|
"e2e-server": "http-server -p 3000 tests/e2e",
|
||||||
"e2e-copy": "cp dist/redoc.min.js tests/e2e/",
|
"e2e-copy": "cp dist/redoc.min.js tests/e2e/",
|
||||||
"webdriver": "webdriver-manager update",
|
"webdriver": "webdriver-manager update",
|
||||||
"serve:prod": "NODE_ENV=production npm start",
|
"deploy": "node ./build/prepare_deploy.js && deploy-to-gh-pages --update demo",
|
||||||
"protractor": "protractor",
|
"branch-release": "git reset --hard && branch-release",
|
||||||
|
"clean": "rimraf dist .tmp compiled lib/**/*.css",
|
||||||
|
"ngc": "ngc -p tsconfig.json",
|
||||||
|
"inline": "ng2-inline -o .tmp -r --compress \"lib/**/*.ts\"",
|
||||||
|
"build:aot": "npm run build:sass && npm run inline && ngc -p tsconfig.aot.json",
|
||||||
|
"webpack:prod": "webpack --config build/webpack.prod.js --profile --bail",
|
||||||
|
"build:sass": "node-sass -q -o lib lib",
|
||||||
|
"build:prod": "npm run build:sass && npm run ngc && npm run webpack:prod",
|
||||||
|
"build-dist": "npm run build:prod",
|
||||||
|
"build:all": "npm run clean && npm run build:prod && npm run build:aot",
|
||||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
|
||||||
"build:prod-module": "npm run build:sass && npm run ngc && npm run webpack:prod && IS_MODULE=true npm run webpack:prod",
|
"stats": "webpack --config build/webpack.prod.js --json > stats.json"
|
||||||
"build:module": "npm run build:sass && npm run ngc && IS_MODULE=true npm run webpack:prod"
|
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"OpenAPI",
|
"OpenAPI",
|
||||||
|
@ -62,24 +65,20 @@
|
||||||
"@types/should": "^8.3.0",
|
"@types/should": "^8.3.0",
|
||||||
"@types/swagger-schema-official": "^2.0.5",
|
"@types/swagger-schema-official": "^2.0.5",
|
||||||
"@types/webpack": "^3.0.4",
|
"@types/webpack": "^3.0.4",
|
||||||
|
"angular2-inline-template-style": "^1.1.0",
|
||||||
"angular2-template-loader": "^0.6.2",
|
"angular2-template-loader": "^0.6.2",
|
||||||
"awesome-typescript-loader": "^3.2.1",
|
"awesome-typescript-loader": "^3.2.1",
|
||||||
"branch-release": "^1.0.3",
|
"branch-release": "^1.0.3",
|
||||||
"chalk": "^2.0.1",
|
"chalk": "^2.0.1",
|
||||||
"codelyzer": "^3.1.2",
|
"codelyzer": "^3.1.2",
|
||||||
"conventional-changelog-cli": "^1.3.2",
|
"conventional-changelog-cli": "^1.3.2",
|
||||||
"core-js": "^2.4.1",
|
|
||||||
"css-loader": "^0.28.1",
|
"css-loader": "^0.28.1",
|
||||||
"deploy-to-gh-pages": "^1.3.3",
|
"deploy-to-gh-pages": "^1.3.3",
|
||||||
"dropkickjs": "^2.1.10",
|
|
||||||
"hint.css": "^2.5.0",
|
|
||||||
"http-server": "^0.10.0",
|
"http-server": "^0.10.0",
|
||||||
"https-browserify": "^1.0.0",
|
"exports-loader": "^0.6.4",
|
||||||
"istanbul-instrumenter-loader": "^2.0.0",
|
"istanbul-instrumenter-loader": "^2.0.0",
|
||||||
"jasmine-core": "^2.6.4",
|
"jasmine-core": "^2.6.4",
|
||||||
"jasmine-spec-reporter": "^4.1.1",
|
"jasmine-spec-reporter": "^4.1.1",
|
||||||
"json-pointer": "^0.6.0",
|
|
||||||
"json-schema-ref-parser": "^3.1.2",
|
|
||||||
"karma": "^1.6.0",
|
"karma": "^1.6.0",
|
||||||
"karma-chrome-launcher": "^2.2.0",
|
"karma-chrome-launcher": "^2.2.0",
|
||||||
"karma-coverage": "^1.1.1",
|
"karma-coverage": "^1.1.1",
|
||||||
|
@ -93,37 +92,55 @@
|
||||||
"karma-sinon": "^1.0.4",
|
"karma-sinon": "^1.0.4",
|
||||||
"karma-sourcemap-loader": "^0.3.7",
|
"karma-sourcemap-loader": "^0.3.7",
|
||||||
"karma-webpack": "^2.0.4",
|
"karma-webpack": "^2.0.4",
|
||||||
"mark.js": "github:julmot/mark.js",
|
|
||||||
"node-sass": "^4.5.3",
|
"node-sass": "^4.5.3",
|
||||||
"openapi-sampler": "^0.4.1",
|
|
||||||
"phantomjs-prebuilt": "^2.1.14",
|
"phantomjs-prebuilt": "^2.1.14",
|
||||||
"prismjs": "^1.5.1",
|
|
||||||
"protractor": "^5.1.1",
|
"protractor": "^5.1.1",
|
||||||
"raw-loader": "^0.5.1",
|
"raw-loader": "^0.5.1",
|
||||||
"remarkable": "1.7.1",
|
|
||||||
"rimraf": "^2.6.1",
|
"rimraf": "^2.6.1",
|
||||||
"rxjs": "^5.4.2",
|
"rxjs": "^5.4.2",
|
||||||
"sass-loader": "^6.0.6",
|
"sass-loader": "^6.0.6",
|
||||||
"scrollparent": "^2.0.1",
|
|
||||||
"shelljs": "^0.7.7",
|
"shelljs": "^0.7.7",
|
||||||
"should": "^11.2.1",
|
"should": "^11.2.1",
|
||||||
"sinon": "^2.3.8",
|
"sinon": "^2.3.8",
|
||||||
"slugify": "^1.0.2",
|
|
||||||
"source-map-loader": "^0.2.1",
|
"source-map-loader": "^0.2.1",
|
||||||
"stream-http": "^2.7.0",
|
|
||||||
"string-replace-webpack-plugin": "^0.1.3",
|
"string-replace-webpack-plugin": "^0.1.3",
|
||||||
"style-loader": "^0.18.2",
|
"style-loader": "^0.18.2",
|
||||||
"swagger-schema-official": "^2.0.0-bab6bed",
|
"swagger-schema-official": "^2.0.0-bab6bed",
|
||||||
"ts-helpers": "^1.1.1",
|
|
||||||
"tslint": "^5.5.0",
|
"tslint": "^5.5.0",
|
||||||
"typescript": "^2.4.2",
|
"typescript": "^2.4.2",
|
||||||
"webpack": "^3.3.0",
|
"webpack": "^3.3.0",
|
||||||
"webpack-dev-server": "^2.5.1",
|
"webpack-dev-server": "^2.5.1",
|
||||||
"webpack-merge": "^4.1.0",
|
"webpack-merge": "^4.1.0"
|
||||||
"zone.js": "^0.8.14"
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/common": "^4.1.1",
|
||||||
|
"@angular/compiler": "^4.1.1",
|
||||||
|
"@angular/compiler-cli": "^4.1.1",
|
||||||
|
"@angular/core": "^4.1.1",
|
||||||
|
"@angular/forms": "^4.1.1",
|
||||||
|
"@angular/platform-browser": "^4.1.1",
|
||||||
|
"@angular/platform-browser-dynamic": "^4.1.1",
|
||||||
|
"@angular/platform-server": "^4.1.1",
|
||||||
|
"core-js": "^2.4.1",
|
||||||
|
"rxjs": "^5.3.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lunr": "1.0.0",
|
"dropkickjs": "^2.1.10",
|
||||||
"perfect-scrollbar": "^0.7.0"
|
"core-js": "^2.4.1",
|
||||||
|
"hint.css": "^2.3.2",
|
||||||
|
"https-browserify": "^1.0.0",
|
||||||
|
"json-pointer": "^0.6.0",
|
||||||
|
"json-schema-ref-parser": "^3.1.2",
|
||||||
|
"lunr": "^1.0.0",
|
||||||
|
"mark.js": "github:julmot/mark.js",
|
||||||
|
"openapi-sampler": "^0.4.1",
|
||||||
|
"perfect-scrollbar": "^0.7.0",
|
||||||
|
"prismjs": "^1.5.1",
|
||||||
|
"remarkable": "1.7.1",
|
||||||
|
"scrollparent": "^2.0.1",
|
||||||
|
"slugify": "^1.0.2",
|
||||||
|
"stream-http": "^2.6.1",
|
||||||
|
"ts-helpers": "^1.1.1",
|
||||||
|
"zone.js": "^0.8.14"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,10 +10,9 @@
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"noEmitHelpers": true,
|
"noEmitHelpers": true,
|
||||||
"strictNullChecks": false,
|
"strictNullChecks": false,
|
||||||
"baseUrl": "./src",
|
|
||||||
"typeRoots": [ "./node_modules/@types" ],
|
"typeRoots": [ "./node_modules/@types" ],
|
||||||
"paths": {
|
"declaration": true,
|
||||||
},
|
"declarationDir": "dist",
|
||||||
"lib": [
|
"lib": [
|
||||||
"es2015",
|
"es2015",
|
||||||
"dom"
|
"dom"
|
||||||
|
@ -23,21 +22,16 @@
|
||||||
"swagger-schema-official"
|
"swagger-schema-official"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"exclude": [
|
"files": [
|
||||||
"node_modules",
|
"custom.d.ts",
|
||||||
"dist",
|
".tmp/lib/redoc.module.ts"
|
||||||
"**/*.spec.ts",
|
],
|
||||||
"**/*.e2e.ts"
|
"exclude": [
|
||||||
|
"node_modules"
|
||||||
],
|
],
|
||||||
"awesomeTypescriptLoaderOptions": {
|
|
||||||
"forkChecker": true,
|
|
||||||
"useWebpackText": true
|
|
||||||
},
|
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"genDir": "./compiled",
|
"genDir": "./dist",
|
||||||
"skipMetadataEmit": true
|
"skipTemplateCodegen": true,
|
||||||
},
|
"strictMetadataEmit": true
|
||||||
"compileOnSave": false,
|
}
|
||||||
"buildOnSave": false,
|
|
||||||
"atom": { "rewriteTsconfig": false }
|
|
||||||
}
|
}
|
|
@ -8,26 +8,37 @@
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"pretty": true,
|
"pretty": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"types": [
|
"outDir": "./dist",
|
||||||
"jasmine",
|
"noEmitHelpers": true,
|
||||||
"should",
|
"strictNullChecks": false,
|
||||||
"webpack",
|
"typeRoots": [ "./node_modules/@types" ],
|
||||||
"swagger-schema-official"
|
"declaration": true,
|
||||||
],
|
"declarationDir": "dist",
|
||||||
"outDir": "dist",
|
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom", "es2016", "dom.iterable"
|
"dom", "es2016", "dom.iterable"
|
||||||
],
|
],
|
||||||
"noEmitHelpers": false
|
"types": [
|
||||||
|
"webpack",
|
||||||
|
"jasmine",
|
||||||
|
"should"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"compileOnSave": false,
|
"compileOnSave": false,
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules",
|
"node_modules",
|
||||||
"dist"
|
"dist",
|
||||||
|
"**/*.e2e.ts"
|
||||||
],
|
],
|
||||||
"awesomeTypescriptLoaderOptions": {
|
"awesomeTypescriptLoaderOptions": {
|
||||||
"resolveGlobs": true,
|
"resolveGlobs": true,
|
||||||
"forkChecker": true,
|
"forkChecker": true,
|
||||||
"useWebpackText": true
|
"useWebpackText": true
|
||||||
}
|
},
|
||||||
|
"angularCompilerOptions": {
|
||||||
|
"genDir": "./compiled",
|
||||||
|
"skipMetadataEmit": true
|
||||||
|
},
|
||||||
|
"compileOnSave": false,
|
||||||
|
"buildOnSave": false,
|
||||||
|
"atom": { "rewriteTsconfig": false }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
{
|
{
|
||||||
"linterOptions": {
|
|
||||||
"typeCheck": true
|
|
||||||
},
|
|
||||||
"rulesDirectory": ["node_modules/codelyzer"],
|
"rulesDirectory": ["node_modules/codelyzer"],
|
||||||
"rules": {
|
"rules": {
|
||||||
"class-name": true,
|
"class-name": true,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user