Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
vue template create
#!/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