Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npx lockfile-lint --path package-lock.json --validate-https
- run: npx lockfile-lint --path package-lock.json --allowed-schemes 'file:' 'https:'

Vitest:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -63,13 +63,7 @@ jobs:
node-version-file: '.nvmrc'
cache: npm
- run: npm ci
- run: npm run build:webpack -- --json webpack-stats.json
- name: Send webpack stats to RelativeCI
if: matrix.os == 'ubuntu-latest'
uses: relative-ci/agent-action@v2
with:
webpackStatsFile: ./webpack-stats.json
key: ${{ secrets.RELATIVE_CI_KEY }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We lose relative-ci though 🥲 It'll come "soon"

- run: npm run build:parcel
- uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-latest'
with:
Expand All @@ -81,7 +75,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm run build:webpack
- run: npm run build:parcel
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
Expand Down
8 changes: 8 additions & 0 deletions .parcelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "@parcel/config-webextension",
"transformers": {
"readme.md": ["parcel-transformer-rgh"]
},
"namers": ["@mischnic/parcel-namer-preserve-structure", "..."],
"reporters": ["...", "parcel-reporter-clean-dist"]
}
11 changes: 11 additions & 0 deletions .terserrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"mangle": false,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false ironically triggers "obfucation" warning in the Chrome store, so I'll have to undo it

"compress": {
"sequences": false,
"conditionals": false
},
"output": {
"beautify": true,
"indent_level": 2
}
}
1 change: 0 additions & 1 deletion .xo-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"overrides": [
{
"files": [
"webpack.config.ts",
"build/*"
],
"rules": {
Expand Down
1 change: 1 addition & 0 deletions build/parcel-transformer-rgh/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
16 changes: 16 additions & 0 deletions build/parcel-transformer-rgh/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// TODO: https://github.com/parcel-bundler/parcel/issues/7639
import {Transformer} from '@parcel/plugin';

import {getImportedFeatures, getFeaturesMeta} from '../readme-parser';

export default new Transformer({
async transform({asset}) {
const code = `
module.exports.importedFeatures = ${JSON.stringify(getImportedFeatures())};
module.exports.featuresMeta = ${JSON.stringify(getFeaturesMeta())};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't ask me why export const importedFeatures doesn't work. It says it's "not exported".

`;
asset.setCode(code);
asset.type = 'js';
return [asset];
},
});
Loading