Skip to content

Commit

Permalink
Updates to package, added scripting
Browse files Browse the repository at this point in the history
  • Loading branch information
jlbmagic committed Mar 3, 2024
1 parent fc03ee0 commit 67b5526
Show file tree
Hide file tree
Showing 7 changed files with 1,577 additions and 1,242 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified jsDev.fmp12
Binary file not shown.
2,796 changes: 1,559 additions & 1,237 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
"description": "a generic development environment for developing JS in FileMaker",
"scripts": {
"start": "parcel index.html --no-source-maps",
"build": "parcel build index.html",
"upload": "node ./scripts/upload",
"reload": "node ./scripts/reload-dev",
"deploy-to-fm": "npm run build && npm run upload",
"openfile": "node ./scripts/openFileOnServer",
"test": "echo \"Error: no test specified\" && exit 1"
"build": "parcel build index.html",
"upload": "node ./scripts/upload"
},
"browserslist": "> 0.5%, last 2 versions, not dead",
"devDependencies": {
Expand Down
14 changes: 14 additions & 0 deletions scripts/reload-dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env node
const config = require("../widget.config");

const { widgetName, reloadScript, file, server } = config;

const open = require("open");
const path = require("path");

const fileUrl = `fmp://${server}/${file}?script=${reloadScript}`;

// const thePath = path.join(__dirname, "../", "dist", "index.html");
// const params = { widgetName, thePath };
const url = fileUrl;
open(url);
1 change: 0 additions & 1 deletion scripts/upload.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env node
const config = require("../widget.config");

const { widgetName, uploadScript, file, server } = config;
Expand Down
1 change: 1 addition & 0 deletions widget.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ module.exports = {
server: "$",
file: "jsDev",
uploadScript: "UploadToHTML",
reloadScript: "Load Widget",
};

0 comments on commit 67b5526

Please sign in to comment.