Hi Sebastian This is interesting. Is there are any chance you could write it up for others to follow? I note that the scripts reference bin/updateVersion.js which must be something new.
Best wishes Jeremy > On 20 Sep 2019, at 08:31, Sebastian Ovide <[email protected]> wrote: > > Enter code here... > > thanks both. > > I did some progress. Now I can run > > npm run serve > > > and it will open a browser, build. When there are changes, it will rebuild > and restart the server. The only manual operation is to click reload in the > browser. > > "scripts": { > "test": "npm run build", > "build": "npm run build:prepare && npm run build:TW", > "build:prepare": "mkdir -p build/ && cp > node_modules/tiddlywiki/editions/server/tiddlywiki.info > <http://tiddlywiki.info/> build/ && node bin/updateVersion.js", > "build:TW": "tiddlywiki ++./plugin build --verbose --output > build/gh-pages/ --build index", > "serve:start": "npm run serve:stop && tiddlywiki ++./plugin build > --verbose --listen || echo killed", > "serve:stop": "pkill -f \"node `which tiddlywiki`\" || echo nothing > running", > "serve:open-browser-delayed": "sleep 2 && open-cli http://127.0.0.1:8080 > <http://127.0.0.1:8080/> --background &", > "serve:listen-changes": "chokidar \"plugin/**/*.tid\" \"plugin/**/*.js\" > -c \"npm build && npm run serve:start\" --initial", > "serve": "npm run serve:open-browser-delayed && npm run > serve:listen-changes" > }, > > > On Friday, 20 September 2019 02:35:42 UTC+1, TonyM wrote: > On single file wikis we have the tinka plugin packer. > > Perhaps you could identify some methods to simplify your plugin builds at > this software layer instead. > > Be warned the packer removes the standard tiddlers as it packs. > > Also I do not know what the ultimate impact on node plugin tiddlers are. > > Regards > Tony > > On Thursday, September 19, 2019 at 5:02:30 PM UTC+10, Sebastian Ovide wrote: > Hello > > I've working on a plugin and not sure if is there a better way of dealing > with the dev cycle. Here is what I do > > 1) change the code > 2) build > 3) run the server ("--listen") with ++myuplugin > > everytime I change the code I need to do it all again. > > "scripts": { > "test": "npm run build", > "build": "npm run build:prepare && npm run build:TW", > "build:prepare": "mkdir -p build/ && cp > node_modules/tiddlywiki/editions/server/tiddlywiki.info > <http://tiddlywiki.info/> build/ && node bin/updateVersion.js", > "build:TW": "tiddlywiki ++./plugin build --verbose --output > build/gh-pages/ --build index", > "serve": "npm run build && (sleep 2 && open-cli http://127.0.0.1:8080 > <http://127.0.0.1:8080/> --background) && tiddlywiki ++./plugin build > --verbose --listen" > }, > > Is there a better way ? something that would build and refresh the browser if > I change any code in the plug in? perhaps can tiddlywiki --listen support > some kind of file watcher ? > > thanks > > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWikiDev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tiddlywikidev/658f8456-c107-4cf3-b935-2c0f1688c92d%40googlegroups.com > > <https://groups.google.com/d/msgid/tiddlywikidev/658f8456-c107-4cf3-b935-2c0f1688c92d%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/520472EE-4DF0-4F6E-A0D5-AF1A5EFC3B54%40gmail.com.
