UNPKG

2.15 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.defaults = void 0;
4const tslib_1 = require("tslib");
5const dedent_1 = tslib_1.__importDefault(require("dedent"));
6exports.defaults = {
7 watch: false,
8 inputDirectory: 'src',
9 outputDirectory: 'dist',
10 cssMain: 'main.css',
11 ignore: [
12 '**/*.+(md|mdx)',
13 '**/__tests__/**',
14 '**/__snapshots__/**',
15 '**/*.+(stories|test).*',
16 '**/stories/*'
17 ]
18};
19const command = {
20 name: 'build',
21 description: 'Builds a React Component located in `./src` and outputs `cjs`, `mjs`, and `css` into `dist`',
22 options: [
23 {
24 name: 'watch',
25 alias: 'w',
26 type: Boolean,
27 description: 'Watch for file changes and recompile.'
28 },
29 {
30 name: 'ignore',
31 type: String,
32 multiple: true,
33 description: 'A minimatch to ignore',
34 defaultValue: exports.defaults.ignore,
35 config: true
36 }
37 ],
38 footer: [
39 {
40 header: 'Custom Babel Config',
41 content: 'To customize your babel configuration, create a .babelrc at the root of the project.'
42 },
43 {
44 header: 'Custom PostCSS Config',
45 content: [
46 dedent_1.default `
47 To customize your postcss configuration, create a postcss.config.js at your package or monorepo root.
48
49 It must use the base config for css modules to function properly.
50 `
51 ]
52 },
53 {
54 code: true,
55 content: dedent_1.default `
56 \`\`\`js
57 const defaultConfig = require('@design-systems/build/postcss.config');
58 const mixins = require('postcss-mixins');
59
60 module.exports = (ctx) => {
61 const config = defaultConfig(ctx);
62
63 return {
64 ...config,
65 plugins: [
66 mixins({ mixinsFiles }),
67 ...config.plugins
68 ]
69 }
70 });
71 \`\`\`
72 `
73 }
74 ]
75};
76exports.default = command;
77//# sourceMappingURL=command.js.map
\No newline at end of file