Skip to content

Commit

Permalink
added additional node scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jlbmagic committed Jul 16, 2024
1 parent df10141 commit b822a25
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified jsDev.fmp12
Binary file not shown.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
"scripts": {
"start": "parcel index.html --no-source-maps",
"reload": "node ./scripts/reload-dev",
"deploy-to-fm": "npm run build && npm run upload",
"deploy-to-fm": "npm run clear-cache && npm run build && npm run upload",
"build": "parcel build index.html",
"upload": "node ./scripts/upload"
"upload": "node ./scripts/upload",
"clear-cache": "rm -rf .parcel-cache dist",
"reset-dev": "npm run clear-cache && npm run start",
"start-fm-dev": "node ./scripts/start-fm-dev",
"open-dev-browser": "open http://localhost:1234"
},
"browserslist": "> 0.5%, last 2 versions, not dead",
"devDependencies": {
Expand Down
14 changes: 14 additions & 0 deletions scripts/start-fm-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, startDevScript, file, server } = config;

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

const fileUrl = `fmp://${server}/${file}?script=${startDevScript}&param=turnOn`;

// const thePath = path.join(__dirname, "../", "dist", "index.html");
// const params = { widgetName, thePath };
const url = fileUrl;
open(url);
1 change: 1 addition & 0 deletions widget.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ module.exports = {
file: "jsDev",
uploadScript: "UploadToHTML",
reloadScript: "Load Widget",
startDevScript: "Set to Dev Mode",
};

0 comments on commit b822a25

Please sign in to comment.