MCPcopy Create free account
hub / github.com/YvesCoding/vuescroll / genConfig

Function genConfig

scripts/config.js:77–114  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

75
76let hasGenrateCss = false;
77function genConfig(name) {
78 const opts = builds[name];
79 const config = {
80 input: opts.entry,
81 external: opts.external,
82 output: {
83 globals: {
84 vue: 'Vue'
85 },
86 file: opts.dest,
87 format: opts.format,
88 banner: opts.banner,
89 name: opts.moduleName || 'vuescroll',
90 sourcemap: opts.sourcemap
91 },
92 plugins: [
93 resolveNode(),
94 scss({
95 output: function(styles) {
96 if (!hasGenrateCss) {
97 hasGenrateCss = true;
98 fs.writeFileSync(resolve('dist/vuescroll.css'), styles);
99 }
100 },
101 outputStyle: 'compressed'
102 }),
103 babel({
104 exclude: 'node_modules/**' // only transpile our source code
105 }),
106 replace({
107 'process.env.NODE_FORMAT': JSON.stringify(opts.format),
108 __version__: version
109 }),
110 alias(Object.assign({}, aliases, opts.alias))
111 ]
112 };
113 return config;
114}
115
116exports.getBuild = genConfig;
117exports.getAllBuilds = () => Object.keys(builds).map(genConfig);

Callers

nothing calls this directly

Calls 1

resolveFunction · 0.70

Tested by

no test coverage detected