Skip to content
Snippets Groups Projects
Commit d5d99e31 authored by ko_oler's avatar ko_oler
Browse files

fix .gitlab-ci.yml

parent fe71defa
No related branches found
No related tags found
1 merge request!1Добавлена генерация файлов для frontend в Makefile и публикацию npm-пакета
Pipeline #19082 failed
......@@ -17,10 +17,9 @@ publish_npm:
script:
- npm install -g typescript@4.7.4
- npm install -g ts-proto@1.115.5
- mkdir config/clients
- mkdir config/dist
- make proto
- cd ./config
- NPM_PACKAGE_VERSION=$(node -p "require('./package.json').version")
- yarn pub
- echo "Successfully published version ${NPM_PACKAGE_VERSION} to GitLab's NPM registry"
\ No newline at end of file
- rm -rf ./clients
\ No newline at end of file
......@@ -54,30 +54,30 @@ generate_index() {
}
echo "---deleting existing *.d.ts, *.d.ts.map, *.js, *.js.map files"
find ./config/clients/*/**/ -path '*.d.ts' -delete
find ./config/clients/*/**/ -path '*.d.ts.map' -delete
find ./config/clients/*/**/ -path '*.js' -delete
find ./config/clients/*/**/ -path '*.js.map' -delete
find ./config/clients/*/**/ -path '*.ts.bak' -delete
find ./config/clients -path '*.d.ts' -delete
find ./config/clients -path '*.d.ts.map' -delete
find ./config/clients -path '*.js' -delete
find ./config/clients -path '*.js.map' -delete
find ./config/clients -path '*.ts.bak' -delete
find ./config/dist/*/**/ -path '*.d.ts' -delete
find ./config/dist/*/**/ -path '*.d.ts.map' -delete
find ./config/dist/*/**/ -path '*.js' -delete
find ./config/dist/*/**/ -path '*.js.map' -delete
find ./config/dist/*/**/ -path '*.ts.bak' -delete
find ./config/dist -path '*.d.ts' -delete
find ./config/dist -path '*.d.ts.map' -delete
find ./config/dist -path '*.js' -delete
find ./config/dist -path '*.js.map' -delete
find ./config/dist -path '*.ts.bak' -delete
echo "---generating index.ts files"
ts_files=$(find ./config/clients/**/ -name '*.ts')
ts_files=$(find ./config/dist/**/ -name '*.ts')
ts_files_array=($ts_files)
generate_index "${ts_files_array[@]}"
echo "---generating *.d.ts, *.d.ts.map, *.js, *.js.map files"
npm i protobufjs@6.11.3
tsc --project ./config --declaration --declarationMap --sourceMap --rootDir ./config/clients
tsc --project ./config --declaration --declarationMap --sourceMap --rootDir ./config/dist
echo "---deleting created tmp files"
npm uninstall protobufjs@6.11.3
find ./config/clients -name 'index.ts' -delete
find ./config/clients/*/** -name 'index.ts' -delete
find ./config/dist -name 'index.ts' -delete
find ./config/dist/*/** -name 'index.ts' -delete
find ./ -maxdepth 1 -name '*.json' -delete
find ./ -maxdepth 1 -name '*.ts' -delete
......
......@@ -2,9 +2,9 @@
"name": "@perxis-js/perxis-client",
"version": "1.0.5",
"description": "",
"main": "clients/index.js",
"main": "dist/index.js",
"files": [
"clients/"
"dist/"
],
"repository": {
"type": "git",
......
......@@ -98,5 +98,7 @@
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"include": ["./clients/**/*"],
"include": [
"./dist/**/*"
],
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment