kazupon / vue-cli-plugin-p11n

:electric_plug: Vue CLI 3 plugin to pluginize your Vue project
MIT License
113 stars 13 forks source link

Normalize scoped names in build #13

Closed d0whc3r closed 5 years ago

d0whc3r commented 5 years ago

PR for https://github.com/kazupon/vue-cli-plugin-p11n/issues/10 issue

EvanBurbidge commented 5 years ago

@d0whc3r update the stripNamespaceIfExists method to this

function stripNamespaceIfExists (name) {
  if (!name) return;
  if (name.indexOf('@') === -1) return name;
  return name.split('/').slice(-1).join('');
}

otherwise you'll have a failing test case on commands/build.spec.js

d0whc3r commented 5 years ago

@kazupon I see you have circleCi but there is no checks for pull requests, maybe you have to enable it?

kazupon commented 5 years ago

@d0whc3r Sorry, I had mistaked circle CI configuration. Update done.

d0whc3r commented 5 years ago

Ok, I removed semicolons but lint doesn't show me any error

$ yarn lint
yarn run v1.12.3
$ eslint --fix --ext .js .
Done in 2.30s.