Skip to content

Instantly share code, notes, and snippets.

@BBlackwo
Last active January 24, 2018 04:51
Show Gist options
  • Save BBlackwo/48e4a54215d79f443fda34ce8b50c2d6 to your computer and use it in GitHub Desktop.
Save BBlackwo/48e4a54215d79f443fda34ce8b50c2d6 to your computer and use it in GitHub Desktop.
find + sed to create `index.js` files
find . -type f -name '*.js' \
-not -name '*.specs.js' \
-not -name '*.spec.js' \
-not -name '*.fn.js' \
-not -name '*.page.js' \
-not -name 'index.js'|\
sed "s/^/import \'/g" |\
sed 's/.js$/\';/g' \
> index.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment