Skip to content

Commit

Permalink
Merge pull request #171 from CSCfi/style-import-fix
Browse files Browse the repository at this point in the history
Fix missing styles
  • Loading branch information
villeerikssoncsc authored Oct 23, 2024
2 parents 5cbf9fe + e7ed874 commit bbeb661
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
npm run build
npm publish
cd ../csc-ui-react
npm version ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}
npm ci
npm run build
(version="$(node ../csc-ui/scripts/getLatestVersion.js)"; npm --no-git-tag-version version ${version})
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions packages/csc-ui/scripts/getLatestVersion.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const packageInfo = require('../package.json');

const version = packageInfo.version;

console.log(version);
2 changes: 1 addition & 1 deletion packages/csc-ui/scripts/move-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ for (const dir of dirs) {
fs.mkdirSync(dir, { recursive: true });
}

fs.cp('./dist/components/styles', dir, { recursive: true }, (err) => {
fs.cp('./dist/styles', dir, { recursive: true }, (err) => {
if (err) {
console.error(err);
}
Expand Down
3 changes: 0 additions & 3 deletions packages/csc-ui/src/components/c-select/c-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,6 @@ export class CSelect {
this._selectionElement?.replaceChildren();
}

console.log('VALUE VAIHTUS', v);

this._selectOption(this.returnObject ? v : { name: v, value: v });
}

Expand All @@ -338,7 +336,6 @@ export class CSelect {
}

private _selectOption({ value, name }: { value: string; name: string }) {
console.log('selecteerataan', value, name);
this._dropdownElement.close();

const selection = this._setCurrentIndex({ name, value });
Expand Down
9 changes: 1 addition & 8 deletions packages/csc-ui/stencil.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,12 @@ export const config: Config = {
{
type: 'dist',
esmLoaderPath: '../loader',
copy: [{ src: 'styles', dest: 'dist/', keepDirStructure: true }],
copy: [{ src: 'styles', dest: '../', keepDirStructure: true }],
},

{
type: 'dist-custom-elements',
dir: 'dist/components',
copy: [
{
src: 'styles',
dest: 'dist/components/',
keepDirStructure: true,
},
],
customElementsExportBehavior: 'single-export-module',
externalRuntime: false,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react-app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react'
import './App.css';
import { CButton, COption, CSelect, CSwitch, CCheckbox, CCard, CCardTitle, CCardContent, CCardActions, CSlider, CTag } from '@cscfi/csc-ui-react';
import { CSelectItem } from '../../csc-ui/dist/types/types';
import { CSelectItem } from '@cscfi/csc-ui';

function App() {
const [count, setCount] = useState(0);
Expand Down

0 comments on commit bbeb661

Please sign in to comment.