mirror of
https://github.com/strapi/strapi.git
synced 2025-08-22 15:48:59 +00:00
Make the easiest installation as possible
This commit is contained in:
parent
9fe12ce4b6
commit
576a1903ec
54
.travis.yml
54
.travis.yml
@ -5,58 +5,18 @@ git:
|
|||||||
|
|
||||||
language: node_js
|
language: node_js
|
||||||
|
|
||||||
|
cache:
|
||||||
|
yarn: true
|
||||||
|
directories:
|
||||||
|
- node_modules
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- export CHROME_BIN=chromium-browser
|
- export CHROME_BIN=chromium-browser
|
||||||
- export DISPLAY=:99.0
|
- export DISPLAY=:99.0
|
||||||
- sh -e /etc/init.d/xvfb start
|
- sh -e /etc/init.d/xvfb start
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- cd packages/strapi-utils
|
- yarn run setup
|
||||||
- npm link
|
|
||||||
- cd ../strapi-mongoose
|
|
||||||
- npm link strapi-utils
|
|
||||||
- npm link
|
|
||||||
- cd ../strapi-bookshelf
|
|
||||||
- npm link strapi-utils
|
|
||||||
- npm link
|
|
||||||
- cd ../strapi-generate-migrations
|
|
||||||
- npm link strapi-bookshelf
|
|
||||||
- npm link strapi-utils
|
|
||||||
- npm link
|
|
||||||
- cd ../strapi-generate
|
|
||||||
- npm link strapi-utils
|
|
||||||
- npm link
|
|
||||||
- cd ../strapi-generate-admin
|
|
||||||
- npm link strapi-utils
|
|
||||||
- npm link
|
|
||||||
- cd ../strapi-generate-api
|
|
||||||
- npm link
|
|
||||||
- cd ../strapi-generate-policy
|
|
||||||
- npm link
|
|
||||||
- cd ../strapi-generate-service
|
|
||||||
- npm link
|
|
||||||
- cd ../strapi-generate-new
|
|
||||||
- npm link strapi-utils
|
|
||||||
- npm link
|
|
||||||
- cd ../strapi
|
|
||||||
- npm link strapi-generate-new
|
|
||||||
- npm link strapi-generate
|
|
||||||
- npm link strapi-generate-admin
|
|
||||||
- npm link strapi-generate-api
|
|
||||||
- npm link strapi-generate-policy
|
|
||||||
- npm link strapi-generate-service
|
|
||||||
- npm link strapi-generate-migrations
|
|
||||||
- npm link strapi-mongoose
|
|
||||||
- npm link strapi-utils
|
|
||||||
- npm install
|
|
||||||
- cd ./node_modules/koa-joi-router
|
|
||||||
- sed -i.bu 's/await-busboy/co-busboy/' joi-router.js
|
|
||||||
- npm install co-busboy
|
|
||||||
- cd ..
|
|
||||||
- cd ..
|
|
||||||
- cd ..
|
|
||||||
- cd ..
|
|
||||||
- npm install
|
|
||||||
|
|
||||||
node_js:
|
node_js:
|
||||||
- "7"
|
- "7"
|
||||||
@ -64,4 +24,4 @@ node_js:
|
|||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- npm test
|
- yarn run test
|
||||||
|
3
Makefile
3
Makefile
@ -12,3 +12,6 @@ test: lint
|
|||||||
|
|
||||||
docs:
|
docs:
|
||||||
mkdocs build --clean
|
mkdocs build --clean
|
||||||
|
|
||||||
|
setup:
|
||||||
|
./scripts/setup.sh
|
||||||
|
@ -48,7 +48,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "make test"
|
"test": "make test",
|
||||||
|
"setup": "make setup"
|
||||||
},
|
},
|
||||||
"author": {
|
"author": {
|
||||||
"email": "hi@strapi.io",
|
"email": "hi@strapi.io",
|
||||||
|
@ -32,7 +32,7 @@ module.exports = strapi => {
|
|||||||
|
|
||||||
initialize: cb => {
|
initialize: cb => {
|
||||||
if (strapi.config.static === true) {
|
if (strapi.config.static === true) {
|
||||||
const isIndexRoute = strapi.config.routes.find(route => route.path === '/');
|
const isIndexRoute = _.isEmpty(strapi.config.routes) ? false : strapi.config.routes.find(route => route.path === '/');
|
||||||
|
|
||||||
strapi.app.use(strapi.middlewares.convert(strapi.middlewares.betterStatic(path.resolve(strapi.config.appPath, strapi.config.paths.static), {
|
strapi.app.use(strapi.middlewares.convert(strapi.middlewares.betterStatic(path.resolve(strapi.config.appPath, strapi.config.paths.static), {
|
||||||
index: isIndexRoute ? false : 'index.html',
|
index: isIndexRoute ? false : 'index.html',
|
||||||
|
54
scripts/setup.sh
Executable file
54
scripts/setup.sh
Executable file
@ -0,0 +1,54 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd packages/strapi-utils
|
||||||
|
npm link
|
||||||
|
cd ../strapi-mongoose
|
||||||
|
npm link strapi-utils
|
||||||
|
npm link
|
||||||
|
cd ../strapi-bookshelf
|
||||||
|
npm link strapi-utils
|
||||||
|
npm link
|
||||||
|
cd ../strapi-generate-migrations
|
||||||
|
npm link strapi-bookshelf
|
||||||
|
npm link strapi-utils
|
||||||
|
npm link
|
||||||
|
cd ../strapi-generate
|
||||||
|
npm link strapi-utils
|
||||||
|
npm link
|
||||||
|
cd ../strapi-generate-admin
|
||||||
|
npm link strapi-utils
|
||||||
|
npm link
|
||||||
|
cd files/admin/public
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
cd ../../../
|
||||||
|
cd ../strapi-generate-api
|
||||||
|
npm link
|
||||||
|
cd ../strapi-generate-policy
|
||||||
|
npm link
|
||||||
|
cd ../strapi-generate-service
|
||||||
|
npm link
|
||||||
|
cd ../strapi-generate-new
|
||||||
|
npm link strapi-utils
|
||||||
|
npm link
|
||||||
|
cd ../strapi
|
||||||
|
npm link strapi-generate-new
|
||||||
|
npm link strapi-generate
|
||||||
|
npm link strapi-generate-admin
|
||||||
|
npm link strapi-generate-api
|
||||||
|
npm link strapi-generate-policy
|
||||||
|
npm link strapi-generate-service
|
||||||
|
npm link strapi-generate-migrations
|
||||||
|
npm link strapi-mongoose
|
||||||
|
npm link strapi-utils
|
||||||
|
npm install
|
||||||
|
npm link
|
||||||
|
cd ./node_modules/koa-joi-router
|
||||||
|
sed -i.bu 's/await-busboy/co-busboy/' joi-router.js
|
||||||
|
npm install co-busboy
|
||||||
|
cd ..
|
||||||
|
cd ..
|
||||||
|
cd ..
|
||||||
|
cd ..
|
||||||
|
npm install
|
Loading…
x
Reference in New Issue
Block a user