Build and deploy demo
- Ignore public page - Add netlify.toml - Add build:demo script
This commit is contained in:
parent
e260c5b53d
commit
f35450130a
|
@ -1,4 +1,5 @@
|
|||
.nyc_output
|
||||
coverage
|
||||
node_modules
|
||||
public
|
||||
npm-debug.log
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
.nyc_output
|
||||
coverage
|
||||
public
|
||||
tap-snapshots
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env node
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
const { render } = require('..')
|
||||
const resume = require('../resume.json')
|
||||
|
||||
const dest = path.resolve(__dirname, '../public');
|
||||
const html = render(resume)
|
||||
|
||||
fs.mkdirSync(dest, { recursive: true })
|
||||
fs.writeFileSync(path.resolve(dest, 'index.html'), html)
|
|
@ -0,0 +1,3 @@
|
|||
[build]
|
||||
command = "npm run build:example"
|
||||
publish = "public"
|
|
@ -18,6 +18,7 @@
|
|||
"style.css"
|
||||
],
|
||||
"scripts": {
|
||||
"build:demo": "./bin/build-demo",
|
||||
"format": "prettier --write .",
|
||||
"lint": "eslint .",
|
||||
"test": "tap"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const { test } = require('tap')
|
||||
|
||||
const { render } = require('..')
|
||||
const resume = require('./resume.json')
|
||||
const resume = require('../resume.json')
|
||||
|
||||
test('renders a resume', t => {
|
||||
t.matchSnapshot(render(resume))
|
||||
|
|
Loading…
Reference in New Issue