Skip to content

Commit cda9f8c

Browse files
ericnogralesEric Nograles
and
Eric Nograles
authored
[Refactor + Fix]: Code Reorganization (#38)
* 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]>
1 parent 3efdb3d commit cda9f8c

24 files changed

+32197
-4056
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
node_modules
22
.cache
3-
package-lock.json

CONTRIBUTING.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ Thanks for helping to shake out any issues with this library! The setup is very
88

99
### Prerequisites
1010

11-
- Node.js LTS
12-
- `npm i -g yarn`
11+
- Node.js 14.16.0 and above
1312

1413
### Setup
1514

1615
1. Clone this repo
17-
1. `yarn install`
18-
1. `yarn build` to generate the dist/index.js file
16+
1. `npm i`
17+
1. `npm run build` to generate the dist/index.js file
1918

2019
### Symlinking
2120

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

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

2928
### Removing Symlinks
3029

LICENSE

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2017-2021 Eric Nograles and others
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be
12+
included in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

bin/cut-release

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
set -eux -o pipefail
33

44
# Usage: bin/cut-release <npm_version_type>
5+
# npm_version_type: major, minor, patch
56
# Assumes you have proper access to NPM repo and GitHub repo
67
npm version $1
78
npm publish

dist/index.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)