Skip to content

Commit

Permalink
Merge pull request #1 from bharatpe/dev
Browse files Browse the repository at this point in the history
Init - V0.0.1
  • Loading branch information
krishpe authored Jun 11, 2020
2 parents c833afc + 15b7887 commit bd62520
Show file tree
Hide file tree
Showing 14 changed files with 5,438 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": ["env"],
"plugins": [
"transform-object-rest-spread"
]
}
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/**/*
webpack.config.js
19 changes: 19 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"env": {
"browser": true,
"jest": true,
"es6": true
},
"parser": "babel-eslint",
"plugins": ["import"],
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"no-console": 0,
"no-eval": "error",
"import/first": "error"
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
# js-utils
Mini Utils library with most common utils.
# Utileo [![NPM version](https://img.shields.io/npm/v/utileo.svg)](https://www.npmjs.com/package/utileo) [![Downloads](http://img.shields.io/npm/dm/utileo.svg)](https://npmjs.org/package/utileo)

A mini regex library for most commonly used patterns

![Utileo](/assets/utileo.png)


# Getting Started (Installation)

```javascript
yarn add utileo

or

npm i utileo --save-dev
```

## Contributors
Here [Contributors](https://github.com/bharatpe/utileo/graphs/contributors)


## License
MIT @[bharatpe](https://bharatpe.in)
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-cayman
Binary file added assets/utileo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/lib.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "utileo",
"version": "0.0.1",
"description": "JS library with most common utils.",
"main": "dist/lib.js",
"module": "dist/lib.js",
"scripts": {
"build": "set NODE_ENV=production && webpack --config webpack.config.js --progress -p",
"lint": "eslint src/.",
"lint:fix": "eslint --fix src/."
},
"devDependencies": {
"babel": "^6.23.0",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-eslint": "^10.1.0",
"babel-loader": "^7.1.5",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1",
"clean-webpack-plugin": "^3.0.0",
"eslint": "^6.8.0",
"eslint-plugin-import": "^2.20.2",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11"
},
"author": "WebChapter | Bharatpe",
"license": "ISC",
"dependencies": {
"terser-webpack-plugin": "^3.0.3"
}
}
Empty file added src/DateUtils.js
Empty file.
Empty file added src/StorageUtils.js
Empty file.
7 changes: 7 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import StorageUtils from './StorageUtils';
import DateUtils from './DateUtils';

export {
StorageUtils,
DateUtils
};
41 changes: 41 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin')

// eslint-disable-next-line no-undef
module.exports = {
// eslint-disable-next-line no-undef
entry : __dirname + '/src/index.js',
mode: 'production',
module : {
rules : [
{
test : /\.js$/,
// eslint-disable-next-line no-undef
include : path.resolve(__dirname, 'src'),
exclude: /node_modules/,
loaders : 'babel-loader'
}
]
},
output : {
filename : 'lib.js',
// eslint-disable-next-line no-undef
path : path.resolve(__dirname, 'dist'),
library: 'validator',
libraryTarget: 'commonjs2',
},
plugins: [
new CleanWebpackPlugin(),
new TerserPlugin({
parallel: true,
terserOptions: {
ecma: 6,
},
})
],
optimization: {
minimizer: [new UglifyJsPlugin()],
},
}
Loading

0 comments on commit bd62520

Please sign in to comment.