forked from postlight/parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
score-move
executable file
·21 lines (16 loc) · 897 Bytes
/
score-move
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/local/bin/fish
set file $argv[1]
set function $argv[2]
touch src/extractors/generic/next-page-url/scoring/utils/index.js
touch src/extractors/generic/next-page-url/scoring/utils/$file.js
touch src/extractors/generic/next-page-url/scoring/utils/$file.test.js
echo "import assert from 'assert';" > src/extractors/generic/next-page-url/scoring/utils/$file.test.js
echo "" >> src/extractors/generic/next-page-url/scoring/utils/$file.test.js
echo "import $function from './$file';" >> src/extractors/generic/next-page-url/scoring/utils/$file.test.js
echo "" >> src/extractors/generic/next-page-url/scoring/utils/$file.test.js
echo "export { default as $function } from './$file'" >> src/extractors/generic/next-page-url/scoring/utils/index.js
echo "Now make it a default export"
echo "Move it to its file"
echo "Move its tests to its test file"
echo "import in score-links"
echo "Test it."