Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Project cleanup (#7)
* Project cleanup

- Use parcel-bundler and remove gulp
- Remove FlyWeb as it has stopped working
- Delete dist folder and add it as gitignore

* Apply prettier

* Remove code for Flyweb feature detection

* Modify tsconfig
  • Loading branch information
kenrick95 committed Jul 5, 2018
1 parent 84d717a commit 37d2e0a
Show file tree
Hide file tree
Showing 78 changed files with 2,777 additions and 5,120 deletions.
89 changes: 80 additions & 9 deletions .gitignore
@@ -1,9 +1,80 @@
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
.DS_Store
/node_modules/
/typings/
npm-debug.log
**/bower_packages
# Created by https://www.gitignore.io/api/node

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless


# End of https://www.gitignore.io/api/node
dist/
5 changes: 5 additions & 0 deletions .prettierrc.json
@@ -0,0 +1,5 @@
{
"tabWidth": 2,
"singleQuote": true,
"semi": false
}
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017 Kenrick
Copyright (c) 2018 Kenrick

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
22 changes: 2 additions & 20 deletions README.md
Expand Up @@ -19,7 +19,7 @@ Read [Wikipedia page on Connect Four](https://en.wikipedia.org/wiki/Connect_Four

## Browser compatibility
- Require browser that supports ES2015's Promise.
- Should be good in latest Firefox, Edge, Chrome, Opera, and Safari; but not IE.
- Should be good in latest Firefox, Edge, Chrome, Opera, Safari, and IE.

## Contributing
Contributions are welcome! I'm happy to accept any kind of contributions, pull requests, or bug reports.
Expand All @@ -34,28 +34,10 @@ Contributions are welcome! I'm happy to accept any kind of contributions, pull r
3. Make your changes at `src/`
4. Generate `dist/` folder:
```
gulp bundle
yarn build
```
5. Open `index.html` in your browser
6. After you are happy with your changes, please submit your Pull Request!

There are also the following Gulp commands available for use:
- `gulp watch`: to watch for file changes and auto-bundle
- `gulp serve`: to serve a local server with auto-bundle-and-refresh
- `gulp ts-lint`: to lint the TypeScript files and standardize syntax
- `gulp bundle`: to bundle everything
- `gulp bundle-only-main`: to bundle only `app.ts` and its dependencies
- `gulp bundle-only-client`: to bundle only `app-flyweb-client.ts` and its dependencies

### Development guidelines

- Two spaces for indentation, line-break at end of file
- I prefer no semicolons, but not a hard rule
- I also prefer `async..await` over callbacks and Promises
- Also other requirements that's too tedious to list down, just run `gulp ts-lint` and fix the errors please :sweat_smile:

## A bit of history
This project was started in December 2013, way back before I took Software Engineering class in my uni, way back before ES2015 and TypeScript is cool. Fast forward to 2017, this project got its first pull request ever and it made me want to improve the code quality. Since I am all-excited about TypeScript and ES2017's async/await at the moment, I decided to rewrite the whole project with those techs. Unfortunately, due to some obscure TypeScript error, I raised the browser compatibility requirement to at least browsers that has ES2015's Promise implemented.

## License
This work is licensed under MIT License.
2 changes: 0 additions & 2 deletions dist/app-flyweb-client.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/app-flyweb-client.js.map

This file was deleted.

2 changes: 0 additions & 2 deletions dist/app.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/app.js.map

This file was deleted.

12 changes: 0 additions & 12 deletions dist/js/app-flyweb-client.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/js/app-flyweb-client.js.map

This file was deleted.

54 changes: 0 additions & 54 deletions dist/js/app.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/js/app.js.map

This file was deleted.

0 comments on commit 37d2e0a

Please sign in to comment.