Skip to content

Commit

Permalink
Update React development stack (#72)
Browse files Browse the repository at this point in the history
* Remove old project structure

* Initialize project using Create React App

npx create-react-app exportify --template typescript

(https://create-react-app.dev/docs/adding-typescript/)

* Add dependencies

- JSZip
- FileSaver.js
- jQuery for legacy code support
- Fontawesome
- Sass
- Bootstrap and Bootstrap React

Keeping old version of Bootstrap for now (upgrade to come later)

* Migrate Exportify to create-react-app stack

- Yarn for dependency management
- react-fontawesome for Font Awesome 5 icon components
- TypeScript (more to come)
- SASS support
- JSZip upgrade

Note: I've kept certain things like Bootstrap 3 and jQuery in order to make changes incrementally.

* Add test suite

- Auth redirect flow
- Playlist loading (snapshot)
- Single playlist export
- Export all playlists

* Add Bugsnag for error monitoring

* Replace bind(this) with arrow functions

* Use literals template for string concatenation

* Update README.md for create-react-app  development stack

* Don't use Bugsnag in development environment
  • Loading branch information
watsonbox committed Nov 11, 2020
1 parent 7fcc92e commit 09f4d08
Show file tree
Hide file tree
Showing 36 changed files with 14,075 additions and 847 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

*.csv
.ipynb_checkpoints
.~*
25 changes: 9 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
os: osx

before_install:
- brew cask install phantomjs
- git clone git://github.com/n1k0/casperjs.git /tmp/casperjs
- export PATH=/tmp/casperjs/bin/:$PATH

before_script:
- phantomjs --version
- casperjs --version
- python -m SimpleHTTPServer 8080 &
- sleep 10

language: node_js
node_js:
- "stable"
cache:
directories:
- node_modules
script:
- casperjs test test/integration

- yarn build
- yarn test
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
keep_history: true
local_dir: build
on:
branch: master
33 changes: 24 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,26 @@ Track data is exported in [CSV](http://en.wikipedia.org/wiki/Comma-separated_val

## Development

Developers wishing to make changes to Exportify should use a local web server. For example, using Python 2.7 (in the Exportify repo dir):
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

```bash
python -m SimpleHTTPServer
```
In the project directory, you can run:

For Python 3 (in the Exportify repo dir):
**`yarn start`**

```bash
python -m http.server 8000
```
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

Then open [http://localhost:8000/](http://localhost:8000/).
**`yarn test`**

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

**`yarn build`**

Builds the app for production to the `build` folder.


## Notes
Expand All @@ -74,3 +80,12 @@ Then open [http://localhost:8000/](http://localhost:8000/).
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request


## Error Monitoring

Error monitoring provided by Bugsnag.

<a href="http://www.bugsnag.com">
<img src="bugsnag.png" width="200" />
</a>
Binary file added bugsnag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 09f4d08

Please sign in to comment.