-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add isInArray function and write tests & change webpack to rollup
- Loading branch information
1 parent
62de9a9
commit 6f0fb82
Showing
22 changed files
with
6,534 additions
and
10,156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["@babel/preset-env"] | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import PersianDate from "@alireza-ab/persian-date"; | ||
|
||
export default (ctx, inject) => { | ||
const persianDate = new PersianDate(); | ||
ctx.$PersianDate = persianDate; | ||
inject("PersianDate", persianDate); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import { defineConfig } from "rollup"; | ||
import { nodeResolve } from "@rollup/plugin-node-resolve"; | ||
import { babel } from "@rollup/plugin-babel"; | ||
import { terser } from "rollup-plugin-terser"; | ||
|
||
export default defineConfig({ | ||
input: "src/PersianDate.js", | ||
output: [ | ||
{ | ||
file: "dist/PersianDate.js", | ||
format: "cjs", | ||
exports: "auto", | ||
}, | ||
{ | ||
file: "dist/PersianDate.min.js", | ||
format: "cjs", | ||
plugins: [terser()], | ||
exports: "auto", | ||
}, | ||
{ | ||
file: "dist/PersianDate.umd.js", | ||
format: "umd", | ||
name: "PersianDate", | ||
}, | ||
{ | ||
file: "dist/PersianDate.umd.min.js", | ||
format: "umd", | ||
plugins: [terser()], | ||
name: "PersianDate", | ||
}, | ||
], | ||
plugins: [nodeResolve(), babel({ babelHelpers: "bundled" })], | ||
}); | ||
// const path = require('path'); | ||
// module.exports = [ | ||
// { | ||
// mode: "development", | ||
// target: "node", | ||
// entry: './src/PersianDate.js', | ||
// devtool: 'source-map', | ||
// output: { | ||
// path: path.resolve(__dirname, "dist"), | ||
// filename: 'PersianDate.js', | ||
// library: "PersianDate", | ||
// libraryTarget: "umd", | ||
// libraryExport: "default", | ||
// }, | ||
// }, | ||
// { | ||
// mode: "production", | ||
// target: "node", | ||
// entry: './src/PersianDate.js', | ||
// devtool: 'source-map', | ||
// output: { | ||
// path: path.resolve(__dirname, "dist"), | ||
// filename: 'PersianDate.min.js', | ||
// library: "PersianDate", | ||
// libraryTarget: "umd", | ||
// libraryExport: "default", | ||
// }, | ||
// }, | ||
// { | ||
// mode: "development", | ||
// entry: './src/PersianDate.js', | ||
// devtool: 'source-map', | ||
// output: { | ||
// path: path.resolve(__dirname, "dist"), | ||
// filename: 'PersianDate.umd.js', | ||
// library: "PersianDate", | ||
// libraryTarget: "umd", | ||
// libraryExport: "default", | ||
// }, | ||
// }, | ||
// { | ||
// mode: "production", | ||
// entry: './src/PersianDate.js', | ||
// devtool: 'source-map', | ||
// output: { | ||
// path: path.resolve(__dirname, "dist"), | ||
// filename: 'PersianDate.umd.min.js', | ||
// library: "PersianDate", | ||
// libraryTarget: "umd", | ||
// libraryExport: "default", | ||
// }, | ||
// } | ||
// ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { isSame } from "."; | ||
|
||
export function isInArray(array) { | ||
return array.some((date) => isSame.call(this, date)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.