Skip to content

Commit

Permalink
Merge pull request #45 from nice-nickname/dev
Browse files Browse the repository at this point in the history
Dev (MAJOR)
  • Loading branch information
nice-nickname authored Feb 4, 2024
2 parents a6b023b + 1c67d87 commit 71b88b7
Show file tree
Hide file tree
Showing 79 changed files with 1,496 additions and 703 deletions.
35 changes: 35 additions & 0 deletions .github/actions/build-release/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 'Build release'
inputs:
target:
description: 'target browser to build'
required: true
default: 'World'

upload-url:
description: 'upload url for release'
required: true

github-token:
description: 'github token'
required: true
runs:
using: "composite"
steps:
- name: build devtools
run: npm run prod:${{ inputs.target }}
shell: bash

- name: archive build
run: |
zip -q -r -9 incoding.profiler.${{ inputs.target }}.zip release/${{ inputs.target }}
shell: bash

- name: upload zip asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
with:
upload_url: ${{ inputs.upload-url }}
asset_path: ./incoding.profiler.${{ inputs.target }}.zip
asset_name: incoding.profiler.${{ inputs.target }}.zip
asset_content_type: application/zip
41 changes: 17 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ jobs:
- name: install dependencies
run: npm ci

- name: build devtools
run: npm run build

- name: archive build
run: |
zip -q -r -9 incoding.profiler.zip public
tar -czf incoding.profiler.tar.gz public
- name: get version
id: get_version
uses: PaulHatch/[email protected]
Expand All @@ -49,22 +41,23 @@ jobs:
draft: false
prerelease: false

- name: upload zip asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: create chrome release
uses: ./.github/actions/build-release
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./incoding.profiler.zip
asset_name: incoding.profiler.zip
asset_content_type: application/zip
target: chrome
upload-url: ${{ steps.create_release.outputs.upload_url }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: upload tar.gz asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: create chrome release
uses: ./.github/actions/build-release
with:
target: edge
upload-url: ${{ steps.create_release.outputs.upload_url }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: create chrome release
uses: ./.github/actions/build-release
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./incoding.profiler.tar.gz
asset_name: incoding.profiler.tar.gz
asset_content_type: application/tar
target: firefox
upload-url: ${{ steps.create_release.outputs.upload_url }}
github-token: ${{ secrets.GITHUB_TOKEN }}
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,5 @@ dist
.pnp.*

# public build files
public/*.js
public/*LICENSE*
public/*.map
debug/
release/
50 changes: 38 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,49 @@
## incoding.profiler
# incoding.profiler

> Profiling devtools for [Incoding.Framework](https://github.com/Incoding-Software/Incoding-Framework).
Profiling devtools for [Incoding.Framework](https://github.com/Incoding-Software/Incoding-Framework).

## Browser support
This exntesion supports only __Chrome 88__ or later (due to Manifet V3)
This extension uses [Manifest V3](https://developer.chrome.com/docs/extensions/mv3/intro/) and currently supports this browsers:

- Chrome
- Microsoft Edge (Chrome)

## Installation

Download latest build archive from [latest release](https://github.com/nice-nickname/incoding.profiler/releases/latest).
You can download latest build archive for all available platforms from [latest release](https://github.com/nice-nickname/incoding.profiler/releases/latest).

But, if you want to create your own build, you'll need to run following commands:

Eiter you can clone this repo and make your own build with following commands (requires [node and npm](https://nodejs.org)):
```bash
cd incoding profiler
# Install dependencies
npm ci
npm run build

# Build extension in production mode
npm run prod:<your_browser>
```

The above command will build the app in production mode, output files are placed in `prod/<your_browser>` folder.

## Run development mode

In order to build the app for development, run the following command:

```bash
# Run build and watch for changes
npm run dev:<your_browser>
```

Then, if build succeeded follow this steps:
- Open browser extensions
- Select __Manage extensions__
- Check __Developer mode__
- Click __Load unpacked__ and select build folder
This will build extension in developer mode and watch for local changes. Use this option only if you want to make any changes in extension sources. Output files will be in `debug/<your_browser>` folder.

## Installation in browser

After you downloaded latest release and choosed desired browser (or created your own build), use output folder with source files and follow these steps:
- Open browser extensions manager
- Select **Manage extensions**
- Check **Developer mode**
- Click **Load packed** and select build folder

### Reloading extension in development mode

If you're running **development** mode, and there is code changes to be applied, just re-open browser devtools, and all files will be updated.
Loading

0 comments on commit 71b88b7

Please sign in to comment.