Created
          January 12, 2021 08:16 
        
      - 
      
 - 
        
Save maxpeterson/53abc94f49efc3071b1aeaa56cb131df to your computer and use it in GitHub Desktop.  
    Alias to convert / move next project "module" to library
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function nestToLibrary { | |
| name=$1 | |
| if [ -z "$name" ]; then | |
| echo 'No module name provided' | |
| return 1; | |
| fi | |
| nest generate library "${name}" | |
| rm libs/${name}/src/${name}.* | |
| git mv apps/cynomi/src/${name}/* libs/${name}/src | |
| rm -rf "apps/cynomi/src/${name}" | |
| ack "\.?\./${name}/" apps libs -l | xargs sed -i '' -e "s/\.\{1,2\}\/${name}\//@app\/${name}\//" | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment