Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade #41

Merged
merged 11 commits into from
Jun 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .babelrc

This file was deleted.

9 changes: 0 additions & 9 deletions .editorconfig

This file was deleted.

5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
VUE_APP_SPACE_ID=kueynwv98jit
VUE_APP_CDA_TOKEN=8837c1dbf011cfbc5415ed4b4425d3b55276b4b0d87dc37e0beefdc3c43e94b4
VUE_APP_CPA_TOKEN=33b157353efe922b2edfa7f11800750a6dbe22fc3d02046b2620fe1f2dc7f9cf
VUE_APP_CMA_TOKEN=
VUE_APP_MAILER_API=http://localhost:8091/utilities/sendToMaker
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

29 changes: 0 additions & 29 deletions .eslintrc.js

This file was deleted.

19 changes: 9 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
.DS_Store
node_modules/
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/test/unit/coverage/
/test/e2e/reports/
selenium-debug.log
.env

# Ignore production build files since they are automatically generated by Travis
dist/*
# Except sitemap, don't ignore that
!dist/sitemap.xml

# Editor directories and files
.idea
Expand All @@ -20,3 +18,4 @@ dist/*
*.ntvs*
*.njsproj
*.sln
*.sw?
10 changes: 0 additions & 10 deletions .postcssrc.js

This file was deleted.

45 changes: 22 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
# personal-site [![Build Status](https://travis-ci.com/mercedesb/personal-site.svg?branch=master)](https://travis-ci.com/mercedesb/personal-site)
# personal-site

> A Vue.js project

## Build Setup

``` bash
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build
## Project setup
```
yarn install
```

# build for production and view the bundle analyzer report
npm run build --report
### Compiles and hot-reloads for development
```
yarn run serve
```

# run unit tests
npm run unit
### Compiles and minifies for production
```
yarn run build
```

# run e2e tests
npm run e2e
### Run your tests
```
yarn run test
```

# run all tests
npm test
### Lints and fixes files
```
yarn run lint
```

For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
5 changes: 5 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
}
64 changes: 64 additions & 0 deletions build.prerender.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
const path = require("path");

function getClient() {
return require("contentful").createClient({
space: process.env.VUE_APP_SPACE_ID,
accessToken: process.env.VUE_APP_CDA_TOKEN
});
}

async function getBlogRoutes() {
const client = getClient();

return client
.getEntries({
content_type: "blogPost"
})
.then(response =>
response.items.map(item => `/blog/${item.fields.urlSegment}`)
);
}

async function getSpeakingRoutes() {
const client = getClient();

return client
.getEntries({ content_type: "talkPage" })
.then(response =>
response.items.map(item => `/speaking/${item.fields.urlSegment}`)
);
}

// eslint-disable-next-line no-unused-vars
module.exports = (api, _options) => {
api.registerCommand("build:prerender", async args => {
const PrerenderSPAPlugin = require("prerender-spa-plugin");
const PuppeteerRenderer = PrerenderSPAPlugin.PuppeteerRenderer;

const defaultRoutes = ["/", "/about", "/speaking", "/blog", "/resume"];
const blogRoutes = await getBlogRoutes();
const speakingRoutes = await getSpeakingRoutes();
const allRoutes = defaultRoutes.concat(blogRoutes).concat(speakingRoutes);

api.chainWebpack(config => {
config.plugin("prerender").use(PrerenderSPAPlugin, [
{
// Required - The path to the webpack-outputted app to prerender.
staticDir: path.join(__dirname, "dist"),
// Required - Routes to render.
routes: allRoutes,
renderer: new PuppeteerRenderer({
// renderAfterDocumentEvent: 'custom-render-trigger',
renderAfterTime: 5000
})
}
]);
});

await api.service.run("build", args);
});
};

module.exports.defaultModes = {
"build:prerender": "production"
};
48 changes: 0 additions & 48 deletions build/build.js

This file was deleted.

54 changes: 0 additions & 54 deletions build/check-versions.js

This file was deleted.

Loading