mobile: fix clipper build output path

This commit is contained in:
Ammar Ahmed
2023-09-21 17:18:35 +05:00
committed by Ammar Ahmed
parent 788429efb7
commit 2592a90853
4 changed files with 15 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@@ -77,18 +77,22 @@ function clip(message: ClipMessage) {
const isScreenshot = message.mode === "screenshot";
const withStyles = message.mode === "complete" || isScreenshot;
if (config) {
config.styles = withStyles;
}
if (isScreenshot && message.area === "full-page") {
return clipScreenshot(document.body, "jpeg", config);
} else if (message.area === "full-page") {
return clipPage(document, withStyles, false, config);
return clipPage(document, false, config);
} else if (message.area === "selection") {
enterNodeSelectionMode(document, config).then((result) =>
browser.runtime.sendMessage({ type: "manual", data: result })
);
} else if (message.area === "article") {
return clipArticle(document, withStyles, config);
return clipArticle(document, config);
} else if (message.area === "visible") {
return clipPage(document, withStyles, true, config);
return clipPage(document, true, config);
}
} catch (e) {
console.error(e);

View File

@@ -16,12 +16,13 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { clipArticle } from "./index";
import { clipArticle, clipPage } from "./index";
declare module global {
var Clipper: any;
}
global.Clipper = {
clipArticle
clipArticle,
clipPage
};

View File

@@ -23,6 +23,9 @@ module.exports = {
mode: "production",
output: {
filename: "clipper.bundle.js",
path: path.resolve(__dirname, "../../apps/mobile/native/ios")
path: path.resolve(
__dirname,
"../../apps/mobile/native/ios/extension.bundle"
)
}
};