MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Module to Display JSON data from a FILE

    Scheduled Pinned Locked Moved Solved Requests
    21 Posts 3 Posters 2.7k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      sdetweil @timdows
      last edited by sdetweil

      @timdows you should add a git pre-commit hook to run prettier for whoever…

      here is mine
      .pre-commit

      #!/bin/sh
      FILES=$(git diff --cached --name-only --diff-filter=ACMR "*.js" "*.jsx *.json" | sed 's| |\\ |g')
      [ -z "$FILES" ] && exit 0
      
      # Prettify all selected files
      echo "$FILES" | xargs ./node_modules/.bin/prettier --write
      
      # Add back the modified/prettified files to staging
      echo "$FILES" | xargs git add
      
      exit 0
      

      and an npm postinstall script to copy to the git folder

      #!/bin/bash
      #echo copying git pre-commit hook 
      cp .pre-commit .git/hooks
      

      package.json

        "scripts": {
          "postinstall":"whatever you call it"
      

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • 1
      • 2
      • 3
      • 3 / 3
      • First post
        Last post
      Enjoying MagicMirror? Please consider a donation!
      MagicMirror created by Michael Teeuw.
      Forum managed by Sam, technical setup by Karsten.
      This forum is using NodeBB as its core | Contributors
      Contact | Privacy Policy