Include basic APIB build & clean up npm script executions

pull/32/head
HardiReady 2018-03-12 16:28:24 +01:00
parent e595eb11ab
commit f46798ebd9
5 changed files with 13 additions and 3 deletions

View File

@ -0,0 +1 @@
## Authentication

View File

@ -0,0 +1,3 @@
# Operation Pandora Trigger Command Center API Documentation
<!-- include(base/authentication.apib) -->

View File

@ -11,7 +11,8 @@
"eslint": "$(npm bin)/eslint", "eslint": "$(npm bin)/eslint",
"lint": "eslint '**/*.js'", "lint": "eslint '**/*.js'",
"test": "mocha --require ./test/config/spec_helper.js", "test": "mocha --require ./test/config/spec_helper.js",
"e2e": "NODE_ENV=test node server.js" "e2e": "NODE_ENV=test node server.js",
"api:docs": "$(npm bin)/aglio -i ./apib/documentation.apib -o ../public/api-docs.html"
}, },
"dependencies": { "dependencies": {
"async": "^2.5.0", "async": "^2.5.0",
@ -36,6 +37,7 @@
"supports-color": "^5.1.0" "supports-color": "^5.1.0"
}, },
"devDependencies": { "devDependencies": {
"aglio": "^2.3.0",
"chai": "^3.5.0", "chai": "^3.5.0",
"chai-http": "^3.0.0", "chai-http": "^3.0.0",
"eslint": "^4.18.2", "eslint": "^4.18.2",

View File

@ -6,8 +6,10 @@
"scripts": { "scripts": {
"start": "npm run deploy-static-prod && npm start --prefix ./api", "start": "npm run deploy-static-prod && npm start --prefix ./api",
"dev": "npm run deploy-static && npm run dev --prefix ./api", "dev": "npm run deploy-static && npm run dev --prefix ./api",
"deploy-static": "cd ./static && $(npm bin)/ng build && ln -s ../api/resource/ ../public/resource", "deploy-static": "npm run build --prefix=static && npm run deploy-static:link-resource && npm run deploy-static:api-docs",
"deploy-static:prod": "cd ./static && $(npm bin)/ng build --prod --aot && ln -s ../api/resource/ ../public/resource", "deploy-static:prod": "npm run build:prod --prefix=static && npm run deploy-static:link-resource && npm run deploy-static:api-docs",
"deploy-static:link-resource": "ln -s ../api/resource/ public/resource",
"deploy-static:api-docs" : "npm run api:docs --prefix=api",
"postinstall": "npm install --prefix ./static && npm install --prefix ./api", "postinstall": "npm install --prefix ./static && npm install --prefix ./api",
"lint": "npm run lint --prefix=api && npm run lint --prefix=static", "lint": "npm run lint --prefix=api && npm run lint --prefix=static",
"test": "npm test --prefix ./api", "test": "npm test --prefix ./api",

View File

@ -6,6 +6,8 @@
"angular-cli": {}, "angular-cli": {},
"scripts": { "scripts": {
"ng": "$(npm bin)/ng", "ng": "$(npm bin)/ng",
"build": "ng build",
"build:prod": "ng build --prod --aot",
"start": "ng serve", "start": "ng serve",
"lint": "ng lint", "lint": "ng lint",
"test": "ng test", "test": "ng test",