Skip to content

Commit

Permalink
Move files
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Sep 19, 2019
1 parent 0c6eacf commit 9966ed0
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion netlify.toml
@@ -1,3 +1,3 @@
[build]
publish = "redoc/dist"
publish = "dist"
command = "npm run build"
12 changes: 6 additions & 6 deletions package.json
Expand Up @@ -35,7 +35,7 @@
"swagger"
],
"license": "MIT",
"main": "js/dist/swagger.json",
"main": "dist/swagger.json",
"repository": {
"type": "git",
"url": "git+https://github.com/netlify/open-api.git"
Expand All @@ -45,15 +45,15 @@
"prepare": "run-s lint build test",
"start": "run-s lint build",
"build": "run-s convert redoc",
"convert": "node ./js/convert.js",
"convert": "node src/convert.js",
"version": "run-s version:*",
"version:1-swagger": "node js/bump-swagger.js",
"version:1-swagger": "node src/bump-swagger.js",
"version:2-changelog": "auto-changelog -p --template keepachangelog --breaking-pattern breaking",
"version:3-git": "git add CHANGELOG.md swagger.yml",
"redoc": "node redoc/build.js",
"redoc": "node src/redoc/build.js",
"lint": "run-s eslint prettier",
"eslint": "eslint --fix \"{redoc,js}/*.js\"",
"prettier": "prettier --write --loglevel warn \"{redoc,js}/*.js\" \"*.{js,md,yml,json}\"",
"eslint": "eslint --fix \"src/**/*.js\"",
"prettier": "prettier --write --loglevel warn \"src/**/*.js\" \"*.{js,md,yml,json}\"",
"test": "ava"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion js/bump-swagger.js → src/bump-swagger.js
Expand Up @@ -6,7 +6,7 @@ const { version } = require('../package.json')
const pReadFile = promisify(readFile)
const pWriteFile = promisify(writeFile)

const SWAGGER_PATH = `${__dirname}/../swagger.yml`
const SWAGGER_PATH = `${__dirname}/swagger.yml`

// Modify the `info.version` field inside `swagger.yml` so it matches the
// `package.json` `version`
Expand Down
4 changes: 2 additions & 2 deletions js/convert.js → src/convert.js
Expand Up @@ -6,8 +6,8 @@ const makeDir = require('make-dir')

const pWriteFile = promisify(writeFile)

const YAML_INPUT = `${__dirname}/../swagger.yml`
const OUTPUT_DIR = `${__dirname}/dist`
const YAML_INPUT = `${__dirname}/swagger.yml`
const OUTPUT_DIR = `${__dirname}/../dist`
const JSON_OUTPUT = `${OUTPUT_DIR}/swagger.json`

// Validate `swagger.yml`, dereference the JSON references then serialize to
Expand Down
4 changes: 2 additions & 2 deletions redoc/assets.js → src/redoc/assets.js
Expand Up @@ -5,8 +5,8 @@ const cpFile = require('cp-file')
const ASSETS = [
`${__dirname}/netlify-logo.png`,
`${__dirname}/assets.js`,
`${__dirname}/../node_modules/analytics/dist/analytics.min.js`,
`${__dirname}/../node_modules/analytics-plugin-ga/dist/analytics-plugin-ga.min.js`
`${__dirname}/../../node_modules/analytics/dist/analytics.min.js`,
`${__dirname}/../../node_modules/analytics-plugin-ga/dist/analytics-plugin-ga.min.js`
]

// Copy files for static site to use (logo, JavaScript libraries)
Expand Down
2 changes: 1 addition & 1 deletion redoc/build.js → src/redoc/build.js
Expand Up @@ -6,7 +6,7 @@ const { copyAssets } = require('./assets')
const { injectContent } = require('./inject')

const SWAGGER_PATH = `${__dirname}/../swagger.yml`
const OUTPUT_DIR = `${__dirname}/dist`
const OUTPUT_DIR = `${__dirname}/../../dist`
const OUTPUT_PATH = `${OUTPUT_DIR}/index.html`

const pExecFile = promisify(execFile)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.

0 comments on commit 9966ed0

Please sign in to comment.