- Install the following VSCode extensions - `ESLint` - `Volar` - Edit settings.json - `CTRL+SHIFT+P` -> `Preferences: Open User Settings (JSON)` -- This will open an editor for `settings.json`. - Copy content of `settings.json.example` into the ed
npm install glib-web- Install the following VSCode extensions
- ESLint
- Volar
- Edit settings.json
- CTRL+SHIFT+P -> Preferences: Open User Settings (JSON) -- This will open an editor for settings.json.
- Copy content of settings.json.example into the editor.
- Install typescript yarn add typescript --dev
- Install cypress, use same version as cypress package.json. E.g. yarn add cypress@13.13.1 --dev
- Add cypress.config.js to your project
``javascript
const { defineConfig } = require('cypress');
module.exports = defineConfig({
e2e: {
specPattern: 'node_modules/glib-web/cypress/e2e',
defaultBrowser: 'chrome',
supportFile: 'node_modules/glib-web/cypress/support/e2e.{js,jsx,ts,tsx}'
},
});
`cypress.yml.example
- Copy to YOUR_PROJECT/.github/workflows/cypress.ymlbin/rails s
- Make sure the workflow is compatible with the project
- Run the test
- Run rails server yarn run cypress run
- Execute
- To prevent circular dependencies between components:
- It’s okay to use dispatchEvent for upward communication (i.e. child component to ancestors). This fits with how the JS event model works as it already supports event propagation out of the box.
- For downward communication, don’t use any sort of event/pub-sub mechanism. Always use Vuejs data binding instead.
- cd glib-web-npmyarn install
- yarn link
- cd PROJECT_DIR
- yarn link glib-web
- bin/vite dev
-
Add colors
`javascript`
settings.themes = {
light: {
dark: false,
colors: {
...
custom: "#FF5D6D"
}
}
};
Use its as styleClasses
`ruby`chip group with custom green color
view.chipGroup styleClasses: ['custom']
- Stop vite server
- On your glib-web-npm's directory:
- rm -rf node_modulesyarn install
-
- On your project's directory:
- rm -rf node_modulesyarn link glib-web
- yarn install
- bin/vite clobber
- bin/vite dev
-
- Create a PR to the master branchyarn run test
- Make sure test pass
- After approval, merge the PR.
- One-off login
- npm login --registry=https://registry.npmjs.org/glib-web
- Bump version in package.jsonnpm publish
- Run package.json`
- Check uploaded version on https://www.npmjs.com i.e. https://www.npmjs.com/package/glib-web
- Commit and push the new