rn2next.sh 506 B

1234567891011121314
  1. #!/bin/bash
  2. output="next"
  3. rm -rf "${output}"/{compatible,pages,widgets,styles,tools,static} 2>/dev/null
  4. mkdir "${output}"/{compatible,pages,widgets,styles,tools,static}
  5. cp tools/* "${output}"/tools/
  6. cp assets/* "${output}"/static/
  7. cp web/pages/* "${output}"/pages/
  8. cp web/widgets/* "${output}"/widgets/
  9. cp web/styles/* "${output}"/styles/
  10. cp -r pages/tutorial/ "${output}"/compatible/tutorial
  11. sed -r "s/require\('\.\.\/\.\.\/assets\/([^']+)'\)/'\/static\/\1'/g" \
  12. -i "${output}"/compatible/tutorial/*