Skip to content

Commit

Permalink
feat: basic build using unbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
Chalks committed Dec 16, 2023
1 parent 8fd995b commit 4a98ccb
Show file tree
Hide file tree
Showing 7 changed files with 4,997 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
4,916 changes: 4,916 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "sjwt",
"version": "1.0.0",
"description": "Use Simple JWT the even easier way",
"files": ["dist"],
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.cjs",
"type": "module",
"scripts": {
"build": "unbuild",
"test": "test"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Simple-JWT/sjwt.git"
},
"keywords": [
"sjwt",
"simple",
"jwt",
"jwt",
"authentication",
"users"
],
"author": "Jonathan Walters",
"license": "MIT",
"bugs": {
"url": "https://github.com/Simple-JWT/sjwt/issues"
},
"homepage": "https://simplejwt.com",
"devDependencies": {
"unbuild": "^2.0.0"
}
}
7 changes: 7 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import register from './register.js';
import login from './login.js';

export {
register,
login,
};
7 changes: 7 additions & 0 deletions src/lib/store.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const store = ({
user,
}) => {
console.log('stored: ', user);
};

export default store;
12 changes: 12 additions & 0 deletions src/login.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import defaultStore from './lib/store.js';

const login = ({
email,
password,
projectId,
store = defaultStore,
}) => {
console.log('login', {email, password, projectId, store});
};

export default login;
14 changes: 14 additions & 0 deletions src/register.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import defaultStore from './lib/store.js';

const register = ({
email,
password,
projectId,
store = defaultStore,
}) => {
console.log('register', {email, password, projectId, store});
const user = {email, password};
store({user});
};

export default register;

0 comments on commit 4a98ccb

Please sign in to comment.