Skip to content

Commit

Permalink
feat: first release
Browse files Browse the repository at this point in the history
Saifullah-dev committed Aug 22, 2024
1 parent 3126941 commit 1149442
Showing 7 changed files with 5,861 additions and 111 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release

on:
push:
branches:
- main
- next

permissions:
contents: write
issues: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
- run: npm ci
- run: npm run build
- run: npm audit signatures
- name: Release
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
run: npx semantic-release
5,879 changes: 5,776 additions & 103 deletions package-lock.json

Large diffs are not rendered by default.

37 changes: 32 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
{
"name": "react-file-manager",
"private": true,
"version": "0.0.0",
"name": "@cubone/react-file-manager",
"private": false,
"version": "0.0.0-development",
"type": "module",
"module": "dist/react-file-manager.es.js",
"files": [
"dist/",
"README.md"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
"preview": "vite preview",
"semantic-release": "semantic-release"
},
"dependencies": {
"react": "^18.3.1",
@@ -25,6 +34,24 @@
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"sass": "^1.77.6",
"semantic-release": "^24.1.0",
"vite": "^5.3.1"
}
},
"description": "The File Manager Component is an open-source React.js package designed to help developers easily integrate a file manager into their applications. This component provides a user-friendly interface along with essential functionalities for managing files and folders, such as viewing, uploading and deleting within a specified directory structure. Ideal for anyone looking to build or enhance a file management system, this package offers both UI and backend integration capabilities.",
"main": "src/index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/Saifullah-dev/react-file-manager.git"
},
"keywords": [
"react",
"file-manager",
"component"
],
"author": "Saifullah Zubair",
"license": "MIT",
"bugs": {
"url": "https://github.com/Saifullah-dev/react-file-manager/issues"
},
"homepage": "https://github.com/Saifullah-dev/react-file-manager#readme"
}
3 changes: 3 additions & 0 deletions release.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
branches: ["main", { name: "next", prerelease: true }],
};
1 change: 1 addition & 0 deletions src/File Manager/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "./FileManager";
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as FileManager } from "./File Manager/FileManager";
22 changes: 19 additions & 3 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
})
build: {
lib: {
entry: "./src/index.js",
name: "ReactFileManager",
fileName: (format) => `react-file-manager.${format}.js`,
},
rollupOptions: {
external: ["react", "react-dom"],
output: {
globals: {
react: "React",
"react-dom": "ReactDOM",
},
},
},
},
});

0 comments on commit 1149442

Please sign in to comment.