Created
October 4, 2019 23:32
-
-
Save david-mart/24bac98aa0de0c698e3e044faeaf9fc6 to your computer and use it in GitHub Desktop.
vue template create
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
#!/bin/bash | |
# brew install gnu-sed | |
var1=$1 | |
name=`echo -n "${var1}" | gsed -e 's/-/ /g' -e 's/\b\(.\)/\u\1/g' -e 's/ //g' ` | |
rm -rf $PWD/$name.vue | |
rm -rf $PWD/$name.scss | |
echo '<template> | |
<div class="'$1'"> | |
</div> | |
</template> | |
<script> | |
export default { | |
} | |
</script> | |
<style lang="scss" scoped> | |
@import "./'${name}'.scss"; | |
</style> | |
' >> $PWD/$name.vue | |
echo '.'$1' { | |
}' >> $PWD/$name.scss |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment