Skip to content

Commit

Permalink
Merge pull request #13009 from rtibbles/new_packages_new_you
Browse files Browse the repository at this point in the history
Small tweaks to simplify publishing packages.
  • Loading branch information
rtibbles authored Jan 16, 2025
2 parents e1ffe1b + e5af8b8 commit e6c4542
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 9 deletions.
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

0 comments on commit e6c4542

Please sign in to comment.