1.4.6 • Published 4 years ago

vue-cli-context v1.4.6

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

vue-cli-context

Sampily to get the Packages in Directory

npm i vue-cli-context
# or
yarn add vue-cli-context
import contextual from "vue-cli-context";

contextual({
  // context
  context: require.context(
    // directory
    `@/pages/`
    // recursive
    true,
    // regular
    /.js$/
  ),
  // expect
  expect: pkg => pkg
  // if need some injections, it must be export a function within the file
  inject: {
    say: `hello world`
  }
}).then( pkgs => console.log(pkgs));
// sample package with option: `inject`
export default ({ say }) => {
  console.log(say);
  // each package must set propert: `name`
  return {
    name: `sample`
  };
};
1.4.6

4 years ago

1.2.6

4 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago