raml2html build script
This commit is contained in:
parent
3d7a2ef5b1
commit
2466a0912f
5 changed files with 17 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,6 +7,7 @@
|
||||||
#assety stuff
|
#assety stuff
|
||||||
public/assets
|
public/assets
|
||||||
public/metamaps_mobile
|
public/metamaps_mobile
|
||||||
|
public/api/index.html
|
||||||
vendor/
|
vendor/
|
||||||
node_modules
|
node_modules
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
|
5
bin/build-apidocs.sh
Executable file
5
bin/build-apidocs.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Note: you need to run `npm install` before using this script or raml2html won't be installed
|
||||||
|
|
||||||
|
./node_modules/.bin/raml2html -i ./doc/api/api.raml -o ./public/api/index.html
|
|
@ -65,7 +65,14 @@ Run this in the metamaps directory, still as metamaps:
|
||||||
sudo aptitude install nodejs npm
|
sudo aptitude install nodejs npm
|
||||||
sudo ln -s /usr/bin/nodejs /usr/bin/node
|
sudo ln -s /usr/bin/nodejs /usr/bin/node
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
|
||||||
|
#### Precompile assets
|
||||||
|
|
||||||
|
This step depends on running npm install first; assets:precompile will run `NODE_ENV=production npm run build`, and the build-apidocs.sh script requires the raml2html npm package.
|
||||||
|
|
||||||
|
rake assets:precompile
|
||||||
|
rake perms:fix
|
||||||
|
bin/build-apidocs.sh
|
||||||
|
|
||||||
#### Nginx and SSL
|
#### Nginx and SSL
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ Now that you have the code, run these commands:
|
||||||
npm install
|
npm install
|
||||||
rake db:migrate
|
rake db:migrate
|
||||||
rake assets:precompile # includes `npm run build`
|
rake assets:precompile # includes `npm run build`
|
||||||
|
bin/build-apidocs.sh
|
||||||
rake perms:fix
|
rake perms:fix
|
||||||
passenger-config restart-app .
|
passenger-config restart-app .
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
"lodash": "4.16.1",
|
"lodash": "4.16.1",
|
||||||
"node-uuid": "1.4.7",
|
"node-uuid": "1.4.7",
|
||||||
"outdent": "0.2.1",
|
"outdent": "0.2.1",
|
||||||
|
"raml2html": "^4.0.0-beta5",
|
||||||
"react": "15.3.2",
|
"react": "15.3.2",
|
||||||
"react-dom": "15.3.2",
|
"react-dom": "15.3.2",
|
||||||
"socket.io": "0.9.12",
|
"socket.io": "0.9.12",
|
||||||
|
@ -41,7 +42,6 @@
|
||||||
"chai": "^3.5.0",
|
"chai": "^3.5.0",
|
||||||
"eslint": "^3.5.0",
|
"eslint": "^3.5.0",
|
||||||
"eslint-plugin-react": "^6.3.0",
|
"eslint-plugin-react": "^6.3.0",
|
||||||
"mocha": "^3.0.2",
|
"mocha": "^3.0.2"
|
||||||
"raml2html": "^4.0.0-beta5"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue