Skip to content

Commit

Permalink
build: include readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
jeripeierSBB committed Dec 11, 2023
1 parent 5565209 commit 32de772
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Run `yarn lint --fix` to fix any automatically fixable lint issues and report th

## Running tests

To run unit tests, run `yarn test:watch`.
To run unit tests, run `yarn test`.

## Starting showcase

Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,15 @@ The latest still **🧪 experimental** version of the Storybook component browse

The current **🧪 experimental** build of Lyne Components can be found on [npm](https://www.npmjs.com/package/@sbb-esta/lyne-components).

## 🚀 Getting started

To see how to use `lyne-components` in React, Angular, Vue, Svelte or Plain Javascript, please refer to [this](https://github.com/lyne-design-system/lyne-getting-started) repo to see example implementations.

## 📚 Documentation

Check the [docs](docs/README.md) directory for our documentation which we will continuously enhance.
Component specific docs are available on our [storybook](https://lyne-storybook.app.sbb.ch).
General docs can be read on [digital.sbb.ch](https://digital.sbb.ch).

## 🙌 Contributing

See our [contributing guide](/.github/CONTRIBUTING.md) and check also our [code of conduct](/.github/CODE_OF_CONDUCT.md) 👀.
See our [contributing guide](CONTRIBUTING.md) and check also our [code of conduct](CODE_OF_CONDUCT.md) 👀.

## 📝 License

Expand Down
4 changes: 2 additions & 2 deletions src/components/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default defineConfig((config) =>
.filter((v, i, a) => a.indexOf(v) === i)
.sort(),
}),
copyAssets(['_index.scss', 'core/styles/**/*.scss']),
copyAssets(['_index.scss', 'core/styles/**/*.scss', '../../README.md']),
typography(),
]
: []),
Expand All @@ -71,7 +71,7 @@ export default defineConfig((config) =>
outDir: outDir.pathname,
emptyOutDir: true,
},
assetsInclude: ['_index.scss', 'core/styles/**/*.scss'],
assetsInclude: ['_index.scss', 'core/styles/**/*.scss', 'README.md'],
}),
);

Expand Down
2 changes: 1 addition & 1 deletion tools/generate-component/index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function copyFiles(
const fileDataWithCorrectName: string = fileData
.replace(/__name__/gu, componentName)
.replace(/__noPrefixName__/gu, componentFileName)
.replace(/__nameUpperCase__/gu, convertKebabCaseToPascalCase(componentName));
.replace(/__nameUpperCase__/gu, `${convertKebabCaseToPascalCase(componentName)}Element`);

try {
const relativePath: string = relative(config.boilerplateDirectory, file);
Expand Down
4 changes: 3 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ export function copyAssets(includes: string[]): PluginOption {
return;
}
for (const file of glob.sync(includes, { cwd: viteConfig.root })) {
// Remove relative file path if file is on a more upper layer than cwd.
const fileName = file.replace(/^(\.\.\/)*/, '');
this.emitFile({
type: 'asset',
fileName: file,
fileName: fileName,
source: readFileSync(join(viteConfig.root, file), 'utf8'),
});
}
Expand Down

0 comments on commit 32de772

Please sign in to comment.