Skip to content

Commit 1ecdf7c

Browse files
authored
refactor(lib): refactor library
refactor - Remove webpack, reduce bundle size, bump react version, rewrite core component, split into multiple components
2 parents c2a176c + 57fd987 commit 1ecdf7c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+11614
-27627
lines changed

.babelrc

Lines changed: 0 additions & 11 deletions
This file was deleted.

.editorconfig

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
# http://editorconfig.org
21
root = true
32

43
[*]
4+
charset = utf-8
55
indent_style = space
66
indent_size = 2
77
end_of_line = lf
8-
charset = utf-8
9-
trim_trailing_whitespace = true
108
insert_final_newline = true
11-
12-
[*.md]
139
trim_trailing_whitespace = true

.eslintignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Created by .ignore support plugin (hsz.mobi)
2-
webpack.config.js
1+
build/
32
dist/
43
node_modules/
4+
.snapshots/
5+
*.min.js

.eslintrc

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,46 @@
11
{
22
"parser": "babel-eslint",
3-
"extends": ["airbnb", "prettier", "prettier/react"],
4-
"parserOptions": {
5-
"ecmaVersion": 6,
6-
"sourceType": "module",
7-
"ecmaFeatures": {
8-
"forOf": true,
9-
"jsx": true,
10-
"es6": true,
11-
"experimentalObjectRestSpread": true
12-
}
13-
},
14-
"rules": {
15-
"import/no-extraneous-dependencies": 0,
16-
"import/no-unresolved": 0,
17-
"global-require": 0,
18-
"no-console": 0,
19-
"max-len": 0,
20-
"no-param-reassign": ["error", { "props": false }],
21-
"space-before-function-paren": 0,
22-
"space-before-blocks": 0,
23-
"no-else-return": 0
3+
"extends": [
4+
"standard",
5+
"standard-react",
6+
"plugin:prettier/recommended",
7+
"prettier/standard",
8+
"prettier/react"
9+
],
10+
"env": {
11+
"node": true
2412
},
2513
"overrides": [
2614
{
27-
"files": ["tests/**/*spec.js"],
28-
"rules": {
29-
"no-global-assign": 0
15+
"files": [
16+
"**/*.test.js",
17+
"**/*.test.jsx",
18+
"**/*.spec.js",
19+
"**/*.spec.jsx"
20+
],
21+
"env": {
22+
"jest": true
3023
}
3124
}
3225
],
33-
"plugins": ["react", "jsx-a11y", "babel"],
34-
"env": {
35-
"browser": true,
36-
"jest": true,
37-
"jasmine": true,
38-
"node": true
26+
"parserOptions": {
27+
"ecmaVersion": 2020,
28+
"ecmaFeatures": {
29+
"legacyDecorators": true,
30+
"jsx": true
31+
}
32+
},
33+
"settings": {
34+
"react": {
35+
"version": "16"
36+
}
37+
},
38+
"rules": {
39+
"space-before-function-paren": 0,
40+
"react/prop-types": 0,
41+
"react/jsx-handler-names": 0,
42+
"react/jsx-fragments": 0,
43+
"react/no-unused-prop-types": 0,
44+
"import/export": 0
3945
}
4046
}

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Picker Plugins
2+
on:
3+
push:
4+
branches: [ develop ]
5+
create:
6+
tags:
7+
- v*
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Setup repository env
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: '14.x'
17+
- name: Install deps
18+
run: npm install
19+
- name: Bundle packages
20+
run: npm run build:prod
21+
- name: Run tests
22+
run: npm run test
23+
- name: Build Docs
24+
run: npm run docs:build
25+
- name: Release packages
26+
run: npx gulp publish
27+
env:
28+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
29+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
30+
AWS_REGION: ${{ secrets.AWS_REGION }}
31+
# - name: Publush to NPM (only on tag)
32+
# if: startsWith(github.ref, 'refs/tags/') && success()
33+
# run: npm publish
34+
# env:
35+
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36+
- name: Deploy docs
37+
uses: crazy-max/ghaction-github-pages@v2
38+
with:
39+
target_branch: gh-pages
40+
build_dir: example/build
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+

.gitignore

Lines changed: 21 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,23 @@
1-
# Created by .ignore support plugin (hsz.mobi)
2-
logs
3-
*.log
4-
npm-debug.log*
5-
pids
6-
*.pid
7-
*.seed
8-
lib-cov
9-
.grunt
10-
.lock-wscript
11-
build/Release
1+
2+
# See https://help.github.com/ignore-files/ for more about ignoring files.
3+
4+
# dependencies
125
node_modules
13-
.idea
14-
jspm_packages
15-
.npm
16-
.node_repl_history
17-
.idea/tasks.xml
18-
.idea/dataSources.ids
19-
.idea/dataSources.xml
20-
.idea/dataSources.local.xml
21-
.idea/sqlDataSources.xml
22-
.idea/dynamic.xml
23-
.idea/uiDesigner.xml
24-
.idea/gradle.xml
25-
.idea/libraries
26-
.idea/mongoSettings.xml
27-
*.iws
28-
/out/
29-
.idea_modules/
30-
atlassian-ide-plugin.xml
31-
com_crashlytics_export_strings.xml
32-
crashlytics.properties
33-
crashlytics-build.properties
34-
fabric.properties
35-
/dist/react-filepicker.js.map
36-
/dist/demo.js.map
6+
7+
# builds
8+
build
9+
dist
10+
.rpt2_cache
11+
12+
# misc
3713
.DS_Store
38-
/tests/__coverage__/
39-
/examples/demo/build/
40-
/examples/demo/package-lock.json
41-
/dist
14+
.env
15+
.env.local
16+
.env.development.local
17+
.env.test.local
18+
.env.production.local
19+
.idea
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
14

.prettierrc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"trailingComma": "all",
3-
"tabWidth": 2,
4-
"semi": true,
52
"singleQuote": true,
6-
"printWidth": 180,
7-
"useTabs": false,
3+
"jsxSingleQuote": true,
4+
"semi": true,
5+
"tabWidth": 2,
86
"bracketSpacing": true,
9-
"arrowParens": "always"
7+
"jsxBracketSameLine": false,
8+
"arrowParens": "always",
9+
"trailingComma": "none"
1010
}

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
language: node_js
22
node_js:
3-
- "10"
3+
- 12
4+
- 10

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [3.2.1](https://github.com/filestack/filestack-react/compare/v3.2.0...v3.2.1) (2020-07-29)
6+
57
## [3.2.0](https://github.com/filestack/filestack-react/compare/v3.1.0...v3.2.0) (2020-07-29)
68

79

0 commit comments

Comments
 (0)