-
-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
1,169 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"packages": [ | ||
"packages/*" | ||
], | ||
"version": "independent" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import express from 'express'; | ||
import path from 'path'; | ||
|
||
module.exports = { | ||
altairExpress: (opts) => { | ||
const app = express(); | ||
|
||
app.use(express.static(path.join(__dirname, 'dist'))); | ||
|
||
app.get('*', (req, res) => { | ||
res.sendFile(path.join(__dirname, 'dist/index.html')); | ||
}); | ||
|
||
return app; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "altair-express-middleware", | ||
"version": "0.1.0", | ||
"description": "Express middleware for altair graphql client", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"prepublish": "node scripts/get_dist.js" | ||
}, | ||
"engines": { | ||
"node": ">= 6.9.1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/imolorhe/altair.git" | ||
}, | ||
"keywords": [ | ||
"altair", | ||
"graphql", | ||
"express", | ||
"middleware" | ||
], | ||
"author": "Samuel Imolorhe <[email protected]> (https://sirmuel.design)", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/imolorhe/altair/issues" | ||
}, | ||
"homepage": "https://github.com/imolorhe/altair#readme" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const ncp = require('ncp').ncp; | ||
const path = require('path'); | ||
|
||
ncp.limit = 16; | ||
const source = path.join(__dirname, '../../../dist'); | ||
|
||
const destination = path.join(__dirname, '../dist'); | ||
console.log(source, ', ', destination); | ||
ncp(source, destination, function (err) { | ||
if (err) { | ||
return console.error(err); | ||
} | ||
console.log('Done copying dist folder!'); | ||
}); |
Oops, something went wrong.