You'll need Git and a recent version of Node.JS (v8.0.0+
allows for =>
(arrow functions), async
, and await
)
this repo is a template of https://github.com/vuejs-templates/webpack
- Navigate to where you'd like to save the project
- run
git clone https://github.com/NMU-CS-BIO-Collab/chickadee-frontend.git
- Navigate to inside the project
- Run
npm install
this downloads all the project's dependencies and devDependencies in package.json - Copy and rename
config.example.js
toconfig.js
- Edit
config.js
with the correct testing port numbers. (Ask someone for them.)
- Use command prompt.
- Navigate to the directory which contains the package.json file.
npm run dev
executes the devstart script in package.json- go to http://127.0.0.1:8082
The frontend is ran with tmux. This allows for the site to remain up without an ssh terminal open.
- Login to Euclid with the special bird account. (Ask someone for the credentials.)
- Check the current sessions with
tmux ls
- End the current tmux session if needed with
tmux kill-session -t frontend-test
- start another session
tmux new -s frontend-test
npm run start
- Close the terminal with the "x" close in the corner.
- Confirm
- Verifiy that the website is still up.
The files are compiled and then staticlly served. "Serverless website"
chickadee/
├─pub/
│ ├─index.html
│ └─static/ (automatically compiled)
└─frontend/
- Login to Euclid with the special bird account. (Ask someone for the credentials.)
- go to the production frontend
cd frontend
git pull
the changesnpm run build
- done!
No-one should ever have to do this again. But it was such a pain to figure out I'm going to write it down somewhere. http://vuejs-templates.github.io/webpack/backend.html
FILENAME: config/index.js
...
...
build: {
index: path.resolve(__dirname, '../../pub/index.html'),
assetsRoot: path.resolve(__dirname, './../../pub/'),
assetsSubDirectory: 'static',
assetsPublicPath: '/~chickadee/',
productionSourceMap: false,
...
...
}