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
|
||||
cache: yarn
|
||||
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:
|
||||
- if [[ ! -z "$TRAVIS_TAG" ]]; then npm run build:prod; fi
|
||||
deploy:
|
||||
|
|
|
@ -8,6 +8,10 @@ function isPR() {
|
|||
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 (isPR()) {
|
||||
console.log('Skiping E2E tests on PR');
|
||||
|
@ -20,6 +24,10 @@ if (process.env.JOB === 'e2e-guru') {
|
|||
console.log('Skiping E2E tests on PR');
|
||||
return;
|
||||
}
|
||||
if (!isCI()) {
|
||||
console.log('Skiping E2E tests locally. Use `npm run e2e` to run');
|
||||
return;
|
||||
}
|
||||
console.log('Starting Basic E2E');
|
||||
exec('npm run e2e');
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ module.exports = webpackMerge(commonConfig({
|
|||
{
|
||||
test: /\.ts$/,
|
||||
use: [
|
||||
'awesome-typescript-loader?{configFileName: "tsconfig.webpack.json"}',
|
||||
'awesome-typescript-loader',
|
||||
'angular2-template-loader',
|
||||
],
|
||||
exclude: [/\.(spec|e2e)\.ts$/]
|
||||
|
|
|
@ -37,7 +37,7 @@ const config = webpackMerge(commonConfig({
|
|||
{
|
||||
test: /\.ts$/,
|
||||
use: [
|
||||
'awesome-typescript-loader?{configFileName: "tsconfig.webpack.json"}',
|
||||
'awesome-typescript-loader',
|
||||
'angular2-template-loader',
|
||||
],
|
||||
exclude: [/\.(spec|e2e)\.ts$/]
|
||||
|
@ -60,7 +60,7 @@ const config = webpackMerge(commonConfig({
|
|||
},
|
||||
sourceMap: true
|
||||
}),
|
||||
// new webpack.optimize.ModuleConcatenationPlugin(),
|
||||
new webpack.optimize.ModuleConcatenationPlugin(),
|
||||
new webpack.BannerPlugin(BANNER)
|
||||
]
|
||||
})
|
||||
|
|
|
@ -27,12 +27,6 @@ module.exports = webpackMerge(commonConfig({
|
|||
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',
|
||||
test: /\.(js|ts)$/, loader: 'istanbul-instrumenter-loader',
|
||||
include: root('lib'),
|
||||
|
|
93
package.json
93
package.json
|
@ -10,32 +10,35 @@
|
|||
"node": ">=6.9",
|
||||
"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": {
|
||||
"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: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-copy": "cp dist/redoc.min.js tests/e2e/",
|
||||
"webdriver": "webdriver-manager update",
|
||||
"serve:prod": "NODE_ENV=production npm start",
|
||||
"protractor": "protractor",
|
||||
"deploy": "node ./build/prepare_deploy.js && deploy-to-gh-pages --update demo",
|
||||
"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",
|
||||
"build:prod-module": "npm run build:sass && npm run ngc && npm run webpack:prod && IS_MODULE=true npm run webpack:prod",
|
||||
"build:module": "npm run build:sass && npm run ngc && IS_MODULE=true npm run webpack:prod"
|
||||
"stats": "webpack --config build/webpack.prod.js --json > stats.json"
|
||||
},
|
||||
"keywords": [
|
||||
"OpenAPI",
|
||||
|
@ -62,24 +65,20 @@
|
|||
"@types/should": "^8.3.0",
|
||||
"@types/swagger-schema-official": "^2.0.5",
|
||||
"@types/webpack": "^3.0.4",
|
||||
"angular2-inline-template-style": "^1.1.0",
|
||||
"angular2-template-loader": "^0.6.2",
|
||||
"awesome-typescript-loader": "^3.2.1",
|
||||
"branch-release": "^1.0.3",
|
||||
"chalk": "^2.0.1",
|
||||
"codelyzer": "^3.1.2",
|
||||
"conventional-changelog-cli": "^1.3.2",
|
||||
"core-js": "^2.4.1",
|
||||
"css-loader": "^0.28.1",
|
||||
"deploy-to-gh-pages": "^1.3.3",
|
||||
"dropkickjs": "^2.1.10",
|
||||
"hint.css": "^2.5.0",
|
||||
"http-server": "^0.10.0",
|
||||
"https-browserify": "^1.0.0",
|
||||
"exports-loader": "^0.6.4",
|
||||
"istanbul-instrumenter-loader": "^2.0.0",
|
||||
"jasmine-core": "^2.6.4",
|
||||
"jasmine-spec-reporter": "^4.1.1",
|
||||
"json-pointer": "^0.6.0",
|
||||
"json-schema-ref-parser": "^3.1.2",
|
||||
"karma": "^1.6.0",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-coverage": "^1.1.1",
|
||||
|
@ -93,37 +92,55 @@
|
|||
"karma-sinon": "^1.0.4",
|
||||
"karma-sourcemap-loader": "^0.3.7",
|
||||
"karma-webpack": "^2.0.4",
|
||||
"mark.js": "github:julmot/mark.js",
|
||||
"node-sass": "^4.5.3",
|
||||
"openapi-sampler": "^0.4.1",
|
||||
"phantomjs-prebuilt": "^2.1.14",
|
||||
"prismjs": "^1.5.1",
|
||||
"protractor": "^5.1.1",
|
||||
"raw-loader": "^0.5.1",
|
||||
"remarkable": "1.7.1",
|
||||
"rimraf": "^2.6.1",
|
||||
"rxjs": "^5.4.2",
|
||||
"sass-loader": "^6.0.6",
|
||||
"scrollparent": "^2.0.1",
|
||||
"shelljs": "^0.7.7",
|
||||
"should": "^11.2.1",
|
||||
"sinon": "^2.3.8",
|
||||
"slugify": "^1.0.2",
|
||||
"source-map-loader": "^0.2.1",
|
||||
"stream-http": "^2.7.0",
|
||||
"string-replace-webpack-plugin": "^0.1.3",
|
||||
"style-loader": "^0.18.2",
|
||||
"swagger-schema-official": "^2.0.0-bab6bed",
|
||||
"ts-helpers": "^1.1.1",
|
||||
"tslint": "^5.5.0",
|
||||
"typescript": "^2.4.2",
|
||||
"webpack": "^3.3.0",
|
||||
"webpack-dev-server": "^2.5.1",
|
||||
"webpack-merge": "^4.1.0",
|
||||
"zone.js": "^0.8.14"
|
||||
"webpack-merge": "^4.1.0"
|
||||
},
|
||||
"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": {
|
||||
"lunr": "1.0.0",
|
||||
"perfect-scrollbar": "^0.7.0"
|
||||
"dropkickjs": "^2.1.10",
|
||||
"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,
|
||||
"noEmitHelpers": true,
|
||||
"strictNullChecks": false,
|
||||
"baseUrl": "./src",
|
||||
"typeRoots": [ "./node_modules/@types" ],
|
||||
"paths": {
|
||||
},
|
||||
"declaration": true,
|
||||
"declarationDir": "dist",
|
||||
"lib": [
|
||||
"es2015",
|
||||
"dom"
|
||||
|
@ -23,21 +22,16 @@
|
|||
"swagger-schema-official"
|
||||
]
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"dist",
|
||||
"**/*.spec.ts",
|
||||
"**/*.e2e.ts"
|
||||
"files": [
|
||||
"custom.d.ts",
|
||||
".tmp/lib/redoc.module.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
],
|
||||
"awesomeTypescriptLoaderOptions": {
|
||||
"forkChecker": true,
|
||||
"useWebpackText": true
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"genDir": "./compiled",
|
||||
"skipMetadataEmit": true
|
||||
},
|
||||
"compileOnSave": false,
|
||||
"buildOnSave": false,
|
||||
"atom": { "rewriteTsconfig": false }
|
||||
"genDir": "./dist",
|
||||
"skipTemplateCodegen": true,
|
||||
"strictMetadataEmit": true
|
||||
}
|
||||
}
|
|
@ -8,26 +8,37 @@
|
|||
"sourceMap": true,
|
||||
"pretty": true,
|
||||
"moduleResolution": "node",
|
||||
"types": [
|
||||
"jasmine",
|
||||
"should",
|
||||
"webpack",
|
||||
"swagger-schema-official"
|
||||
],
|
||||
"outDir": "dist",
|
||||
"outDir": "./dist",
|
||||
"noEmitHelpers": true,
|
||||
"strictNullChecks": false,
|
||||
"typeRoots": [ "./node_modules/@types" ],
|
||||
"declaration": true,
|
||||
"declarationDir": "dist",
|
||||
"lib": [
|
||||
"dom", "es2016", "dom.iterable"
|
||||
],
|
||||
"noEmitHelpers": false
|
||||
"types": [
|
||||
"webpack",
|
||||
"jasmine",
|
||||
"should"
|
||||
]
|
||||
},
|
||||
"compileOnSave": false,
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"dist"
|
||||
"dist",
|
||||
"**/*.e2e.ts"
|
||||
],
|
||||
"awesomeTypescriptLoaderOptions": {
|
||||
"resolveGlobs": true,
|
||||
"forkChecker": 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"],
|
||||
"rules": {
|
||||
"class-name": true,
|
||||
|
|
Loading…
Reference in New Issue
Block a user