Skip to content

Commit

Permalink
build: remove semantic-release from dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
scttcper committed Oct 17, 2021
1 parent c1cedc3 commit 86ecfce
Show file tree
Hide file tree
Showing 6 changed files with 259 additions and 1,891 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn semantic-release
run: cd dist && npx semantic-release
14 changes: 5 additions & 9 deletions build.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import { copySync } from 'fs-extra';
import { copyFileSync } from 'node:fs';
import { join } from 'node:path';

import { ngPackagr } from 'ng-packagr';
import { join } from 'path';
import * as del from 'del';

async function main() {
// cleanup dist
del.sync(join(process.cwd(), '/dist'));
del.sync(join(process.cwd(), '/node_modules/angulartics2'));

await ngPackagr()
.forProject(join(process.cwd(), 'src/lib/package.json'))
.build();

copySync('README.md', join(process.cwd(), 'dist/README.md'));
copySync('LICENSE', join(process.cwd(), 'dist/LICENSE'));
copyFileSync('README.md', join(process.cwd(), 'dist/README.md'));
copyFileSync('LICENSE', join(process.cwd(), 'dist/LICENSE'));
}

main()
Expand Down
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
"scripts": {
"ng": "ng",
"start": "ng serve",
"prebuild": "rimraf dist",
"prebuild": "del-cli dist",
"build": "ts-node -O '{\"module\": \"commonjs\"}' build.ts",
"test": "ng test --watch=false --browsers=ChromeCI",
"test:ci": "ng test --code-coverage --watch=false --no-progress --browsers=ChromeCI",
"test:watch": "ng test",
"lint": "ng lint",
"lint:fix": "ng lint --fix",
"semantic-release": "cd dist && semantic-release",
"ghpages": "ng build --configuration production --no-progress --baseHref='/angulartics2/'"
},
"private": true,
Expand Down Expand Up @@ -47,16 +46,14 @@
"@angular/language-service": "12.2.10",
"@types/applicationinsights-js": "1.0.9",
"@types/facebook-pixel": "0.0.24",
"@types/fs-extra": "9.0.13",
"@types/google.analytics": "0.0.42",
"@types/jasmine": "3.10.0",
"@types/node": "16.11.0",
"@types/segment-analytics": "0.0.34",
"@typescript-eslint/eslint-plugin": "4.28.2",
"@typescript-eslint/parser": "4.28.2",
"del": "6.0.0",
"del-cli": "4.0.1",
"eslint": "7.26.0",
"fs-extra": "10.0.0",
"jasmine-core": "3.10.0",
"karma": "6.3.4",
"karma-chrome-launcher": "3.1.0",
Expand All @@ -65,7 +62,6 @@
"karma-jasmine": "4.0.1",
"karma-jasmine-html-reporter": "1.7.0",
"ng-packagr": "12.2.3",
"semantic-release": "18.0.0",
"ts-node": "10.3.0",
"typescript": "4.3.5"
},
Expand Down
2 changes: 1 addition & 1 deletion src/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"lib": {
"entryFile": "public_api.ts"
},
"dest": "../../dist/core"
"dest": "../../dist"
},
"peerDependencies": {
"@angular/common": ">=12.0.0-0",
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"target": "es2017",
"module": "es2020",
"types": [
"node",
"google.analytics",
"applicationinsights-js",
"segment-analytics",
Expand Down
Loading

0 comments on commit 86ecfce

Please sign in to comment.