File tree Expand file tree Collapse file tree 4 files changed +13
-19
lines changed
Expand file tree Collapse file tree 4 files changed +13
-19
lines changed Original file line number Diff line number Diff line change 11# Changes here will be overwritten by Copier
2- _commit : 3d2cd28
2+ _commit : 41c2f2c
33_src_path : https://github.com/python-project-templates/base.git
44add_docs : true
55add_extension : js
Original file line number Diff line number Diff line change @@ -84,18 +84,14 @@ jobs:
8484 run : make dist
8585 if : matrix.os == 'ubuntu-latest'
8686
87- - name : Test wheel install
88- run : |
89- python -m venv /tmp/test-wheel
90- /tmp/test-wheel/bin/pip install dist/*.whl
91- /tmp/test-wheel/bin/python -c "import python_template_js"
87+ - uses : actions-ext/python/test-wheel@main
88+ with :
89+ module : python_template_js
9290 if : matrix.os == 'ubuntu-latest'
9391
94- - name : Test sdist install
95- run : |
96- python -m venv /tmp/test-sdist
97- /tmp/test-sdist/bin/pip install dist/*.tar.gz
98- /tmp/test-sdist/bin/python -c "import python_template_js"
92+ - uses : actions-ext/python/test-sdist@main
93+ with :
94+ module : python_template_js
9995 if : matrix.os == 'ubuntu-latest'
10096
10197 - uses : actions/upload-artifact@v7
Original file line number Diff line number Diff line change 11import { bundle } from "./tools/bundle.mjs" ;
22import { bundle_css } from "./tools/css.mjs" ;
33import { node_modules_external } from "./tools/externals.mjs" ;
4- import { getarg } from "./tools/getarg.mjs" ;
54
6- import { transform } from "lightningcss" ;
75import fs from "fs" ;
86import cpy from "cpy" ;
97
@@ -24,8 +22,6 @@ async function build() {
2422 await bundle_css ( ) ;
2523
2624 // Copy HTML
27- fs . mkdirSync ( "dist/html" , { recursive : true } ) ;
28- cpy ( "src/html/*" , "dist/html" ) ;
2925 cpy ( "src/html/*" , "dist/" ) ;
3026
3127 // Copy images
@@ -34,9 +30,11 @@ async function build() {
3430
3531 await Promise . all ( BUNDLES . map ( bundle ) ) . catch ( ( ) => process . exit ( 1 ) ) ;
3632
37- // Copy from dist to python
33+ // Copy servable assets to python extension (exclude esm/)
3834 fs . mkdirSync ( "../python_template_js/extension" , { recursive : true } ) ;
39- cpy ( "dist/**/*" , "../python_template_js/extension" ) ;
35+ cpy ( "dist/**/*" , "../python_template_js/extension" , {
36+ filter : ( file ) => ! file . relativePath . startsWith ( "esm" ) ,
37+ } ) ;
4038}
4139
4240build ( ) ;
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ const bundle_one = async (file, resolver) => {
3535 resolver : resolver || DEFAULT_RESOLVER ,
3636 } ) ;
3737 const outName = path . basename ( file ) ;
38- fs . mkdirSync ( "./dist" , { recursive : true } ) ;
39- fs . writeFileSync ( path . join ( "./dist" , outName ) , code ) ;
38+ fs . mkdirSync ( "./dist/css " , { recursive : true } ) ;
39+ fs . writeFileSync ( path . join ( "./dist/css " , outName ) , code ) ;
4040} ;
4141
4242export const bundle_css = async ( root = "src/css/index.css" , resolver = null ) => {
You can’t perform that action at this time.
0 commit comments