mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-23 19:49:56 +01:00
mobile: fix clipper build output path
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -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);
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user