Skip to content

Commit ac17a9f

Browse files
author
Jeppe Reinhold
committed
updated readme
1 parent ea1b18c commit ac17a9f

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

.circleci/deploy.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# CHANGE IP HERE!!!
44
PRODUCTION_HOST=111.111.111.111
55
STAGING_HOST=222.222.222.222
6+
USER=somebot
67

78
# install rsync, and trust the host
89
function prepareRsync {
@@ -14,11 +15,11 @@ function prepareRsync {
1415
if [ "${CIRCLE_BRANCH}" == "develop" ]; then
1516
echo "Deploying to develop"
1617
prepareRsync
17-
rsync --recursive --verbose --update --omit-dir-times ./build/* circlecibot@${STAGING_HOST}:/var/www/frontend --delete
18+
rsync --recursive --verbose --update --omit-dir-times ./build/* ${USER}@${STAGING_HOST}:/var/www/ --delete
1819
elif [ "${CIRCLE_BRANCH}" == "master" ]; then
1920
echo "Deploying to master"
2021
prepareRsync
21-
rsync --recursive --verbose --update --omit-dir-times ./build/* circlecibot@${PRODUCTION_HOST}:/var/www/frontend --delete
22+
rsync --recursive --verbose --update --omit-dir-times ./build/* ${USER}@${PRODUCTION_HOST}:/var/www/ --delete
2223
else
2324
echo "Not deploying, because on branch ${CIRCLE_BRANCH}"
2425
fi

README.md

+24-4
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,31 @@ That last bit is important. If you have any suggestions or something you want to
1818

1919
# Using it
2020

21+
The repo is mainly a collection of configuration files, but also includes some examples, for the tools to be able to work.
22+
To try out the tools, clone the repo, run `yarn install`, and try the different commands. The CircleCI configuration can also be tested,
23+
by simply adding the cloned repo to your CircleCI account.
24+
25+
## Caveats
26+
27+
Not everything works out of the box (as this repo was never intended to be cloned and used as is).
28+
29+
- `yarn analyze` will fail, because the example only includes one bundle, and `source-map-explorer` will therefore complain that is has nothing to check.
30+
- The deployment script found in `.circleci/deploy.sh` will fail in CircleCI for multiple reasons.
31+
- The IPs and user variables are random, and should be updated according to your own needs.
32+
- CircleCI hasn't been given SSH access to your servers. You can add SSH keys in CircleCI by opening the project in CircleCI > Settings > SSH Permissions
33+
- This naturally means that running CircleCI on this project will fail miserably.
34+
2135
# The commands
2236

2337
- `yarn format` - format code syntax across project.
2438
- `yarn lint` - lint code style across project.
39+
- `yarn typecheck` - Runs typechecking on all TypeScript files.
2540
- `yarn test` - run all tests.
26-
- `yarn watch` - continously run all tests, watching for file changes.
41+
- `yarn watch` - continuously run all tests, watching for file changes.
2742
- `yarn plop` - generate new files.
28-
- `yarn analyze` - analyze the bundle, and visualize the dependency tree.
43+
- `yarn build` - compile TypeScript files to `build` directory.
44+
- `yarn analyze` - analyze the bundle, and visualize the dependency tree. Requires that the project has been built beforehand.
2945
- `yarn analyze:ci` - generate an html file with the dependency tree - should only be used by CircleCI, not manually.
30-
- `yarn build` - compile TypeScript files to JavaScript.
3146

3247
# The tools
3348
Each tool will briefly be described in this section, along with the command to run it.
@@ -80,11 +95,16 @@ Used to get an overview of all the dependencies in your project, to scout for un
8095
The repo has the following structure:
8196
```
8297
project-root
83-
│ README.md // you're reading it
8498
│ package.json // Contains all the dependencies, and describes the scripts
8599
│ plopfile.js // Configures the plop generator
86100
│ tslint.json // Rules for TSLint
87101
│ tsconfig.json // Configuration for TypeScript - is very different for each project!
102+
│ ...
103+
104+
└───src
105+
│ │ index.ts // Example code
106+
│ └───components // Example code
107+
│ └───__tests__ // Example tests
88108
89109
└───.circleci
90110
│ │ config.yml // Configuration for the CircleCI steps

0 commit comments

Comments
 (0)