Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small tweaks to simplify publishing packages. #13009

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/npm_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
- 'kolibri-logging'
- 'kolibri-module'
- 'kolibri-plugin-data'
- 'kolibri-tools'
- 'kolibri-viewer'

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repos:
- id: core-js-api
name: Rebuild kolibri package
description: Rebuilds kolibri package on changes to core js api
entry: yarn run build-kolibri-tools
entry: node ./packages/build_kolibri_package.js
language: system
files: ^packages/kolibri/.*\.(js|vue)$
- repo: local
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"lint-frontend:format": "yarn run lint-frontend --write",
"lint-frontend:watch": "yarn run lint-frontend --monitor",
"lint-frontend:watch:format": "yarn run lint-frontend --monitor --write",
"build-kolibri-tools": "yarn workspace kolibri-tools run build-kolibri-tools",
"migrate-core-api": "kolibri-tools migrate '{kolibri*/**/assets,packages}/**/*.{js,vue}' --ignore '**/dist/**,**/node_modules/**,**/static/**'",
"hashi-dev": "yarn workspace hashi run dev",
"hashi-build": "yarn workspace hashi run build",
Expand Down
2 changes: 1 addition & 1 deletion packages/browserslist-config-kolibri/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "browserslist-config-kolibri",
"version": "0.16.1-dev.1",
"version": "0.18.0",
"description": "Browsers list configuration for Kolibri",
"main": "index.js",
"repository": {
Expand Down
4 changes: 4 additions & 0 deletions packages/build_kolibri_package.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* Build file for kolibri package */
const { rebuildApiSpec } = require('kolibri-tools/lib/apiSpecExportTools');

rebuildApiSpec();
2 changes: 2 additions & 0 deletions packages/kolibri-tools/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
dist/*
# Ignore any copied version of language info
lib/i18n/language_info.json
# Ignore any packaged version of the tools
*.tgz
2 changes: 2 additions & 0 deletions packages/kolibri-tools/.npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
build_kolibri_tools.js
test/*
*.tgz
5 changes: 1 addition & 4 deletions packages/kolibri-tools/build_kolibri_tools.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* Build file for kolibri-tools and kolibri */
/* Build file for kolibri-tools */
const fs = require('fs');
const path = require('path');
const { rebuildApiSpec } = require('./lib/apiSpecExportTools');

// /*
// * Copy the kolibri language_info.json into the kolibri-tools package for use externally
Expand All @@ -16,5 +15,3 @@ fs.writeFileSync(
encoding: 'utf-8',
},
);

rebuildApiSpec();
4 changes: 2 additions & 2 deletions packages/kolibri-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"kolibri-tools": "./lib/cli.js"
},
"scripts": {
"build-kolibri-tools": "node ./build_kolibri_tools.js"
"prepack": "node ./build_kolibri_tools.js"
},
"dependencies": {
"@babel/core": "^7.26.0",
Expand All @@ -32,7 +32,7 @@
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^29.7.0",
"babel-loader": "^9.2.1",
"browserslist-config-kolibri": "0.16.1-dev.1",
"browserslist-config-kolibri": "0.18.0",
"chalk": "4.1.2",
"check-node-version": "^4.2.1",
"cli-table": "^0.3.11",
Expand Down
Loading