Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
Adding build test #101
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanmayer committed Jun 7, 2021
1 parent 8138617 commit 7b649c9
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "@mozilla/web-science",
"version": "0.2.0",
"scripts": {
"lint": "eslint ."
"lint": "eslint .",
"build": "cd tests/build/ && rollup -c"
},
"dependencies": {
"rollup": "^2.41.4",
Expand Down
21 changes: 21 additions & 0 deletions tests/build/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"description": "A build test for the WebScience library.",
"author": "Mozilla",
"manifest_version": 2,
"name": "WebScience Build Test",
"version": "1.0.0",
"homepage_url": "https://github.com/mozilla-rally/web-science",

"browser_specific_settings": {
"gecko": {
"id": "[email protected]",
"strict_min_version": "87.0"
}
},

"background": {
"scripts": ["dist/background.js"]
},

"incognito": "not_allowed"
}
22 changes: 22 additions & 0 deletions tests/build/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import commonjs from "@rollup/plugin-commonjs";
import resolve from "@rollup/plugin-node-resolve";
import webScienceRollupPlugin from "@mozilla/web-science/rollup-plugin";

export default (cliArgs) => {
const rollupConfig = [
{
input: "src/background.js",
output: {
file: "dist/background.js",
},
plugins: [
webScienceRollupPlugin(),
resolve({
browser: true,
}),
commonjs(),
],
}
];
return rollupConfig;
}
1 change: 1 addition & 0 deletions tests/build/src/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import * as WebScience from "../../../src/webScience.js";

0 comments on commit 7b649c9

Please sign in to comment.