Skip to content

Commit

Permalink
Add dual-publish
Browse files Browse the repository at this point in the history
  • Loading branch information
alik0211 committed Jan 1, 2021
1 parent 5f52481 commit 1d21b22
Show file tree
Hide file tree
Showing 12 changed files with 246 additions and 27 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/node_modules
/coverage
/dist
/.vscode
/node_modules
/dual-publish-tmp

package-lock.json
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__tests__/**/*
2 changes: 1 addition & 1 deletion __tests__/hardtack.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const hardtack = require('../src/hardtack');
const hardtack = require('../');

const user = {
name: 'Ali',
Expand Down
File renamed without changes.
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const { set } = require('./src/set');
const { get } = require('./src/get');
const { remove } = require('./src/remove');

module.exports = {
set,
get,
remove,
};
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
"name": "hardtack",
"description": "An ultra-light (335 bytes) library for working with cookies in JavaScript",
"version": "4.1.2",
"main": "dist/hardtack.cjs.js",
"module": "dist/hardtack.esm.js",
"types": "src/hardtack.d.ts",
"files": [
"/dist",
"/src"
"index.js",
"src/**/*.js"
],
"license": "MIT",
"keywords": [
Expand Down Expand Up @@ -40,6 +37,7 @@
"@babel/core": "7.12.10",
"@babel/preset-env": "7.12.10",
"@size-limit/preset-small-lib": "4.9.1",
"dual-publish": "1.0.3",
"jest": "26.6.3",
"prettier": "2.2.1",
"rollup": "1.32.1",
Expand Down
File renamed without changes.
9 changes: 0 additions & 9 deletions src/hardtack.js

This file was deleted.

4 changes: 2 additions & 2 deletions src/remove.js → src/remove/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { set } = require('./set');
const { merge } = require('./utils');
const { set } = require('../set');
const { merge } = require('../utils');

function remove(name) {
const options = merge(arguments[1], {
Expand Down
2 changes: 1 addition & 1 deletion src/set.js → src/set/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { merge } = require('./utils');
const { merge } = require('../utils');

function set(name, value) {
const options = merge(arguments[2]);
Expand Down
File renamed without changes.
Loading

0 comments on commit 1d21b22

Please sign in to comment.