Skip to content

Commit

Permalink
Refactor readme.md and remove added configuration for library
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-dharti-r committed Jan 10, 2024
1 parent 08c4616 commit e1b25c6
Show file tree
Hide file tree
Showing 30 changed files with 855 additions and 4,872 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Web File Management with Preview - Fully Customized

A versatile and user-friendly file management system built for vue and react that allows for single and multiple file uploading with a preview feature. It allows you to select files and preview them, returning an array of selected files. It allows customizing design by overriding the style classes.
A versatile and user-friendly file management system built for Vue and React that allows single and multiple file uploading with a preview feature, returning an array of selected files. It supports custom designs by overriding the style classes.

<img src="./gifs/full.gif"/>

---

### This repository contains two component library, one for Vue and one for React. Each has its own set of features and information. Explore the individual folders for more details.
### The library provides support for Vue and React. Each has its own set of features and information. Explore the individual folders for more details.

## Vue File Upload

Expand Down
21 changes: 21 additions & 0 deletions react/.github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish Package to npmjs

on:
push:
branches:
- main

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8 changes: 7 additions & 1 deletion react/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,10 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts

src/app/style.scss
# src/app/style.scss

index.mjs
index.umd.js
next.svg
vercel.svg
style.css
43 changes: 1 addition & 42 deletions react/.npmignore
Original file line number Diff line number Diff line change
@@ -1,42 +1 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

.vscode/*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

src/app/style.scss
examples/
gifs/
/*
28 changes: 10 additions & 18 deletions react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ React file management system built with React, Next.js and TypeScript that allow
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Configuration](#configuration)
- [Properties and Events](#properties-and-events)
- [Usage](#usage)

Expand Down Expand Up @@ -41,22 +40,6 @@ Using yarn:
yarn add @canopassoftware/react-file-upload
```

### Configuration

- If you face any `loader` or `typescript` realted issue after started using components from library then add this in your config file.

```js
transpilePackages: ["@canopassoftware/react-file-upload"],
webpack: (config) => {
config.resolve.extensionAlias = {
".js": [".ts", ".tsx", ".js", ".jsx"],
".mjs": [".mts", ".mjs"],
".cjs": [".cts", ".cjs"],
};
return config;
},
```

Note: we have already configure this in demo project. so, refer it for more information.

---
Expand Down Expand Up @@ -134,14 +117,23 @@ const {
MultipleFileUpload,
} = require("@canopassoftware/react-file-upload");

OR;
OR

// using esModules
import {
SingleFileUpload,
MultipleFileUpload,
} from "@canopassoftware/react-file-upload";
```

### Use default CSS

- Use `style.css` for UI by importing like,

```js
import "@canopassoftware/react-file-upload/style.css"
```

### Creating custom UI with file preview

- You can customize file uploading UI in inner part of component.
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
1 change: 1 addition & 0 deletions react/examples/CanvasView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import Image, { StaticImageData } from "next/image";
import React, { useState } from "react";
import "@canopassoftware/react-file-upload/style.css"
import {
SingleFileUpload,
MultipleFileUpload,
Expand Down
1 change: 1 addition & 0 deletions react/examples/LongSquareView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import Image, { StaticImageData } from "next/image";
import React, { useState } from "react";
import placeHolderImg from "../assets/images/placeholder.png";
import "@canopassoftware/react-file-upload/style.css"
import {
SingleFileUpload,
MultipleFileUpload,
Expand Down
1 change: 1 addition & 0 deletions react/examples/RoundView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import Image, { StaticImageData } from "next/image";
import React, { useState } from "react";
import placeHolderImg from "../assets/images/placeholder.png";
import "@canopassoftware/react-file-upload/style.css"
import {
SingleFileUpload,
MultipleFileUpload,
Expand Down
1 change: 1 addition & 0 deletions react/examples/SquareView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import Image, { StaticImageData } from "next/image";
import React, { useState } from "react";
import placeHolderImg from "../assets/images/placeholder.png";
import "@canopassoftware/react-file-upload/style.css"
import {
SingleFileUpload,
MultipleFileUpload,
Expand Down
9 changes: 0 additions & 9 deletions react/examples/demo/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@ const nextConfig = {
images: {
domains: ["picsum.photos"],
},
transpilePackages: ["@canopassoftware/react-file-upload"],
webpack: (config) => {
config.resolve.extensionAlias = {
".js": [".ts", ".tsx", ".js", ".jsx"],
".mjs": [".mts", ".mjs"],
".cjs": [".cts", ".cjs"],
};
return config;
},
};

module.exports = nextConfig;
Loading

0 comments on commit e1b25c6

Please sign in to comment.