Skip to content

Commit

Permalink
frontend-setup #87
Browse files Browse the repository at this point in the history
  • Loading branch information
BARICISSE committed Mar 14, 2020
1 parent c821aac commit 6853573
Show file tree
Hide file tree
Showing 27 changed files with 12,967 additions and 0 deletions.
3 changes: 3 additions & 0 deletions PetAdoptionSystem-Backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions PetAdoptionSystem-Frontent/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-runtime"],
"env": {
"test": {
"presets": ["env", "stage-2"],
"plugins": ["istanbul"]
}
}
}
9 changes: 9 additions & 0 deletions PetAdoptionSystem-Frontent/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
16 changes: 16 additions & 0 deletions PetAdoptionSystem-Frontent/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
test/unit/coverage
test/e2e/reports
selenium-debug.log

# Editor directories and files
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
8 changes: 8 additions & 0 deletions PetAdoptionSystem-Frontent/.postcssrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// https://github.com/michael-ciniawsky/postcss-load-config

module.exports = {
"plugins": {
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}
30 changes: 30 additions & 0 deletions PetAdoptionSystem-Frontent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# petadoptionsystem-frontend

> A vue.js frontend for the Pet Adoption System App
## 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

# build for production and view the bundle analyzer report
npm run build --report

# run unit tests
npm run unit

# run e2e tests
npm run e2e

# run all tests
npm test
```

For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
6 changes: 6 additions & 0 deletions PetAdoptionSystem-Frontent/config/dev.env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var merge = require('webpack-merge')
var prodEnv = require('./prod.env')

module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})
42 changes: 42 additions & 0 deletions PetAdoptionSystem-Frontent/config/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')

module.exports = {
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
productionSourceMap: true,
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report,
port: 8087
},
dev: {
env: require('./dev.env'),
host: '127.0.0.1',
port: 8087,
backendHost: 'https://petadoptionsystem-backend-04-n.herokuapp.com',
backendPort: 8080,
autoOpenBrowser: true,
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// CSS Sourcemaps off by default because relative paths are "buggy"
// with this option, according to the CSS-Loader README
// (https://github.com/webpack/css-loader#sourcemaps)
// In our experience, they generally work as expected,
// just be aware of this issue when enabling this option.
cssSourceMap: false
}
}
3 changes: 3 additions & 0 deletions PetAdoptionSystem-Frontent/config/prod.env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
NODE_ENV: '"production"'
}
6 changes: 6 additions & 0 deletions PetAdoptionSystem-Frontent/config/test.env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var merge = require('webpack-merge')
var devEnv = require('./dev.env')

module.exports = merge(devEnv, {
NODE_ENV: '"testing"'
})
11 changes: 11 additions & 0 deletions PetAdoptionSystem-Frontent/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>petadoptionsystem-frontend</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
Loading

0 comments on commit 6853573

Please sign in to comment.