Skip to content

Commit

Permalink
[Refactor + Fix]: Code Reorganization (#38)
Browse files Browse the repository at this point in the history
* WIP: lotsa stuff
- bye yarn
- moves code out of giant index.js into smaller files
- adds tests/bir-vue (Vue CLI vanilla) for local testing
- updates CONTRIBUTING
- adds LICENSE

* dev experience stuff!
- adds "dev" script for easier local dev
- code for bir-vue
- no more global img or canvas, it's all local

* sourcemaps for local development

* updates script

* multi-file example

Co-authored-by: Eric Nograles <[email protected]>
  • Loading branch information
ericnograles and Eric Nograles authored Mar 21, 2021
1 parent 3efdb3d commit cda9f8c
Show file tree
Hide file tree
Showing 24 changed files with 32,197 additions and 4,056 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
node_modules
.cache
package-lock.json
9 changes: 4 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ Thanks for helping to shake out any issues with this library! The setup is very

### Prerequisites

- Node.js LTS
- `npm i -g yarn`
- Node.js 14.16.0 and above

### Setup

1. Clone this repo
1. `yarn install`
1. `yarn build` to generate the dist/index.js file
1. `npm i`
1. `npm run build` to generate the dist/index.js file

### Symlinking

Expand All @@ -24,7 +23,7 @@ To test this locally on a web app of your choosing, you'll want to symlink this
1. In this directory, execute `npm link`
1. In your test web app, execute `npm link browser-image-resizer`

Now any changes (via `yarn build` above) will be reflected in your web app.
Now any changes (via `npm run build` above) will be reflected in your web app.

### Removing Symlinks

Expand Down
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2017-2021 Eric Nograles and others

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 change: 1 addition & 0 deletions bin/cut-release
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
set -eux -o pipefail

# Usage: bin/cut-release <npm_version_type>
# npm_version_type: major, minor, patch
# Assumes you have proper access to NPM repo and GitHub repo
npm version $1
npm publish
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js

Large diffs are not rendered by default.

Loading

0 comments on commit cda9f8c

Please sign in to comment.