I'm a happy little skeleton. You can clone me to use as a starter on your projects! I have React, Redux, Sequelize, and Express all just rattling around in here ready to go.
If you don't have it, I'll complain and tell you how to install it.
We recommend that you clone, not fork, this repo – unless your intention is to develop Bones proper instead of using Bones as the starting point for your own application.
Start by doing either of the following:
- Create a GitHub repo and clone it, or
git init
in an empty directory on your machine.
After you have a repo on your machine:
git remote add bones https://github.com/1706-FSA-NY/bones.git
git fetch bones
git merge bones/master
And then you'll have me! If I change – which I probably will – you can get the most recent version by doing this again:
git fetch bones
git merge bones/master
I don't have a name. I think I used to have one, but it turned to dust right along with my heart and liver and pituitary gland and all that stuff.
Anyway, I'll need one. Give me a name in package.json
.
Short and sweet:
npm install
npm run dev
The dev
script sets NODE_ENV
to "development", runs the build script in watch mode, and
starts the server with nodemon
. Build vs server logs are separated by a prefix. If you prefer
to run the server and build processes separately, you can instead do:
npm run start-dev
npm run build-dev
In two separate terminals. The vanilla npm start
is for production — you won't use it in development!
/app
has the React/Redux setup. main.jsx
is the entry point.
/db
has the Sequelize models and database setup. It'll create the database for you if it doesn't exist,
assuming you're using postgres.
/server
has the Express server and routes. start.js
is the entry point.
/bin
has scripts. (Right now it has one script that creates a useful symlink.)
omibear [10:57 AM]
The contribution process is...
- Make an issue (or multiple issues)
- Make a PR that references that issue
- Get it code reviewed by someone on the team, address any comments
- Merge into master (with merge commit)
- Pay attention to the linter!
- Don't use semicolons
- Two spaces
- Trailing commas where possible
const
orlet
overvar
- Use
require
andmodule.exports
in.js
files - Use
import
andexport
in.jsx
files, unlessrequire
makes for cleaner code - Put import statements at top
- Put the default export at bottom
- Consider splitting up any file larger than 50 lines
- Define container components and presentational components in separate files
- Use the "ducks" pattern for redux
- Name files using lowercase-and-dashes instead of camelCase or PascalCase, except for when the default export is a class, then use PascalCase
- Define react components as pure functions (instead of classes) whenever possible